diff options
526 files changed, 6478 insertions, 6169 deletions
diff --git a/android/source/res/values-zh-rCN/strings.xml b/android/source/res/values-zh-rCN/strings.xml new file mode 100644 index 000000000000..2033307507b3 --- /dev/null +++ b/android/source/res/values-zh-rCN/strings.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name_settings">LibreOffice 查看器设置</string> + <string name="app_name">LibreOffice 查看器</string> + <string name="app_description">LibreOffice 查看器是一款基于 LibreOffice 的文档查看软件。</string> + <string name="action_rename_worksheet">重命名工作表</string> + <string name="select_file_to_open">选择要打开的文件</string> + <string name="search_find_previous">查找上一个</string> + <string name="pref_developer_mode_summary">启用可以从 App 内发送 UNO 命令的开发者模式。使用时请风险自负。</string> + <string name="save_alert_dialog_title">要在关闭文档前保存吗?</string> + <string name="calc_optimal_length">最佳长度</string> + <string name="calc_optimal_length_default_text">输入附加长度,单位是百分之一毫米</string> + <string name="compress_photo_no_compress">不压缩</string> + <string name="unable_to_export_pdf">无法导出为 PDF</string> + <string name="unable_to_save">无法保存文件</string> + <string name="UNO_commands_string_hint">UNO 命令</string> + <string name="action_exportToPDF">导出为 PDF</string> + <string name="app_version">版本:%1$s<br>构建识别码:<a href=https://hub.libreoffice.org/git-core/%2$s>%2$s</a></string> + <string name="app_credits">https://zh-cn.libreoffice.org</string> + <string name="app_vendor">该版本由 $VENDOR 提供。</string> + <string name="readonly_file">这个文件有只读属性。</string> + <string name="about_license">显示许可证</string> + <string name="about_notice">显示通知</string> + <string name="about_privacy_policy">隐私政策</string> + <string name="create_file">创建新文件</string> + <string name="new_textdocument">新建文本文档</string> + <string name="new_presentation">新建演示文稿</string> + <string name="new_spreadsheet">新建电子表格</string> + <string name="new_drawing">新建绘图</string> + <string name="default_document_name">未命名</string> + <string name="search_find_next">查找下一个</string> + <string name="file_icon_desc">文件图标</string> + <string name="title_recents">最近的文件</string> + <string name="title_browser">所有文件</string> + <string name="pref_category_general">通用</string> + <string name="pref_experimental_editing">实验功能模式</string> + <string name="pref_experimental_editing_summary">启用实验性的编辑模式。使用时请风险自负。</string> + <string name="pref_developer_mode">开发者模式</string> + <string name="action_about">关于</string> + <string name="action_parts">部件</string> + <string name="action_settings">设置</string> + <string name="action_keyboard">显示键盘</string> + <string name="action_save">保存</string> + <string name="action_save_as">另存为…</string> + <string name="action_fromat">启用格式</string> + <string name="action_search">搜索</string> + <string name="action_UNO_commands">发送 UNO 命令</string> + <string name="message_saved">保存完成</string> + <string name="message_saving">正在保存文档…</string> + <string name="message_saving_failed">保存文档失败。</string> + <string name="password">密码</string> + <string name="action_undo">撤消</string> + <string name="action_redo">恢复</string> + <string name="save_document">保存</string> + <string name="action_cancel">取消</string> + <string name="no_save_document">否</string> + <string name="action_presentation">放映幻灯片</string> + <string name="action_add_slide">添加幻灯片</string> + <string name="slideshow_action_back">后退</string> + <string name="calc_insert_before">插入</string> + <string name="calc_delete">删除</string> + <string name="calc_hide">隐藏</string> + <string name="calc_show">显示</string> + <string name="calc_adjust_length">调整长度</string> + <string name="calc_adjust_height">调整高度</string> + <string name="calc_adjust_width">调整宽度</string> + <string name="calc_optimal_height">最佳高度</string> + <string name="calc_optimal_width">最佳宽度</string> + <string name="calc_optimal_length_confirm">确定</string> + <string name="calc_alert_double_click_optimal_length">提示:连点两次表头可以设置最佳宽度/高度。</string> + <string name="action_add_worksheet">新建工作表</string> + <string name="action_pwd_dialog_OK">确定</string> + <string name="action_pwd_dialog_cancel">取消</string> + <string name="action_pwd_dialog_title">请输入密码</string> + <string name="take_photo">拍照</string> + <string name="select_photo">选择照片</string> + <string name="select_photo_title">选择图片</string> + <string name="no_camera_found">未找到相机</string> + <string name="compress_photo_smallest_size">最小尺寸</string> + <string name="compress_photo_medium_size">中等尺寸</string> + <string name="compress_photo_max_quality">最高质量</string> + <string name="compress_photo_title">您要压缩照片吗?</string> + <string name="action_copy">复制</string> + <string name="action_paste">粘贴</string> + <string name="action_cut">剪切</string> + <string name="action_back">后退</string> + <string name="action_text_copied">已将文本复制到剪贴板</string> + <string name="insert_table">插入表格</string> + <string name="select_insert_options">选择插入选项:</string> + <string name="select_delete_options">选择删除选项:</string> + <string name="action_delete_worksheet">删除工作表</string> + <string name="action_delete_slide">删除幻灯片</string> + <string name="name_already_used">取的名字已经被使用了。</string> + <string name="part_name_changed">部件名称已被更改。</string> + <string name="part_deleted">部件已被删除。</string> + <string name="UNO_commands_string_type_hint">类型</string> + <string name="UNO_commands_string_value_hint">值</string> + <string name="UNO_commands_string_parent_value_hint">上一级的值</string> + <string name="action_print">打印</string> + <string name="tabhost_character">字符</string> + <string name="tabhost_paragraph">段落</string> + <string name="tabhost_insert">插入</string> + <string name="tabhost_style">样式</string> + <string name="alert_ok">确定</string> + <string name="alert_cancel">取消</string> + <string name="current_uno_command">当前 UNO 命令</string> + <string name="pdf_export_finished">PDF 导出完毕</string> + <string name="error">错误</string> + <string name="enter_part_name">输入部件名称</string> + <string name="bmp_null">位图图像为空!</string> + <string name="page">页</string> + <string name="sheet">工作表</string> + <string name="slide">幻灯片</string> + <string name="part">部件</string> + <string name="highlight_color">高亮颜色</string> + <string name="font_color">字符颜色</string> + <string name="action_rename_slide">重命名幻灯片</string> + <string name="automatic">自动</string> +</resources> diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index a6a88c557ee8..1071ff859c0b 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -417,27 +417,25 @@ namespace basegfx } // create upper edge. + if(bCutA) { - if(bCutA) - { - // calculate cut point and add - aCutPoint = rEdge.getStartPoint() + (aPerpendStartA * fCutA); - aBezierPolygon.append(aCutPoint); - } - else - { - // create scaled bezier segment - const B2DPoint aStart(rEdge.getStartPoint() + aPerpendStartA); - const B2DPoint aEnd(rEdge.getEndPoint() + aPerpendEndA); - const B2DVector aEdge(aEnd - aStart); - const double fLength(aEdge.getLength()); - const double fScale(bIsEdgeLengthZero ? 1.0 : fLength / fEdgeLength); - const B2DVector fRelNext(rEdge.getControlPointA() - rEdge.getStartPoint()); - const B2DVector fRelPrev(rEdge.getControlPointB() - rEdge.getEndPoint()); - - aBezierPolygon.append(aStart); - aBezierPolygon.appendBezierSegment(aStart + (fRelNext * fScale), aEnd + (fRelPrev * fScale), aEnd); - } + // calculate cut point and add + aCutPoint = rEdge.getStartPoint() + (aPerpendStartA * fCutA); + aBezierPolygon.append(aCutPoint); + } + else + { + // create scaled bezier segment + const B2DPoint aStart(rEdge.getStartPoint() + aPerpendStartA); + const B2DPoint aEnd(rEdge.getEndPoint() + aPerpendEndA); + const B2DVector aEdge(aEnd - aStart); + const double fLength(aEdge.getLength()); + const double fScale(bIsEdgeLengthZero ? 1.0 : fLength / fEdgeLength); + const B2DVector fRelNext(rEdge.getControlPointA() - rEdge.getStartPoint()); + const B2DVector fRelPrev(rEdge.getControlPointB() - rEdge.getEndPoint()); + + aBezierPolygon.append(aStart); + aBezierPolygon.appendBezierSegment(aStart + (fRelNext * fScale), aEnd + (fRelPrev * fScale), aEnd); } // create right edge @@ -480,27 +478,25 @@ namespace basegfx } // create lower edge. + if(bCutB) { - if(bCutB) - { - // calculate cut point and add - aCutPoint = rEdge.getEndPoint() + (aPerpendEndB * fCutB); - aBezierPolygon.append(aCutPoint); - } - else - { - // create scaled bezier segment - const B2DPoint aStart(rEdge.getEndPoint() + aPerpendEndB); - const B2DPoint aEnd(rEdge.getStartPoint() + aPerpendStartB); - const B2DVector aEdge(aEnd - aStart); - const double fLength(aEdge.getLength()); - const double fScale(bIsEdgeLengthZero ? 1.0 : fLength / fEdgeLength); - const B2DVector fRelNext(rEdge.getControlPointB() - rEdge.getEndPoint()); - const B2DVector fRelPrev(rEdge.getControlPointA() - rEdge.getStartPoint()); - - aBezierPolygon.append(aStart); - aBezierPolygon.appendBezierSegment(aStart + (fRelNext * fScale), aEnd + (fRelPrev * fScale), aEnd); - } + // calculate cut point and add + aCutPoint = rEdge.getEndPoint() + (aPerpendEndB * fCutB); + aBezierPolygon.append(aCutPoint); + } + else + { + // create scaled bezier segment + const B2DPoint aStart(rEdge.getEndPoint() + aPerpendEndB); + const B2DPoint aEnd(rEdge.getStartPoint() + aPerpendStartB); + const B2DVector aEdge(aEnd - aStart); + const double fLength(aEdge.getLength()); + const double fScale(bIsEdgeLengthZero ? 1.0 : fLength / fEdgeLength); + const B2DVector fRelNext(rEdge.getControlPointB() - rEdge.getEndPoint()); + const B2DVector fRelPrev(rEdge.getControlPointA() - rEdge.getStartPoint()); + + aBezierPolygon.append(aStart); + aBezierPolygon.appendBezierSegment(aStart + (fRelNext * fScale), aEnd + (fRelPrev * fScale), aEnd); } // close diff --git a/bin/gen-boost-headers b/bin/gen-boost-headers index 784cf60f3442..50e51ebfd0b4 100755 --- a/bin/gen-boost-headers +++ b/bin/gen-boost-headers @@ -58,6 +58,7 @@ cat <(cd ${SRCDIR} && git grep -h '^# *include') \ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 4c51fb0b8a81..2b13ce025de8 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -273,41 +273,39 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM } //create gui name for this object + if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_AXIS ) { - if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_AXIS ) - { - m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, xChartModel ); - } - else if( !m_bAffectsMultipleObjects && ( m_eObjectType == OBJECTTYPE_GRID || m_eObjectType == OBJECTTYPE_SUBGRID ) ) - { - m_aLocalizedName = ObjectNameProvider::getGridName( m_aObjectCID, xChartModel ); - } - else if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_TITLE ) - { - m_aLocalizedName = ObjectNameProvider::getTitleName( m_aObjectCID, xChartModel ); - } - else + m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, xChartModel ); + } + else if( !m_bAffectsMultipleObjects && ( m_eObjectType == OBJECTTYPE_GRID || m_eObjectType == OBJECTTYPE_SUBGRID ) ) + { + m_aLocalizedName = ObjectNameProvider::getGridName( m_aObjectCID, xChartModel ); + } + else if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_TITLE ) + { + m_aLocalizedName = ObjectNameProvider::getTitleName( m_aObjectCID, xChartModel ); + } + else + { + switch( m_eObjectType ) { - switch( m_eObjectType ) - { - case OBJECTTYPE_DATA_POINT: - case OBJECTTYPE_DATA_LABEL: - case OBJECTTYPE_DATA_LABELS: - case OBJECTTYPE_DATA_ERRORS_X: - case OBJECTTYPE_DATA_ERRORS_Y: - case OBJECTTYPE_DATA_ERRORS_Z: - case OBJECTTYPE_DATA_AVERAGE_LINE: - case OBJECTTYPE_DATA_CURVE: - case OBJECTTYPE_DATA_CURVE_EQUATION: - if( m_bAffectsMultipleObjects ) - m_aLocalizedName = ObjectNameProvider::getName_ObjectForAllSeries( m_eObjectType ); - else - m_aLocalizedName = ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, m_xChartDocument ); - break; - default: - m_aLocalizedName = ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects); - break; - } + case OBJECTTYPE_DATA_POINT: + case OBJECTTYPE_DATA_LABEL: + case OBJECTTYPE_DATA_LABELS: + case OBJECTTYPE_DATA_ERRORS_X: + case OBJECTTYPE_DATA_ERRORS_Y: + case OBJECTTYPE_DATA_ERRORS_Z: + case OBJECTTYPE_DATA_AVERAGE_LINE: + case OBJECTTYPE_DATA_CURVE: + case OBJECTTYPE_DATA_CURVE_EQUATION: + if( m_bAffectsMultipleObjects ) + m_aLocalizedName = ObjectNameProvider::getName_ObjectForAllSeries( m_eObjectType ); + else + m_aLocalizedName = ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, m_xChartDocument ); + break; + default: + m_aLocalizedName = ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects); + break; } } } diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 98db10ff1873..d35e7c9e5b29 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -224,19 +224,19 @@ IMPL_LINK(DataLabelResources, NumberFormatDialogHdl, weld::Button&, rButton, voi IMPL_LINK(DataLabelResources, CheckHdl, weld::Toggleable&, rToggle, void) { if (&rToggle == m_xCBNumber.get()) - m_aNumberState.ButtonToggled(rToggle); + m_aNumberState.CheckButtonToggled(*m_xCBNumber); else if (&rToggle == m_xCBPercent.get()) - m_aPercentState.ButtonToggled(rToggle); + m_aPercentState.CheckButtonToggled(*m_xCBPercent); else if (&rToggle == m_xCBCategory.get()) - m_aCategoryState.ButtonToggled(rToggle); + m_aCategoryState.CheckButtonToggled(*m_xCBCategory); else if (&rToggle == m_xCBSymbol.get()) - m_aSymbolState.ButtonToggled(rToggle); + m_aSymbolState.CheckButtonToggled(*m_xCBSymbol); else if (&rToggle == m_xCBDataSeries.get()) - m_aDataSeriesState.ButtonToggled(rToggle); + m_aDataSeriesState.CheckButtonToggled(*m_xCBDataSeries); else if (&rToggle == m_xCBWrapText.get()) - m_aWrapTextState.ButtonToggled(rToggle); + m_aWrapTextState.CheckButtonToggled(*m_xCBWrapText); else if (&rToggle == m_xCBCustomLeaderLines.get()) - m_aCustomLeaderLinesState.ButtonToggled(rToggle); + m_aCustomLeaderLinesState.CheckButtonToggled(*m_xCBCustomLeaderLines); EnableControls(); } diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index 74be51a5ee11..4c345b6eb783 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -84,7 +84,7 @@ DrawViewWrapper::DrawViewWrapper( // #i12587# support for shapes in chart SdrOutliner* pOutliner = getOutliner(); - SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditTextObjectPool() : nullptr ); + SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditEnginePool() : nullptr ); if ( pOutlinerPool ) { SvtLinguConfig aLinguConfig; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 7e801b4e79e8..bcdeb40bc2bd 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -479,10 +479,8 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent GetDrawModelWrapper(); if(m_pDrawModelWrapper) { - { - if( m_pDrawViewWrapper ) - m_pDrawViewWrapper->ReInit(); - } + if( m_pDrawViewWrapper ) + m_pDrawViewWrapper->ReInit(); //reselect object if( m_aSelection.hasSelection() ) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index a7c315ba3231..99b5b97ddeff 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1294,16 +1294,14 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( bReturn ) return bReturn; + if( pDrawViewWrapper->IsTextEdit() ) { - if( pDrawViewWrapper->IsTextEdit() ) + if( pDrawViewWrapper->KeyInput(rKEvt, pChartWindow) ) { - if( pDrawViewWrapper->KeyInput(rKEvt, pChartWindow) ) + bReturn = true; + if( nCode == KEY_ESCAPE ) { - bReturn = true; - if( nCode == KEY_ESCAPE ) - { - EndTextEdit(); - } + EndTextEdit(); } } } diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 38a497707d22..f3c4b9eada38 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -957,13 +957,11 @@ void BarChart::doXSlot( double fLowerBarDepth = fLogicBarDepth; double fUpperBarDepth = fLogicBarDepth; + if( lcl_hasGeometry3DVariableWidth(nGeometry3D) && fCompleteHeight!=0.0 ) { - if( lcl_hasGeometry3DVariableWidth(nGeometry3D) && fCompleteHeight!=0.0 ) - { - double fOuterBarDepth = fLogicBarDepth * fTopHeight/(fabs(fCompleteHeight)); - fLowerBarDepth = (fBaseValue < fUpperYValue) ? fabs(fLogicBarDepth) : fabs(fOuterBarDepth); - fUpperBarDepth = (fBaseValue < fUpperYValue) ? fabs(fOuterBarDepth) : fabs(fLogicBarDepth); - } + double fOuterBarDepth = fLogicBarDepth * fTopHeight/(fabs(fCompleteHeight)); + fLowerBarDepth = (fBaseValue < fUpperYValue) ? fabs(fLogicBarDepth) : fabs(fOuterBarDepth); + fUpperBarDepth = (fBaseValue < fUpperYValue) ? fabs(fOuterBarDepth) : fabs(fLogicBarDepth); } awt::Point aScreenPosition2D = getLabelScreenPositionAndAlignment( diff --git a/compilerplugins/clang/fakebool.cxx b/compilerplugins/clang/fakebool.cxx index 274b9ef3d729..18d353f78a65 100644 --- a/compilerplugins/clang/fakebool.cxx +++ b/compilerplugins/clang/fakebool.cxx @@ -623,7 +623,7 @@ bool FakeBool::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr * expr) { if (ignoreLocation(expr)) { return true; } - if (isFakeBool(expr->getType()) != FBK_No) { + if (isFakeBool(expr->getType()) != FBK_No && !suppressWarningAt(expr->getBeginLoc())) { report( DiagnosticsEngine::Warning, "CXXFunctionalCastExpr, suspicious cast from %0 to %1", diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in index 5b42b2c5a8bd..6580fdfd0af7 100644 --- a/config_host/config_global.h.in +++ b/config_host/config_global.h.in @@ -13,6 +13,7 @@ Any change in this header will cause a rebuild of almost everything. #define CONFIG_GLOBAL_H #define HAVE_GCC_BUILTIN_ATOMIC 0 +#define HAVE_GCC_WSFINAE_INCOMPLETE 0 #define HAVE_SYSLOG_H 0 // Compiler supports C++20 <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1073r3.html> diff --git a/config_host/config_skia.h.in b/config_host/config_skia.h.in index 322dedb18440..89017284ecbe 100644 --- a/config_host/config_skia.h.in +++ b/config_host/config_skia.h.in @@ -8,28 +8,6 @@ are the same. #ifndef CONFIG_SKIA_H #define CONFIG_SKIA_H -// This is a setting that should be set manually and it affects LO -// code rather than Skia itself. It basically controls setting -// BackendCapabilities::mbSupportsBitmap32, i.e. whether one LO bitmap -// contains all the 32bits of an image including the alpha (premultiplied). -// -// Since Skia does not natively support 24bpp, the preferred setup is -// that the setting should be enabled, it makes the code faster and cleaner. -// -// Unfortunately VCL historically splits alpha into a whole separate -// bitmap and works with 24bpp+8bpp, which is generally more complicated, -// more error-prone and just worse, but that's how LO code has been -// written and so there are many places in LO that expect this and -// do not work correctly with true 32bpp bitmaps. -// -// So ultimately the 24+8 split should be dumped (preferably in all of LO, -// not just the Skia-related code), but until all of LO works correctly -// with 32bpp keep this disabled in order to avoid such breakages. - -//#define SKIA_USE_BITMAP32 1 -#define SKIA_USE_BITMAP32 0 - - // GPU support (set by configure). #undef SK_GANESH // Vulkan support enabled (set by configure). diff --git a/configure.ac b/configure.ac index f3761d0eeca6..f8433c6655a2 100644 --- a/configure.ac +++ b/configure.ac @@ -8013,6 +8013,21 @@ AC_SUBST(HARDENING_LDFLAGS) AC_SUBST(HARDENING_CFLAGS) AC_SUBST(HARDENING_OPT_CFLAGS) +if test "$GCC" = yes && test "$COM_IS_CLANG" != TRUE; then + AC_MSG_CHECKING([whether $CXX_BASE supports -Wsfinae-incomplete]) + AC_LANG_PUSH([C++]) + save_CXXFLAGS=$CFLAGS + CXXFLAGS="$CXXFLAGS -Werror" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #pragma GCC diagnostic warning "-Wsfinae-incomplete" + ])], [ + AC_DEFINE([HAVE_GCC_WSFINAE_INCOMPLETE]) + AC_MSG_RESULT([yes]) + ], [AC_MSG_RESULT([no])]) + CXXFLAGS=$save_CXXFLAGS + AC_LANG_POP([C++]) +fi + dnl =================================================================== dnl Identify the C++ library dnl =================================================================== diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 4dd7d5b8e9f3..4420a63e38d9 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -68,7 +68,7 @@ namespace dbtools css::util::Date const & DBTypeConversion::getStandardDate() { - static css::util::Date STANDARD_DB_DATE(1,1,1900); + static css::util::Date STANDARD_DB_DATE(30,12,1899); return STANDARD_DB_DATE; } diff --git a/cui/inc/personas.hrc b/cui/inc/personas.hrc deleted file mode 100644 index 6b101717dcaa..000000000000 --- a/cui/inc/personas.hrc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#pragma once - -#include <sal/types.h> -#include <unotools/resmgr.hxx> - -#include <utility> - -#define NC_(Context, String) TranslateId(Context, u8##String) - -// it must be synchronized with extras/source/gallery/personas/personas_list.txt -std::pair<TranslateId, sal_uInt16> RID_PERSONAS_COLOR[] = -{ - { NC_("RID_CUI_PERSONAS_COLOR", "White") , 0 }, - { NC_("RID_CUI_PERSONAS_COLOR", "Gray") , 1 }, - { NC_("RID_CUI_PERSONAS_COLOR", "Dark") , 2 }, - { NC_("RID_CUI_PERSONAS_COLOR", "Pink") , 3 }, - { NC_("RID_CUI_PERSONAS_COLOR", "Sand") , 4 }, - { NC_("RID_CUI_PERSONAS_COLOR", "Green") , 5 }, -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx index dd036c37bb28..e0b299cc680d 100644 --- a/cui/source/dialogs/FontFeaturesDialog.cxx +++ b/cui/source/dialogs/FontFeaturesDialog.cxx @@ -203,7 +203,7 @@ void FontFeaturesDialog::updateFontPreview() IMPL_LINK(FontFeatureItem, CheckBoxToggledHdl, weld::Toggleable&, rToggle, void) { - m_aTriStateEnabled.ButtonToggled(rToggle); + m_aTriStateEnabled.CheckButtonToggled(*m_xCheck); m_aTriStateEnabled.bTriStateEnabled = false; m_aToggleHdl.Call(rToggle); } diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 67efd02ea178..a7d3b695bafa 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -21,7 +21,6 @@ #include <editeng/shaditem.hxx> #include <svtools/ctrlbox.hxx> #include <vcl/weld.hxx> -#include <svtools/valueset.hxx> #include <sfx2/tabdlg.hxx> #include <svx/algitem.hxx> #include <svx/colorbox.hxx> @@ -41,7 +40,7 @@ namespace editeng class ShadowControlsWrapper { public: - explicit ShadowControlsWrapper(ValueSet& rVsPos, weld::MetricSpinButton& rMfSize, ColorListBox& rLbColor); + explicit ShadowControlsWrapper(weld::IconView& rIvPos, weld::MetricSpinButton& rMfSize, ColorListBox& rLbColor); SvxShadowItem GetControlValue(const SvxShadowItem& rItem) const; void SetControlValue(const SvxShadowItem& rItem); @@ -50,9 +49,10 @@ public: bool get_value_changed_from_saved() const; private: - ValueSet& mrVsPos; + weld::IconView& mrIvPos; weld::MetricSpinButton& mrMfSize; ColorListBox& mrLbColor; + OUString msSavedShadowItemId; }; class MarginControlsWrapper @@ -121,8 +121,7 @@ private: // Controls svx::FrameSelector m_aFrameSel; - std::unique_ptr<ValueSet> m_xWndPresets; - std::unique_ptr<weld::CustomWeld> m_xWndPresetsWin; + std::unique_ptr<weld::IconView> m_xWndPresets; std::unique_ptr<weld::Label> m_xUserDefFT; std::unique_ptr<weld::CustomWeld> m_xFrameSelWin; @@ -143,8 +142,7 @@ private: std::unique_ptr<weld::CheckButton> m_xSynchronizeCB; std::unique_ptr<weld::Container> m_xShadowFrame; - std::unique_ptr<ValueSet> m_xWndShadows; - std::unique_ptr<weld::CustomWeld> m_xWndShadowsWin; + std::unique_ptr<weld::IconView> m_xWndShadows; std::unique_ptr<weld::Label> m_xFtShadowSize; std::unique_ptr<weld::MetricSpinButton> m_xEdShadowSize; std::unique_ptr<weld::Label> m_xFtShadowColor; @@ -162,21 +160,24 @@ private: // Handler DECL_LINK(SelStyleHdl_Impl, SvtLineListBox&, void); DECL_LINK(SelColHdl_Impl, ColorListBox&, void); - DECL_LINK(SelPreHdl_Impl, ValueSet*, void); - DECL_LINK(SelSdwHdl_Impl, ValueSet*, void); + DECL_LINK(SelPreHdl_Impl, weld::IconView&, void); + DECL_LINK(FocusOutPresets_Impl, weld::Widget&, void); + DECL_LINK(SelSdwHdl_Impl, weld::IconView&, void); DECL_LINK(LinesChanged_Impl, LinkParamNone*, void); DECL_LINK(ModifyDistanceHdl_Impl, weld::MetricSpinButton&, void); DECL_LINK(ModifyWidthLBHdl_Impl, weld::ComboBox&, void); DECL_LINK(ModifyWidthMFHdl_Impl, weld::MetricSpinButton&, void); DECL_LINK(SyncHdl_Impl, weld::Toggleable&, void); DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::Toggleable&, void); + DECL_LINK(QueryTooltipPreHdl, const weld::TreeIter&, OUString); + DECL_LINK(QueryTooltipSdwHdl, const weld::TreeIter&, OUString); - sal_uInt16 GetPresetImageId(sal_uInt16 nValueSetIdx) const; - TranslateId GetPresetStringId(sal_uInt16 nValueSetIdx) const; + sal_uInt16 GetPresetImageId(sal_uInt16 nIconViewIdx) const; + OUString GetPresetName(sal_uInt16 nIconViewIdx) const; - void FillPresetVS(); - void FillShadowVS(); - void FillValueSets(); + void FillPresetIV(); + void FillShadowIV(); + void FillIconViews(); void SetLineWidth(sal_Int64 nWidth, sal_Int32 nRemovedType = 0); // Filler @@ -189,6 +190,9 @@ private: bool IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const; void UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset ); + + static OUString GetShadowTypeName(sal_uInt16 nIconViewIdx); + static BitmapEx GetPreviewAsBitmap(const Image& rImage); }; diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 638350f515b0..987a42157327 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -752,31 +752,31 @@ bool AlignmentTabPage::HasAlignmentChanged( const SfxItemSet& rNew, TypedWhichId return eMethodOld != eMethodNew; } -IMPL_LINK(AlignmentTabPage, StackedClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(AlignmentTabPage, StackedClickHdl, weld::Toggleable&, void) { - m_aStackedState.ButtonToggled(rToggle); + m_aStackedState.CheckButtonToggled(*m_xCbStacked); UpdateEnableControls(); } -IMPL_LINK(AlignmentTabPage, AsianModeClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(AlignmentTabPage, AsianModeClickHdl, weld::Toggleable&, void) { - m_aAsianModeState.ButtonToggled(rToggle); + m_aAsianModeState.CheckButtonToggled(*m_xCbAsianMode); } -IMPL_LINK(AlignmentTabPage, WrapClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(AlignmentTabPage, WrapClickHdl, weld::Toggleable&, void) { - m_aWrapState.ButtonToggled(rToggle); + m_aWrapState.CheckButtonToggled(*m_xBtnWrap); UpdateEnableControls(); } -IMPL_LINK(AlignmentTabPage, HyphenClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(AlignmentTabPage, HyphenClickHdl, weld::Toggleable&, void) { - m_aHyphenState.ButtonToggled(rToggle); + m_aHyphenState.CheckButtonToggled(*m_xBtnHyphen); } -IMPL_LINK(AlignmentTabPage, ShrinkClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(AlignmentTabPage, ShrinkClickHdl, weld::Toggleable&, void) { - m_aShrinkState.ButtonToggled(rToggle); + m_aShrinkState.CheckButtonToggled(*m_xBtnShrink); } IMPL_LINK_NOARG(AlignmentTabPage, UpdateEnableHdl, weld::ComboBox&, void) diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 781fecdb4d14..e38e0ff8100b 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -45,6 +45,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <comphelper/lok.hxx> #include <svtools/unitconv.hxx> +#include <vcl/virdev.hxx> using namespace ::editeng; using ::com::sun::star::uno::Reference; @@ -141,8 +142,8 @@ const sal_uInt16 BORDER_PRESET_COUNT = 5; // number of shadow images to show const sal_uInt16 BORDER_SHADOW_COUNT = 5; -ShadowControlsWrapper::ShadowControlsWrapper(ValueSet& rVsPos, weld::MetricSpinButton& rMfSize, ColorListBox& rLbColor) - : mrVsPos(rVsPos) +ShadowControlsWrapper::ShadowControlsWrapper(weld::IconView& rIvPos, weld::MetricSpinButton& rMfSize, ColorListBox& rLbColor) + : mrIvPos(rIvPos) , mrMfSize(rMfSize) , mrLbColor(rLbColor) { @@ -151,9 +152,11 @@ ShadowControlsWrapper::ShadowControlsWrapper(ValueSet& rVsPos, weld::MetricSpinB SvxShadowItem ShadowControlsWrapper::GetControlValue(const SvxShadowItem& rItem) const { SvxShadowItem aItem(rItem); - if (!mrVsPos.IsNoSelection()) + OUString sSelectedId = mrIvPos.get_selected_id(); + if (!sSelectedId.isEmpty()) { - switch (mrVsPos.GetSelectedItemId()) + sal_Int32 nSelectedId = sSelectedId.toInt32(); + switch (nSelectedId) { case 1: aItem.SetLocation(SvxShadowLocation::NONE); @@ -190,25 +193,25 @@ void ShadowControlsWrapper::SetControlValue(const SvxShadowItem& rItem) switch (rItem.GetLocation()) { case SvxShadowLocation::NONE: - mrVsPos.SelectItem(1); + mrIvPos.select(0); break; case SvxShadowLocation::BottomRight: - mrVsPos.SelectItem(2); + mrIvPos.select(1); break; case SvxShadowLocation::TopRight: - mrVsPos.SelectItem(3); + mrIvPos.select(2); break; case SvxShadowLocation::BottomLeft: - mrVsPos.SelectItem(4); + mrIvPos.select(3); break; case SvxShadowLocation::TopLeft: - mrVsPos.SelectItem(5); + mrIvPos.select(4); break; default: - mrVsPos.SetNoSelection(); + mrIvPos.unselect_all(); break; } - mrVsPos.SaveValue(); + msSavedShadowItemId = mrIvPos.get_selected_id(); mrMfSize.set_value(mrMfSize.normalize(rItem.GetWidth()), FieldUnit::TWIP); mrMfSize.save_value(); mrLbColor.SelectEntry(rItem.GetColor()); @@ -217,14 +220,14 @@ void ShadowControlsWrapper::SetControlValue(const SvxShadowItem& rItem) bool ShadowControlsWrapper::get_value_changed_from_saved() const { - return mrVsPos.IsValueChangedFromSaved() || + return (mrIvPos.get_selected_id() != msSavedShadowItemId) || mrMfSize.get_value_changed_from_saved() || mrLbColor.IsValueChangedFromSaved(); } void ShadowControlsWrapper::SetControlDontKnow() { - mrVsPos.SetNoSelection(); + mrIvPos.unselect_all(); mrMfSize.set_text(u""_ustr); mrLbColor.SetNoSelection(); } @@ -299,8 +302,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle , mbSync(true) , mbRemoveAdjacentCellBorders(false) , bIsCalcDoc(false) - , m_xWndPresets(new ValueSet(nullptr)) - , m_xWndPresetsWin(new weld::CustomWeld(*m_xBuilder, u"presets"_ustr, *m_xWndPresets)) + , m_xWndPresets(m_xBuilder->weld_icon_view(u"presets"_ustr)) , m_xUserDefFT(m_xBuilder->weld_label(u"userdefft"_ustr)) , m_xFrameSelWin(new weld::CustomWeld(*m_xBuilder, u"framesel"_ustr, m_aFrameSel)) , m_xLbLineStyle(new SvtLineListBox(m_xBuilder->weld_menu_button(u"linestylelb"_ustr))) @@ -319,8 +321,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle , m_xBottomMF(m_xBuilder->weld_metric_spin_button(u"bottommf"_ustr, FieldUnit::MM)) , m_xSynchronizeCB(m_xBuilder->weld_check_button(u"sync"_ustr)) , m_xShadowFrame(m_xBuilder->weld_container(u"shadow"_ustr)) - , m_xWndShadows(new ValueSet(nullptr)) - , m_xWndShadowsWin(new weld::CustomWeld(*m_xBuilder, u"shadows"_ustr, *m_xWndShadows)) + , m_xWndShadows(m_xBuilder->weld_icon_view(u"shadows"_ustr)) , m_xFtShadowSize(m_xBuilder->weld_label(u"distanceft"_ustr)) , m_xEdShadowSize(m_xBuilder->weld_metric_spin_button(u"distancemf"_ustr, FieldUnit::MM)) , m_xFtShadowColor(m_xBuilder->weld_label(u"shadowcolorft"_ustr)) @@ -530,10 +531,13 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle m_xLbLineColor->SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl ) ); m_xLineWidthLB->connect_changed(LINK(this, SvxBorderTabPage, ModifyWidthLBHdl_Impl)); m_xLineWidthMF->connect_value_changed(LINK(this, SvxBorderTabPage, ModifyWidthMFHdl_Impl)); - m_xWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl ) ); - m_xWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl ) ); + m_xWndPresets->connect_selection_changed( LINK( this, SvxBorderTabPage, SelPreHdl_Impl ) ); + m_xWndPresets->connect_focus_out(LINK(this, SvxBorderTabPage, FocusOutPresets_Impl)); + m_xWndShadows->connect_selection_changed( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl ) ); + m_xWndPresets->connect_query_tooltip( LINK( this, SvxBorderTabPage, QueryTooltipPreHdl ) ); + m_xWndShadows->connect_query_tooltip( LINK( this, SvxBorderTabPage, QueryTooltipSdwHdl ) ); - FillValueSets(); + FillIconViews(); FillLineListBox_Impl(); // Reapply line width: probably one of predefined values should be selected @@ -593,13 +597,9 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle SvxBorderTabPage::~SvxBorderTabPage() { m_xLbShadowColor.reset(); - m_xWndShadowsWin.reset(); - m_xWndShadows.reset(); m_xLbLineColor.reset(); m_xLbLineStyle.reset(); m_xFrameSelWin.reset(); - m_xWndPresetsWin.reset(); - m_xWndPresets.reset(); } std::unique_ptr<SfxTabPage> SvxBorderTabPage::Create( weld::Container* pPage, weld::DialogController* pController, @@ -823,13 +823,14 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet ) SelColHdl_Impl(*m_xLbLineColor); } - bool bEnable = m_xWndShadows->GetSelectedItemId() > 1 ; + OUString sShadowSelectedId = m_xWndShadows->get_selected_id(); + bool bEnable = !sShadowSelectedId.isEmpty() && sShadowSelectedId.toInt32() > 1 ; m_xFtShadowSize->set_sensitive(bEnable); m_xEdShadowSize->set_sensitive(bEnable); m_xFtShadowColor->set_sensitive(bEnable); m_xLbShadowColor->set_sensitive(bEnable); - m_xWndPresets->SetNoSelection(); + m_xWndPresets->unselect_all(); // - no line - should not be selected @@ -857,9 +858,13 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet ) { m_xUserDefFT->set_sensitive(false); m_xFrameSelWin->set_sensitive(false); - m_xWndPresets->RemoveItem(3); - m_xWndPresets->RemoveItem(4); - m_xWndPresets->RemoveItem(5); + + if( m_xWndPresets->n_children() > 4 ) + { + m_xWndPresets->remove(4); + m_xWndPresets->remove(3); + m_xWndPresets->remove(2); + } } } } @@ -1150,7 +1155,7 @@ void SvxBorderTabPage::HideShadowControls() #define IID_PRE_TABLE_ALL 20 #define IID_PRE_TABLE_OUTER2 21 -IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, ValueSet*, void) +IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, weld::IconView&, void) { const svx::FrameBorderState SHOW = svx::FrameBorderState::Show; const svx::FrameBorderState HIDE = svx::FrameBorderState::Hide; @@ -1187,7 +1192,8 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, ValueSet*, void) m_aFrameSel.DeselectAllBorders(); // Using image ID to find correct line in table above. - sal_uInt16 nLine = GetPresetImageId( m_xWndPresets->GetSelectedItemId() ) - 1; + sal_uInt16 nSelectedId = m_xWndPresets->get_selected_id().toUInt32(); + sal_uInt16 nLine = GetPresetImageId(nSelectedId) - 1; // Apply all styles from the table for( int nBorder = 0; nBorder < svx::FRAMEBORDERTYPE_COUNT; ++nBorder ) @@ -1213,22 +1219,45 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, ValueSet*, void) SelColHdl_Impl(*m_xLbLineColor); } - // Presets ValueSet does not show a selection (used as push buttons). - m_xWndPresets->SetNoSelection(); - LinesChanged_Impl( nullptr ); UpdateRemoveAdjCellBorderCB( nLine + 1 ); } -IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl, ValueSet*, void) +IMPL_LINK_NOARG(SvxBorderTabPage, FocusOutPresets_Impl, weld::Widget&, void) +{ + // no longer show preset as selected, as it would become out of sync + // if borders are changed manually + m_xWndPresets->unselect_all(); +} + +IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl, weld::IconView&, void) { - bool bEnable = m_xWndShadows->GetSelectedItemId() > 1; + OUString sSelectedId = m_xWndShadows->get_selected_id(); + bool bEnable = !sSelectedId.isEmpty() && sSelectedId.toInt32() > 1; m_xFtShadowSize->set_sensitive(bEnable); m_xEdShadowSize->set_sensitive(bEnable); m_xFtShadowColor->set_sensitive(bEnable); m_xLbShadowColor->set_sensitive(bEnable); } +IMPL_LINK(SvxBorderTabPage, QueryTooltipPreHdl, const weld::TreeIter&, iter, OUString) +{ + const OUString sId = m_xWndPresets->get_id(iter); + if (!sId.isEmpty()) + return GetPresetName(sId.toInt32()); + + return OUString(); +} + +IMPL_LINK(SvxBorderTabPage, QueryTooltipSdwHdl, const weld::TreeIter&, iter, OUString) +{ + const OUString sId = m_xWndShadows->get_id(iter); + if (!sId.isEmpty()) + return GetShadowTypeName(sId.toInt32()); + + return OUString(); +} + IMPL_LINK(SvxBorderTabPage, SelColHdl_Impl, ColorListBox&, rColorBox, void) { const NamedColor& aNamedColor = rColorBox.GetSelectedEntry(); @@ -1336,8 +1365,8 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void) } -// ValueSet handling -sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const +// IconView handling +sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nIconViewIdx ) const { // table with all sets of predefined border styles static const sal_uInt16 ppnImgIds[][ BORDER_PRESET_COUNT ] = @@ -1365,12 +1394,26 @@ sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const else nLine = 4; - DBG_ASSERT( (1 <= nValueSetIdx) && (nValueSetIdx <= BORDER_PRESET_COUNT), + DBG_ASSERT( (1 <= nIconViewIdx) && (nIconViewIdx <= BORDER_PRESET_COUNT), "SvxBorderTabPage::GetPresetImageId - wrong index" ); - return ppnImgIds[ nLine ][ nValueSetIdx - 1 ]; + return ppnImgIds[ nLine ][ nIconViewIdx - 1 ]; +} + +OUString SvxBorderTabPage::GetShadowTypeName(sal_uInt16 nIconViewIdx) +{ + static const TranslateId pnStrIds[ BORDER_SHADOW_COUNT ] = + { + RID_CUISTR_SHADOW_STYLE_NONE, + RID_CUISTR_SHADOW_STYLE_BOTTOMRIGHT, + RID_CUISTR_SHADOW_STYLE_TOPRIGHT, + RID_CUISTR_SHADOW_STYLE_BOTTOMLEFT, + RID_CUISTR_SHADOW_STYLE_TOPLEFT + }; + + return CuiResId(pnStrIds[nIconViewIdx - 1]); } -TranslateId SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const +OUString SvxBorderTabPage::GetPresetName(sal_uInt16 nIconViewIdx) const { // string resource IDs for each image (in order of the IID_PRE_* image IDs) static const TranslateId pnStrIds[] = @@ -1400,58 +1443,59 @@ TranslateId SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const RID_SVXSTR_TABLE_PRESET_OUTERALL, RID_SVXSTR_TABLE_PRESET_OUTERINNER }; - return pnStrIds[ GetPresetImageId( nValueSetIdx ) - 1 ]; + return SvxResId(pnStrIds[GetPresetImageId(nIconViewIdx) - 1]); } -void SvxBorderTabPage::FillPresetVS() +void SvxBorderTabPage::FillPresetIV() { - // basic initialization of the ValueSet - m_xWndPresets->SetStyle( m_xWndPresets->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER ); - m_xWndPresets->SetColCount( BORDER_PRESET_COUNT ); + m_xWndPresets->clear(); - // insert images and help texts - for( sal_uInt16 nVSIdx = 1; nVSIdx <= BORDER_PRESET_COUNT; ++nVSIdx ) + for( sal_uInt16 nIdx = 1; nIdx <= BORDER_PRESET_COUNT; ++nIdx ) { - m_xWndPresets->InsertItem( nVSIdx ); - m_xWndPresets->SetItemImage(nVSIdx, m_aBorderImgVec[GetPresetImageId(nVSIdx) - 1]); - m_xWndPresets->SetItemText( nVSIdx, SvxResId( GetPresetStringId( nVSIdx ) ) ); + OUString sId = OUString::number(nIdx); + BitmapEx aPreviewBitmap = GetPreviewAsBitmap(m_aBorderImgVec[GetPresetImageId(nIdx) - 1]); + m_xWndPresets->insert(-1, nullptr, &sId, &aPreviewBitmap, nullptr); + m_xWndPresets->set_item_accessible_name(m_xWndPresets->n_children() - 1, + GetPresetName(nIdx)); } // show the control - m_xWndPresets->SetNoSelection(); - m_xWndPresets->SetOptimalSize(); - m_xWndPresets->Show(); + m_xWndPresets->unselect_all(); } -void SvxBorderTabPage::FillShadowVS() +void SvxBorderTabPage::FillShadowIV() { - // basic initialization of the ValueSet - m_xWndShadows->SetStyle( m_xWndShadows->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER ); - m_xWndShadows->SetColCount( BORDER_SHADOW_COUNT ); - - // string resource IDs for each image - static const TranslateId pnStrIds[ BORDER_SHADOW_COUNT ] = - { RID_CUISTR_SHADOW_STYLE_NONE, RID_CUISTR_SHADOW_STYLE_BOTTOMRIGHT, RID_CUISTR_SHADOW_STYLE_TOPRIGHT, RID_CUISTR_SHADOW_STYLE_BOTTOMLEFT, RID_CUISTR_SHADOW_STYLE_TOPLEFT }; + // Clear any existing items + m_xWndShadows->clear(); // insert images and help texts - for( sal_uInt16 nVSIdx = 1; nVSIdx <= BORDER_SHADOW_COUNT; ++nVSIdx ) + for( sal_uInt16 nIdx = 1; nIdx <= BORDER_SHADOW_COUNT; ++nIdx ) { - m_xWndShadows->InsertItem( nVSIdx ); - m_xWndShadows->SetItemImage(nVSIdx, m_aShadowImgVec[nVSIdx-1]); - m_xWndShadows->SetItemText( nVSIdx, CuiResId( pnStrIds[ nVSIdx - 1 ] ) ); + OUString sId = OUString::number(nIdx); + BitmapEx aPreviewBitmap = GetPreviewAsBitmap(m_aShadowImgVec[nIdx-1]); + m_xWndShadows->insert(-1, nullptr, &sId, &aPreviewBitmap, nullptr); + m_xWndShadows->set_item_accessible_name(m_xWndShadows->n_children() - 1, + GetShadowTypeName(nIdx)); } // show the control - m_xWndShadows->SelectItem( 1 ); - m_xWndShadows->SetOptimalSize(); - m_xWndShadows->Show(); + m_xWndShadows->select(0); } +BitmapEx SvxBorderTabPage::GetPreviewAsBitmap(const Image& rImage) +{ + BitmapEx aPreviewBitmap = rImage.GetBitmapEx(); + ScopedVclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); + if (pVDev->GetDPIScaleFactor() > 1) + aPreviewBitmap.Scale(pVDev->GetDPIScaleFactor(), pVDev->GetDPIScaleFactor()); + + return aPreviewBitmap; +} -void SvxBorderTabPage::FillValueSets() +void SvxBorderTabPage::FillIconViews() { - FillPresetVS(); - FillShadowVS(); + FillPresetIV(); + FillShadowIV(); } void SvxBorderTabPage::SetLineWidth( sal_Int64 nWidth, sal_Int32 nRemovedType ) diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index cbc58dfedaed..978ed42ee460 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1641,9 +1641,9 @@ void SvxCharEffectsPage::SelectHdl_Impl(const weld::ComboBox* pBox) UpdatePreview_Impl(); } -IMPL_LINK(SvxCharEffectsPage, CbClickHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxCharEffectsPage, CbClickHdl_Impl, weld::Toggleable&, void) { - m_aIndividualWordsState.ButtonToggled(rToggle); + m_aIndividualWordsState.CheckButtonToggled(*m_xIndividualWordsBtn); UpdatePreview_Impl(); UpdatePreview_Impl(); } @@ -2031,20 +2031,20 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) ChangesApplied(); } -IMPL_LINK(SvxCharEffectsPage, HiddenBtnClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxCharEffectsPage, HiddenBtnClickHdl, weld::Toggleable&, void) { - m_aHiddenState.ButtonToggled(rToggle); + m_aHiddenState.CheckButtonToggled(*m_xHiddenBtn); } -IMPL_LINK(SvxCharEffectsPage, OutlineBtnClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxCharEffectsPage, OutlineBtnClickHdl, weld::Toggleable&, void) { - m_aOutlineState.ButtonToggled(rToggle); + m_aOutlineState.CheckButtonToggled(*m_xOutlineBtn); UpdatePreview_Impl(); } -IMPL_LINK(SvxCharEffectsPage, ShadowBtnClickHdl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxCharEffectsPage, ShadowBtnClickHdl, weld::Toggleable&, void) { - m_aShadowState.ButtonToggled(rToggle); + m_aShadowState.CheckButtonToggled(*m_xShadowBtn); UpdatePreview_Impl(); } diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 427c6a00c391..b589e0f09636 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -255,65 +255,63 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) { css::drawing::MeasureTextVertPos eVPos = rAttrs->Get( SDRATTR_MEASURETEXTVPOS ).GetValue(); + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::INVALID ) { - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::INVALID ) + css::drawing::MeasureTextHorzPos eHPos = + rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue(); + RectPoint eRP = RectPoint::MM; + switch( eVPos ) { - css::drawing::MeasureTextHorzPos eHPos = - rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue(); - RectPoint eRP = RectPoint::MM; - switch( eVPos ) + case css::drawing::MeasureTextVertPos_EAST: + switch( eHPos ) { - case css::drawing::MeasureTextVertPos_EAST: - switch( eHPos ) - { - case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: eRP = RectPoint::LT; break; - case css::drawing::MeasureTextHorzPos_INSIDE: eRP = RectPoint::MT; break; - case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: eRP = RectPoint::RT; break; - case css::drawing::MeasureTextHorzPos_AUTO: eRP = RectPoint::MT; break; - default: break; - } - break; - case css::drawing::MeasureTextVertPos_CENTERED: - case css::drawing::MeasureTextVertPos_AUTO: - switch( eHPos ) - { - case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: eRP = RectPoint::LM; break; - case css::drawing::MeasureTextHorzPos_INSIDE: eRP = RectPoint::MM; break; - case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: eRP = RectPoint::RM; break; - case css::drawing::MeasureTextHorzPos_AUTO: eRP = RectPoint::MM; break; - default: break; - } - break; - case css::drawing::MeasureTextVertPos_WEST: - switch( eHPos ) - { - case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: eRP = RectPoint::LB; break; - case css::drawing::MeasureTextHorzPos_INSIDE: eRP = RectPoint::MB; break; - case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: eRP = RectPoint::RB; break; - case css::drawing::MeasureTextHorzPos_AUTO: eRP = RectPoint::MB; break; - default: break; - } - break; - default: ;//prevent warning + case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: eRP = RectPoint::LT; break; + case css::drawing::MeasureTextHorzPos_INSIDE: eRP = RectPoint::MT; break; + case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: eRP = RectPoint::RT; break; + case css::drawing::MeasureTextHorzPos_AUTO: eRP = RectPoint::MT; break; + default: break; } - - CTL_STATE nState = CTL_STATE::NONE; - - if (eHPos == css::drawing::MeasureTextHorzPos_AUTO) + break; + case css::drawing::MeasureTextVertPos_CENTERED: + case css::drawing::MeasureTextVertPos_AUTO: + switch( eHPos ) { - m_xTsbAutoPosH->set_state( TRISTATE_TRUE ); - nState = CTL_STATE::NOHORZ; + case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: eRP = RectPoint::LM; break; + case css::drawing::MeasureTextHorzPos_INSIDE: eRP = RectPoint::MM; break; + case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: eRP = RectPoint::RM; break; + case css::drawing::MeasureTextHorzPos_AUTO: eRP = RectPoint::MM; break; + default: break; } - - if (eVPos == css::drawing::MeasureTextVertPos_AUTO) + break; + case css::drawing::MeasureTextVertPos_WEST: + switch( eHPos ) { - m_xTsbAutoPosV->set_state( TRISTATE_TRUE ); - nState |= CTL_STATE::NOVERT; + case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: eRP = RectPoint::LB; break; + case css::drawing::MeasureTextHorzPos_INSIDE: eRP = RectPoint::MB; break; + case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: eRP = RectPoint::RB; break; + case css::drawing::MeasureTextHorzPos_AUTO: eRP = RectPoint::MB; break; + default: break; } + break; + default: ;//prevent warning + } + + CTL_STATE nState = CTL_STATE::NONE; - m_aCtlPosition.SetState(nState); - m_aCtlPosition.SetActualRP(eRP); + if (eHPos == css::drawing::MeasureTextHorzPos_AUTO) + { + m_xTsbAutoPosH->set_state( TRISTATE_TRUE ); + nState = CTL_STATE::NOHORZ; } + + if (eVPos == css::drawing::MeasureTextVertPos_AUTO) + { + m_xTsbAutoPosV->set_state( TRISTATE_TRUE ); + nState |= CTL_STATE::NOVERT; + } + + m_aCtlPosition.SetState(nState); + m_aCtlPosition.SetActualRP(eRP); } } else diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 212b523d6ebb..ce13e2acfdb0 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -2606,9 +2606,9 @@ void SvxExtParagraphTabPage::PageBreakHdl() } } -IMPL_LINK(SvxExtParagraphTabPage, PageBreakHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl, weld::Toggleable&, void) { - aPageBreakState.ButtonToggled(rToggle); + aPageBreakState.CheckButtonToggled(*m_xPageBreakBox); PageBreakHdl(); } @@ -2619,9 +2619,9 @@ void SvxExtParagraphTabPage::AllowSplitHdl() m_xOrphanBox->set_sensitive(bEnable); } -IMPL_LINK(SvxExtParagraphTabPage, AllowSplitHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, AllowSplitHdl_Impl, weld::Toggleable&, void) { - aAllowSplitState.ButtonToggled(rToggle); + aAllowSplitState.CheckButtonToggled(*m_xAllowSplitBox); AllowSplitHdl(); } @@ -2645,15 +2645,15 @@ void SvxExtParagraphTabPage::WidowHdl() } } -IMPL_LINK(SvxExtParagraphTabPage, WidowHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, WidowHdl_Impl, weld::Toggleable&, void) { - aWidowState.ButtonToggled(rToggle); + aWidowState.CheckButtonToggled(*m_xWidowBox); WidowHdl(); } -IMPL_LINK(SvxExtParagraphTabPage, OrphanHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, OrphanHdl_Impl, weld::Toggleable&, void) { - aOrphanState.ButtonToggled(rToggle); + aOrphanState.CheckButtonToggled(*m_xOrphanBox); OrphanHdl(); } @@ -2717,9 +2717,9 @@ void SvxExtParagraphTabPage::HyphenClickHdl() m_xHyphenBox->set_state(bEnable ? TRISTATE_TRUE : TRISTATE_FALSE); } -IMPL_LINK(SvxExtParagraphTabPage, HyphenClickHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, HyphenClickHdl_Impl, weld::Toggleable&, void) { - aHyphenState.ButtonToggled(rToggle); + aHyphenState.CheckButtonToggled(*m_xHyphenBox); HyphenClickHdl(); } @@ -2743,9 +2743,9 @@ void SvxExtParagraphTabPage::ApplyCollClickHdl() } } -IMPL_LINK(SvxExtParagraphTabPage, ApplyCollClickHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, ApplyCollClickHdl_Impl, weld::Toggleable&, void) { - aApplyCollState.ButtonToggled(rToggle); + aApplyCollState.CheckButtonToggled(*m_xApplyCollBtn); ApplyCollClickHdl(); } @@ -2795,15 +2795,15 @@ void SvxExtParagraphTabPage::PageNumBoxClickHdl() m_xPagenumEdit->set_sensitive(m_xPageNumBox->get_state() == TRISTATE_TRUE); } -IMPL_LINK(SvxExtParagraphTabPage, PageNumBoxClickHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageNumBoxClickHdl_Impl, weld::Toggleable&, void) { - aPageNumState.ButtonToggled(rToggle); + aPageNumState.CheckButtonToggled(*m_xPageNumBox); PageNumBoxClickHdl(); } -IMPL_LINK(SvxExtParagraphTabPage, KeepParaBoxClickHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, KeepParaBoxClickHdl_Impl, weld::Toggleable&, void) { - aKeepParaState.ButtonToggled(rToggle); + aKeepParaState.CheckButtonToggled(*m_xKeepParaBox); } void SvxExtParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) @@ -2815,9 +2815,9 @@ void SvxExtParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) DisablePageBreak(); } -IMPL_LINK(SvxExtParagraphTabPage, AcrossParagraphHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, AcrossParagraphHdl_Impl, weld::Toggleable&, void) { - aAcrossParagraphState.ButtonToggled(rToggle); + aAcrossParagraphState.CheckButtonToggled(*m_xAcrossParagraphBox); if (m_xAcrossParagraphBox->get_state() != TRISTATE_TRUE ) { m_xAcrossColumnBox->set_state( TRISTATE_FALSE ); @@ -2840,9 +2840,9 @@ IMPL_LINK(SvxExtParagraphTabPage, AcrossParagraphHdl_Impl, weld::Toggleable&, rT } } -IMPL_LINK(SvxExtParagraphTabPage, AcrossColumnHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, AcrossColumnHdl_Impl, weld::Toggleable&, void) { - aAcrossColumnState.ButtonToggled(rToggle); + aAcrossColumnState.CheckButtonToggled(*m_xAcrossColumnBox); if (m_xAcrossColumnBox->get_state() != TRISTATE_TRUE ) { m_xAcrossPageBox->set_state( TRISTATE_FALSE ); @@ -2865,9 +2865,9 @@ IMPL_LINK(SvxExtParagraphTabPage, AcrossColumnHdl_Impl, weld::Toggleable&, rTogg } } -IMPL_LINK(SvxExtParagraphTabPage, AcrossPageHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, AcrossPageHdl_Impl, weld::Toggleable&, void) { - aAcrossPageState.ButtonToggled(rToggle); + aAcrossPageState.CheckButtonToggled(*m_xAcrossPageBox); if (m_xAcrossPageBox->get_state() == TRISTATE_TRUE ) { m_xAcrossParagraphBox->set_state( TRISTATE_TRUE ); @@ -2892,9 +2892,9 @@ IMPL_LINK(SvxExtParagraphTabPage, AcrossPageHdl_Impl, weld::Toggleable&, rToggle } } -IMPL_LINK(SvxExtParagraphTabPage, AcrossSpreadHdl_Impl, weld::Toggleable&, rToggle, void) +IMPL_LINK_NOARG(SvxExtParagraphTabPage, AcrossSpreadHdl_Impl, weld::Toggleable&, void) { - aAcrossSpreadState.ButtonToggled(rToggle); + aAcrossSpreadState.CheckButtonToggled(*m_xAcrossSpreadBox); if (m_xAcrossSpreadBox->get_state() == TRISTATE_TRUE ) { m_xAcrossParagraphBox->set_state( TRISTATE_TRUE ); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 72a2f2ab60b3..a88640beed12 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -770,7 +770,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) } if (m_xPositionCB->get_state_changed_from_saved()) { - if (m_xPositionCB->get_inconsistent()) + if (m_xPositionCB->get_state() == TRISTATE_INDET) rSet->InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_POS ); else rSet->Put( @@ -781,7 +781,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) if (m_xSizeCB->get_state_changed_from_saved()) { - if (m_xSizeCB->get_inconsistent()) + if (m_xSizeCB->get_state() == TRISTATE_INDET) rSet->InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_SIZE ); else rSet->Put( @@ -948,7 +948,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet) } else { - m_xPositionCB->set_inconsistent(true); + m_xPositionCB->set_state(TRISTATE_INDET); } m_xPositionCB->save_state(); @@ -960,7 +960,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet) m_xSizeCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue()); } else - m_xSizeCB->set_inconsistent(true); + m_xSizeCB->set_state(TRISTATE_INDET); m_xSizeCB->save_state(); pItem = GetItem( *rSet, SID_HTML_MODE ); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 8e573635aeb5..80ed92a94c81 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -929,7 +929,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) if (m_xTsbPosProtect->get_state_changed_from_saved()) { - if( m_xTsbPosProtect->get_inconsistent() ) + if (m_xTsbPosProtect->get_state() == TRISTATE_INDET) { rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_POS ); } @@ -969,7 +969,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) if (m_xTsbSizeProtect->get_state_changed_from_saved()) { - if ( m_xTsbSizeProtect->get_inconsistent() ) + if (m_xTsbSizeProtect->get_state() == TRISTATE_INDET) rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_SIZE ); else rOutAttrs->Put( @@ -982,7 +982,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) { if (!mbIgnoreAutoGrowWidth) { - if( m_xTsbAutoGrowWidth->get_inconsistent() ) + if (m_xTsbAutoGrowWidth->get_state() == TRISTATE_INDET) rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_AUTOWIDTH ); else rOutAttrs->Put( @@ -996,7 +996,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) { if (!mbIgnoreAutoGrowHeight) { - if (m_xTsbAutoGrowHeight->get_inconsistent()) + if (m_xTsbAutoGrowHeight->get_state() == TRISTATE_INDET) { rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_AUTOHEIGHT ); } @@ -1042,7 +1042,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* ) } else { - m_xTsbPosProtect->set_inconsistent(true); + m_xTsbPosProtect->set_state(TRISTATE_INDET); } m_xTsbPosProtect->save_state(); @@ -1076,7 +1076,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* ) m_xTsbSizeProtect->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue()); } else - m_xTsbSizeProtect->set_inconsistent(true); + m_xTsbSizeProtect->set_state(TRISTATE_INDET); pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_AUTOWIDTH ); if ( pItem ) @@ -1084,7 +1084,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* ) m_xTsbAutoGrowWidth->set_active(static_cast<const SfxBoolItem*>( pItem )->GetValue()); } else - m_xTsbAutoGrowWidth->set_inconsistent(true); + m_xTsbAutoGrowWidth->set_state(TRISTATE_INDET); pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_AUTOHEIGHT ); if ( pItem ) @@ -1092,7 +1092,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* ) m_xTsbAutoGrowHeight->set_active(static_cast<const SfxBoolItem*>( pItem )->GetValue()); } else - m_xTsbAutoGrowHeight->set_inconsistent(true); + m_xTsbAutoGrowHeight->set_state(TRISTATE_INDET); // Is matching set? OUString aStr = GetUserData(); diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui index c642c8d97b5f..a0894be689a7 100644 --- a/cui/uiconfig/ui/borderpage.ui +++ b/cui/uiconfig/ui/borderpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> @@ -35,6 +35,22 @@ <property name="step-increment">0.10</property> <property name="page-increment">1</property> </object> + <object class="GtkTreeStore" id="presets_liststore"> + <columns> + <!-- column-name pixbuf --> + <column type="GdkPixbuf"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkTreeStore" id="shadows_liststore"> + <columns> + <!-- column-name pixbuf --> + <column type="GdkPixbuf"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> <!-- n-columns=2 n-rows=3 --> <object class="GtkGrid" id="BorderPage"> <property name="visible">True</property> @@ -115,10 +131,22 @@ </packing> </child> <child> - <object class="GtkDrawingArea" id="presets"> + <object class="GtkScrolledWindow" id="presets_scrolled_window"> <property name="visible">True</property> <property name="can-focus">True</property> - <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> + <child> + <object class="GtkIconView" id="presets"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="model">presets_liststore</property> + <property name="pixbuf-column">0</property> + <property name="columns">5</property> + <property name="activate-on-single-click">True</property> + </object> + </child> </object> <packing> <property name="left-attach">1</property> @@ -520,10 +548,22 @@ <property name="row-spacing">3</property> <property name="column-spacing">6</property> <child> - <object class="GtkDrawingArea" id="shadows"> + <object class="GtkScrolledWindow" id="shadows_scrolled_window"> <property name="visible">True</property> <property name="can-focus">True</property> - <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> + <child> + <object class="GtkIconView" id="shadows"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="model">shadows_liststore</property> + <property name="pixbuf-column">0</property> + <property name="columns">5</property> + <property name="activate-on-single-click">True</property> + </object> + </child> </object> <packing> <property name="left-attach">1</property> @@ -724,13 +764,11 @@ <widget name="label15"/> <widget name="linestylelb"/> <widget name="label22"/> - <widget name="shadows"/> </widgets> </object> <object class="GtkSizeGroup" id="sizegroupWidgets"> <property name="ignore-hidden">True</property> <widgets> - <widget name="presets"/> <widget name="frameselwin"/> <widget name="linestylelb"/> <widget name="linecolorlb"/> diff --git a/cui/uiconfig/ui/positionsizedialog.ui b/cui/uiconfig/ui/positionsizedialog.ui index 2fe4f2d7f64f..d687eced33b2 100644 --- a/cui/uiconfig/ui/positionsizedialog.ui +++ b/cui/uiconfig/ui/positionsizedialog.ui @@ -1,34 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkDialog" id="PositionAndSizeDialog"> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="title" translatable="yes" context="positionsizedialog|PositionAndSizeDialog">Position and Size</property> <property name="resizable">False</property> <property name="modal">True</property> - <property name="default_width">0</property> - <property name="default_height">0</property> - <property name="type_hint">dialog</property> - <child> - <placeholder/> - </child> + <property name="default-width">0</property> + <property name="default-height">0</property> + <property name="type-hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="reset"> <property name="label" translatable="yes" context="stock">_Reset</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -41,10 +38,10 @@ <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -57,8 +54,8 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -71,8 +68,8 @@ <object class="GtkButton" id="help"> <property name="label" translatable="yes" context="stock">_Help</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -86,47 +83,23 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkNotebook" id="tabcontrol"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="scrollable">True</property> - <property name="enable_popup">True</property> + <property name="enable-popup">True</property> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -135,42 +108,18 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_POSITION_SIZE"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="positionsizedialog|RID_SVXPAGE_POSITION_SIZE">Position and Size</property> </object> <packing> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -182,43 +131,19 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_SWPOSSIZE"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="positionsizedialog|RID_SVXPAGE_SWPOSSIZE">Position and Size</property> </object> <packing> <property name="position">1</property> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -230,43 +155,19 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_ANGLE"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="positionsizedialog|RID_SVXPAGE_ANGLE">Rotation</property> </object> <packing> <property name="position">2</property> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -278,12 +179,12 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_SLANT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="positionsizedialog|RID_SVXPAGE_SLANT">Slant & Corner Radius</property> </object> <packing> <property name="position">3</property> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> </object> diff --git a/cui/uiconfig/ui/rotationtabpage.ui b/cui/uiconfig/ui/rotationtabpage.ui index 8fc381928d76..eeaba0544e2f 100644 --- a/cui/uiconfig/ui/rotationtabpage.ui +++ b/cui/uiconfig/ui/rotationtabpage.ui @@ -1,87 +1,87 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustmentANGLE"> <property name="upper">360</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustmentPOS1"> <property name="lower">-500</property> <property name="upper">50000</property> - <property name="step_increment">10</property> - <property name="page_increment">10</property> + <property name="step-increment">10</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustmentPOS2"> <property name="lower">-500</property> <property name="upper">50000</property> - <property name="step_increment">10</property> - <property name="page_increment">10</property> + <property name="step-increment">10</property> + <property name="page-increment">10</property> </object> <object class="GtkBox" id="Rotation"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child> <object class="GtkFrame" id="FL_POSITION"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">12</property> - <property name="homogeneous">True</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="spacing">12</property> + <property name="homogeneous">True</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="FT_POS_X"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|FT_POS_X">Position _X:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_POS_X</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_POS_X</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="FT_POS_Y"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|FT_POS_Y">Position _Y:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_POS_Y</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_POS_Y</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_POS_X"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentPOS1</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_POS_X-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="rotationtabpage|extended_tip|MTR_FLD_POS_X">Enter the horizontal distance from the left edge of the page to the pivot point.</property> @@ -89,18 +89,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_POS_Y"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentPOS2</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_POS_Y-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="rotationtabpage|extended_tip|MTR_FLD_POS_Y">Enter the vertical distance from the top edge of the page to the pivot point.</property> @@ -108,8 +108,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -122,28 +122,28 @@ <child> <object class="GtkBox" id="box3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="valign">center</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="CTL_RECT"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> - <property name="tooltip_text" translatable="yes" context="rotationtabpage|CTL_RECT|tooltip_text">Rotation point</property> + <property name="tooltip-text" translatable="yes" context="rotationtabpage|CTL_RECT|tooltip_text">Rotation point</property> <child internal-child="accessible"> <object class="AtkObject" id="CTL_RECT-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="rotationtabpage|extended_tip|CTL_RECT">Click where you want to place the pivot point.</property> @@ -163,10 +163,10 @@ <child> <object class="GtkLabel" id="FT_POSPRESETS"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|FT_POSPRESETS">_Default settings:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">CTL_RECT</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">CTL_RECT</property> </object> <packing> <property name="expand">False</property> @@ -186,7 +186,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|label1">Pivot Point</property> <property name="xalign">0</property> <attributes> @@ -204,30 +204,30 @@ <child> <object class="GtkFrame" id="FL_ANGLE"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkBox" id="box4"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">12</property> - <property name="homogeneous">True</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="spacing">12</property> + <property name="homogeneous">True</property> <child> <object class="GtkBox" id="box5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">start</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="FT_ANGLE"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|FT_ANGLE">_Angle:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">NF_ANGLE</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">NF_ANGLE</property> <property name="xalign">0</property> </object> <packing> @@ -239,12 +239,12 @@ <child> <object class="GtkSpinButton" id="NF_ANGLE"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentANGLE</property> <property name="digits">2</property> <property name="wrap">True</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="NF_ANGLE-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="rotationtabpage|extended_tip|NF_ANGLE">Enter the number of degrees that you want to rotate the selected object.</property> @@ -267,15 +267,15 @@ <child> <object class="GtkBox" id="box6"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkDrawingArea" id="CTL_ANGLE"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> - <property name="tooltip_text" translatable="yes" context="rotationtabpage|CTL_ANGLE|tooltip_text">Rotation Angle</property> + <property name="tooltip-text" translatable="yes" context="rotationtabpage|CTL_ANGLE|tooltip_text">Rotation Angle</property> <property name="halign">center</property> <child internal-child="accessible"> <object class="AtkObject" id="CTL_ANGLE-atkobject"> @@ -292,10 +292,10 @@ <child> <object class="GtkLabel" id="FT_ANGLEPRESETS"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|FT_ANGLEPRESETS">Default _settings:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">CTL_ANGLE</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">CTL_ANGLE</property> </object> <packing> <property name="expand">False</property> @@ -315,7 +315,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="rotationtabpage|label2">Rotation Angle</property> <property name="xalign">0</property> <attributes> diff --git a/cui/uiconfig/ui/slantcornertabpage.ui b/cui/uiconfig/ui/slantcornertabpage.ui index ca8dca1bdcb0..bc995d794e30 100644 --- a/cui/uiconfig/ui/slantcornertabpage.ui +++ b/cui/uiconfig/ui/slantcornertabpage.ui @@ -1,73 +1,73 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment2"> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment3"> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment4"> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustmentRADIUS"> <property name="upper">500</property> - <property name="step_increment">10</property> - <property name="page_increment">10</property> + <property name="step-increment">10</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustmentSLANT"> <property name="lower">-89</property> <property name="upper">89</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="SlantAndCornerRadius"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="row_spacing">24</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> + <property name="row-spacing">24</property> + <property name="column-spacing">12</property> <child> <object class="GtkFrame" id="controlgroups1"> <property name="visible">True</property> <property name="sensitive">False</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">12</property> - <property name="column_spacing">6</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">12</property> + <property name="column-spacing">6</property> <child> <object class="GtkBox" id="controlgroupx1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label5">_X:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">controlx1</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">controlx1</property> <property name="xalign">0</property> </object> <packing> @@ -79,11 +79,11 @@ <child> <object class="GtkSpinButton" id="controlx1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment1</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="controlx1-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="slantcornertabpage|extended_tip|controlx1">Enter the X coordinate of the control point 1</property> @@ -98,22 +98,22 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkBox" id="controlgroupy1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label6">_Y:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">controly1</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">controly1</property> <property name="xalign">0</property> </object> <packing> @@ -125,11 +125,11 @@ <child> <object class="GtkSpinButton" id="controly1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment3</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="controly1-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="slantcornertabpage|extended_tip|controly1">Enter the Y coordinate of the control point 1</property> @@ -144,8 +144,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -153,7 +153,7 @@ <child type="label"> <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label3">Control Point 1</property> <property name="xalign">0</property> <attributes> @@ -163,46 +163,46 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkFrame" id="FL_RADIUS"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="FT_RADIUS"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|FT_RADIUS">_Radius:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_RADIUS</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_RADIUS</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_RADIUS"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentRADIUS</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_RADIUS-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="slantcornertabpage|extended_tip|MTR_FLD_RADIUS">Enter the radius of the circle that you want to use to round the corners.</property> @@ -210,8 +210,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -219,7 +219,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label1">Corner Radius</property> <property name="xalign">0</property> <attributes> @@ -229,46 +229,46 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="FL_SLANT"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="FT_ANGLE"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|FT_ANGLE">_Angle:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_ANGLE</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_ANGLE</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_ANGLE"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentSLANT</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_ANGLE-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="slantcornertabpage|extended_tip|MTR_FLD_ANGLE">Enter the angle of the slant axis.</property> @@ -276,8 +276,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -285,7 +285,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label2">Slant</property> <property name="xalign">0</property> <attributes> @@ -295,38 +295,38 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="controlgroups2"> <property name="visible">True</property> <property name="sensitive">False</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="grid4"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">12</property> - <property name="column_spacing">6</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">12</property> + <property name="column-spacing">6</property> <child> <object class="GtkBox" id="controlgroupx2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label4">_X:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">controlx2</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">controlx2</property> <property name="xalign">0</property> </object> <packing> @@ -338,11 +338,11 @@ <child> <object class="GtkSpinButton" id="controlx2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment2</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="controlx2-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="slantcornertabpage|extended_tip|controlx2">Enter the X coordinate of the control point 2</property> @@ -357,22 +357,22 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkBox" id="controlgroupy2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label7">_Y:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">controly2</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">controly2</property> <property name="xalign">0</property> </object> <packing> @@ -384,11 +384,11 @@ <child> <object class="GtkSpinButton" id="controly2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment4</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="controly2-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="slantcornertabpage|extended_tip|controly2">Enter the Y coordinate of the control point 2</property> @@ -403,8 +403,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -412,7 +412,7 @@ <child type="label"> <object class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="slantcornertabpage|label8">Control Point 2</property> <property name="xalign">0</property> <attributes> @@ -422,8 +422,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child internal-child="accessible"> diff --git a/cui/uiconfig/ui/textanimtabpage.ui b/cui/uiconfig/ui/textanimtabpage.ui index 01e449dfc28b..dc287487f218 100644 --- a/cui/uiconfig/ui/textanimtabpage.ui +++ b/cui/uiconfig/ui/textanimtabpage.ui @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustmentAMOUNT"> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustmentCOUNT"> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustmentDELAY"> <property name="upper">30000</property> @@ -19,48 +19,48 @@ </object> <object class="GtkImage" id="imageDOWN"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-down</property> </object> <object class="GtkImage" id="imageLEFT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="imageRIGHT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-next</property> </object> <object class="GtkImage" id="imageUP"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-up</property> </object> <object class="GtkBox" id="TextAnimation"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkFrame"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="spacing">12</property> <child> <object class="GtkComboBoxText" id="LB_EFFECT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <items> <item id="0" translatable="yes" context="textanimtabpage|liststoreEFFECT">No Effect</item> @@ -84,17 +84,17 @@ <child> <object class="GtkBox" id="boxDIRECTION"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> <property name="hexpand">True</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="FT_DIRECTION"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textanimtabpage|FT_DIRECTION">Direction:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">grid1</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">grid1</property> </object> <packing> <property name="expand">False</property> @@ -103,20 +103,20 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkToggleButton" id="BTN_UP"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="textanimtabpage|BTN_UP|tooltip_text">To top</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="textanimtabpage|BTN_UP|tooltip_text">To top</property> <property name="halign">center</property> <property name="hexpand">True</property> <property name="image">imageUP</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="BTN_UP-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="textanimtabpage|BTN_UP-atkobject">Up</property> @@ -125,20 +125,20 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkToggleButton" id="BTN_RIGHT"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="textanimtabpage|BTN_RIGHT|tooltip_text">To right</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="textanimtabpage|BTN_RIGHT|tooltip_text">To right</property> <property name="halign">center</property> <property name="hexpand">True</property> <property name="image">imageRIGHT</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="BTN_RIGHT-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="textanimtabpage|BTN_RIGHT-atkobject">Right</property> @@ -147,20 +147,20 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> + <property name="left-attach">2</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkToggleButton" id="BTN_LEFT"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="textanimtabpage|BTN_LEFT|tooltip_text">To left</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="textanimtabpage|BTN_LEFT|tooltip_text">To left</property> <property name="halign">center</property> <property name="hexpand">True</property> <property name="image">imageLEFT</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="BTN_LEFT-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="textanimtabpage|BTN_LEFT-atkobject">Left</property> @@ -169,20 +169,20 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkToggleButton" id="BTN_DOWN"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="textanimtabpage|BTN_DOWN|tooltip_text">To bottom</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="textanimtabpage|BTN_DOWN|tooltip_text">To bottom</property> <property name="halign">center</property> <property name="hexpand">True</property> <property name="image">imageDOWN</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="BTN_DOWN-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="textanimtabpage|BTN_DOWN-atkobject">Down</property> @@ -191,8 +191,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> @@ -229,10 +229,10 @@ <child type="label"> <object class="GtkLabel" id="FT_EFFECTS"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textanimtabpage|FT_EFFECTS">E_ffect</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">LB_EFFECT</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">LB_EFFECT</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -248,27 +248,27 @@ <child> <object class="GtkFrame" id="FL_PROPERTIES"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=5 --> <object class="GtkGrid" id="box4"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkCheckButton" id="TSB_START_INSIDE"> <property name="label" translatable="yes" context="textanimtabpage|TSB_START_INSIDE">S_tart inside</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_START_INSIDE-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textanimtabpage|extended_tip|TSB_START_INSIDE">Text is visible and inside the drawing object when the effect is applied.</property> @@ -276,8 +276,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> <property name="width">2</property> </packing> </child> @@ -285,11 +285,11 @@ <object class="GtkCheckButton" id="TSB_STOP_INSIDE"> <property name="label" translatable="yes" context="textanimtabpage|TSB_STOP_INSIDE">Text _visible when exiting</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_STOP_INSIDE-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textanimtabpage|extended_tip|TSB_STOP_INSIDE">Text remains visible after the effect is applied.</property> @@ -297,27 +297,27 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkLabel" id="FT_COUNT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textanimtabpage|FT_COUNT">Animation cycles:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkBox" id="boxCOUNT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> <property name="margin-start">12</property> <property name="spacing">12</property> @@ -325,11 +325,11 @@ <object class="GtkCheckButton" id="TSB_ENDLESS"> <property name="label" translatable="yes" context="textanimtabpage|TSB_ENDLESS">_Continuous</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <accessibility> <relation type="label-for" target="NUM_FLD_COUNT"/> </accessibility> @@ -348,9 +348,9 @@ <child> <object class="GtkSpinButton" id="NUM_FLD_COUNT"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentCOUNT</property> <accessibility> @@ -370,26 +370,26 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkLabel" id="FT_AMOUNT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textanimtabpage|FT_AMOUNT">Increment:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkBox" id="boxAMOUNT"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> <property name="margin-start">12</property> <property name="spacing">12</property> @@ -397,11 +397,11 @@ <object class="GtkCheckButton" id="TSB_PIXEL"> <property name="label" translatable="yes" context="textanimtabpage|TSB_PIXEL">_Pixels</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <accessibility> <relation type="label-for" target="MTR_FLD_AMOUNT"/> </accessibility> @@ -420,9 +420,9 @@ <child> <object class="GtkSpinButton" id="MTR_FLD_AMOUNT"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentAMOUNT</property> <accessibility> @@ -442,26 +442,26 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> + <property name="left-attach">1</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkLabel" id="FT_DELAY"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textanimtabpage|FT_DELAY">Delay:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> + <property name="left-attach">0</property> + <property name="top-attach">4</property> </packing> </child> <child> <object class="GtkBox" id="boxDELAY"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> <property name="margin-start">12</property> <property name="spacing">12</property> @@ -469,11 +469,11 @@ <object class="GtkCheckButton" id="TSB_AUTO"> <property name="label" translatable="yes" context="textanimtabpage|TSB_AUTO">_Automatic</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <accessibility> <relation type="label-for" target="MTR_FLD_DELAY"/> </accessibility> @@ -492,9 +492,9 @@ <child> <object class="GtkSpinButton" id="MTR_FLD_DELAY"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <property name="adjustment">adjustmentDELAY</property> <accessibility> @@ -514,8 +514,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">4</property> + <property name="left-attach">1</property> + <property name="top-attach">4</property> </packing> </child> </object> @@ -523,7 +523,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textanimtabpage|label2">Properties</property> <property name="xalign">0</property> <attributes> diff --git a/cui/uiconfig/ui/textattrtabpage.ui b/cui/uiconfig/ui/textattrtabpage.ui index 610a59c72806..87dadab83c7b 100644 --- a/cui/uiconfig/ui/textattrtabpage.ui +++ b/cui/uiconfig/ui/textattrtabpage.ui @@ -1,67 +1,67 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> <property name="lower">-100</property> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment2"> <property name="lower">-100</property> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment3"> <property name="lower">-100</property> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment4"> <property name="lower">-100</property> <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkBox" id="TextAttributesPage"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_homogeneous">True</property> + <property name="can-focus">False</property> + <property name="column-homogeneous">True</property> <child> <object class="GtkFrame" id="drawingtext"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkCheckButton" id="TSB_AUTOGROW_WIDTH"> <property name="label" translatable="yes" context="textattrtabpage|TSB_AUTOGROW_WIDTH">Fit wi_dth to text</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_AUTOGROW_WIDTH-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_AUTOGROW_WIDTH">Expands the width of the object to the width of the text, if the object is smaller than the text.</property> @@ -69,19 +69,19 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkCheckButton" id="TSB_AUTOGROW_HEIGHT"> <property name="label" translatable="yes" context="textattrtabpage|TSB_AUTOGROW_HEIGHT">Fit h_eight to text</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_AUTOGROW_HEIGHT-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_AUTOGROW_HEIGHT">Expands the height of the object to the height of the text, if the object is smaller than the text.</property> @@ -89,19 +89,19 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkCheckButton" id="TSB_FIT_TO_SIZE"> <property name="label" translatable="yes" context="textattrtabpage|TSB_FIT_TO_SIZE">_Fit to frame</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_FIT_TO_SIZE-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_FIT_TO_SIZE">Resizes the text to fit the entire area of the drawing or text object.</property> @@ -109,19 +109,19 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkCheckButton" id="TSB_CONTOUR"> <property name="label" translatable="yes" context="textattrtabpage|TSB_CONTOUR">_Adjust to contour</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_CONTOUR-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_CONTOUR">Adapts the text flow so that it matches the contours of the selected drawing object.</property> @@ -129,8 +129,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> </object> @@ -138,7 +138,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label1">Drawing Object Text</property> <property name="xalign">0</property> <attributes> @@ -148,34 +148,34 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="customshapetext"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkCheckButton" id="TSB_WORDWRAP_TEXT"> <property name="label" translatable="yes" context="textattrtabpage|TSB_WORDWRAP_TEXT">_Word wrap text in shape</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_WORDWRAP_TEXT-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_WORDWRAP_TEXT">Wraps the text that you add after double-clicking a custom shape to fit inside the shape.</property> @@ -183,19 +183,19 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkCheckButton" id="TSB_AUTOGROW_SIZE"> <property name="label" translatable="yes" context="textattrtabpage|TSB_AUTOGROW_SIZE">_Resize shape to fit text</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_AUTOGROW_SIZE-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_AUTOGROW_SIZE">Resizes a custom shape to fit the text that you enter after double-clicking the shape.</property> @@ -203,8 +203,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -212,7 +212,7 @@ <child type="label"> <object class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label8">Custom Shape Text</property> <property name="xalign">0</property> <attributes> @@ -222,8 +222,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -236,87 +236,87 @@ <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="spacing">18</property> <child> <object class="GtkFrame" id="FL_DISTANCE"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=4 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label4">_Left:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_LEFT</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_LEFT</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label5">_Right:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_RIGHT</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_RIGHT</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label6">_Top:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_TOP</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_TOP</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label7">_Bottom:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">MTR_FLD_BOTTOM</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">MTR_FLD_BOTTOM</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_LEFT"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment1</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_LEFT-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|MTR_FLD_LEFT">Enter the amount of space to leave between the left edge of the drawing or text object and the left border of the text.</property> @@ -324,18 +324,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_RIGHT"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment2</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_RIGHT-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|MTR_FLD_RIGHT">Enter the amount of space to leave between the right edge of the drawing or text object and the right border of the text.</property> @@ -343,18 +343,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_TOP"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment3</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_TOP-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|MTR_FLD_TOP">Enter the amount of space to leave between the top edge of the drawing or text object and the upper border of the text.</property> @@ -362,18 +362,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkSpinButton" id="MTR_FLD_BOTTOM"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment4</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="MTR_FLD_BOTTOM-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|MTR_FLD_BOTTOM">Enter the amount of space to leave between the bottom edge of the drawing or text object and the lower border of the text.</property> @@ -381,8 +381,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> + <property name="left-attach">1</property> + <property name="top-attach">3</property> </packing> </child> </object> @@ -390,7 +390,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label2">Spacing to Borders</property> <property name="xalign">0</property> <attributes> @@ -408,34 +408,34 @@ <child> <object class="GtkFrame" id="FL_POSITION"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkBox" id="box3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> <property name="valign">center</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="CTL_POSITION"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> <child internal-child="accessible"> <object class="AtkObject" id="CTL_POSITION-atkobject"> @@ -457,11 +457,11 @@ <object class="GtkCheckButton" id="TSB_FULL_WIDTH"> <property name="label" translatable="yes" context="textattrtabpage|TSB_FULL_WIDTH">Full _width</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="TSB_FULL_WIDTH-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="textattrtabpage|extended_tip|TSB_FULL_WIDTH">Anchors the text to the full width of the drawing object or text object.</property> @@ -479,7 +479,7 @@ <child type="label"> <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textattrtabpage|label3">Text Anchor</property> <attributes> <attribute name="weight" value="bold"/> diff --git a/cui/uiconfig/ui/textdialog.ui b/cui/uiconfig/ui/textdialog.ui index 6cde38354a2a..f5d28ea45480 100644 --- a/cui/uiconfig/ui/textdialog.ui +++ b/cui/uiconfig/ui/textdialog.ui @@ -1,31 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.4 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkDialog" id="TextDialog"> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="title" translatable="yes" context="textdialog|TextDialog">Text</property> <property name="resizable">False</property> <property name="modal">True</property> - <property name="default_width">0</property> - <property name="default_height">0</property> - <property name="type_hint">dialog</property> + <property name="default-width">0</property> + <property name="default-height">0</property> + <property name="type-hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="reset"> <property name="label" translatable="yes" context="stock">_Reset</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -38,10 +38,10 @@ <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -54,8 +54,8 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -68,8 +68,8 @@ <object class="GtkButton" id="help"> <property name="label" translatable="yes" context="stock">_Help</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -83,47 +83,23 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkNotebook" id="tabcontrol"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="scrollable">True</property> - <property name="enable_popup">True</property> + <property name="enable-popup">True</property> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -132,42 +108,18 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_TEXTATTR"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textdialog|RID_SVXPAGE_TEXTATTR">Text</property> </object> <packing> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -179,43 +131,19 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_TEXTANIMATION"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textdialog|RID_SVXPAGE_TEXTANIMATION">Text Animation</property> </object> <packing> <property name="position">1</property> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> + <property name="can-focus">False</property> <child> <placeholder/> </child> @@ -227,12 +155,12 @@ <child type="tab"> <object class="GtkLabel" id="RID_SVXPAGE_TEXTCOLUMNS"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="textdialog|RID_SVXPAGE_TEXTCOLUMNS">Text Columns</property> </object> <packing> <property name="position">2</property> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> </object> @@ -250,8 +178,5 @@ <action-widget response="-6">cancel</action-widget> <action-widget response="-11">help</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> </interface> diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 08d9211d4fc9..2e9a33a50bfe 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1319,10 +1319,19 @@ OUString OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldD ::comphelper::getNumberFormatProperty(xNumberFormatter,nFormatKey,u"Locale"_ustr) >>= aLocale; sal_Int32 nNumberFormat = ::comphelper::getNumberFormatType(xNumberFormatter,nFormatKey); - if( (nNumberFormat & css::util::NumberFormat::DATE) == css::util::NumberFormat::DATE - || (nNumberFormat & css::util::NumberFormat::DATETIME) == css::util::NumberFormat::DATETIME ) + if (nNumberFormat & css::util::NumberFormat::DATE) { - nValue = DBTypeConversion::toNullDate(DBTypeConversion::getNULLDate(xNumberFormatter->getNumberFormatsSupplier()),nValue); + bool bDoCorrect = true; + if (!sDefault.isEmpty()) + { + // nValue was converted from that string. If that string was a date, nValue + // is already in the required epoch, and we should not try to correct it + sal_Int32 nFormatKeyOf_sDefault = xNumberFormatter->detectNumberFormat(nFormatKey, sDefault); + sal_Int16 nNumberFormatType = comphelper::getNumberFormatType(xNumberFormatter, nFormatKeyOf_sDefault); + bDoCorrect = (nNumberFormatType & css::util::NumberFormat::DATE) == 0; + } + if (bDoCorrect) + nValue = DBTypeConversion::toNullDate(DBTypeConversion::getNULLDate(xNumberFormatter->getNumberFormatsSupplier()),nValue); } Reference< css::util::XNumberFormatPreviewer> xPreviewer(xNumberFormatter,UNO_QUERY); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 09d7430fc926..12c479b75b03 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -117,16 +117,17 @@ namespace dbaui IMPL_LINK(SpecialSettingsPage, OnTriStateToggleHdl, weld::Toggleable&, rToggle, void) { auto eOldState = m_aTriStates[&rToggle]; + weld::CheckButton& rCheckButton = dynamic_cast<weld::CheckButton&>(rToggle); switch (eOldState) { case TRISTATE_INDET: - rToggle.set_state(TRISTATE_FALSE); + rCheckButton.set_state(TRISTATE_FALSE); break; case TRISTATE_TRUE: - rToggle.set_state(TRISTATE_INDET); + rCheckButton.set_state(TRISTATE_INDET); break; case TRISTATE_FALSE: - rToggle.set_state(TRISTATE_TRUE); + rCheckButton.set_state(TRISTATE_TRUE); break; } m_aTriStates[&rToggle] = rToggle.get_state(); diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 6c94efbfe93b..4e24628d95a7 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -122,6 +122,7 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/app/cmdlinehelp \ desktop/source/app/desktopcontext \ desktop/source/app/dispatchwatcher \ + desktop/source/app/initjsunoscripting \ desktop/source/app/langselect \ desktop/source/app/lockfile2 \ desktop/source/app/officeipcthread \ diff --git a/vcl/inc/accessibility/AccessibleIconView.hxx b/desktop/inc/initjsunoscripting.hxx index a128af5009e4..ccfe9fd1d5fa 100644 --- a/vcl/inc/accessibility/AccessibleIconView.hxx +++ b/desktop/inc/initjsunoscripting.hxx @@ -11,17 +11,10 @@ #include <sal/config.h> -#include "accessiblelistbox.hxx" +#if defined EMSCRIPTEN -class AccessibleIconView final : public AccessibleListBox -{ -public: - AccessibleIconView(SvTreeListBox& _rListBox, - const css::uno::Reference<css::accessibility::XAccessible>& _xParent); +void initJsUnoScripting(); -protected: - // VCLXAccessibleComponent - virtual void ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) override; -}; +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 231aea8d0f3c..975482466baa 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2522,6 +2522,7 @@ void DesktopLOKTest::testPaintPartTileDifferentSchemes() constexpr int nPixelX = 128; constexpr int nPixelY = 128 * nCanvasWidth; + // this is BGRA format data std::array<sal_uInt8, nCanvasWidth * nCanvasHeight * 4> aPixels; // Both parts should be painted with dark scheme diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 5d575934063c..f4fd9c621c87 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -19,13 +19,11 @@ #include <algorithm> -#include <cassert> -#include <cstdint> -#include <string> #include <vector> #include <app.hxx> #include <dp_shared.hxx> +#include <initjsunoscripting.hxx> #include "cmdlineargs.hxx" #include <strings.hrc> #include <com/sun/star/lang/XInitialization.hpp> @@ -36,7 +34,6 @@ #include <officecfg/Setup.hxx> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> -#include <rtl/uri.hxx> #include <sal/log.hxx> #include <comphelper/diagnose_ex.hxx> @@ -49,103 +46,10 @@ #include <iostream> #include <map> -#if defined EMSCRIPTEN -#include <emscripten.h> -#include <emscripten/threading.h> -#include <emscripten/val.h> -#include <bindings_uno.hxx> -#include <config_emscripten.h> -#endif - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ucb; -#if defined EMSCRIPTEN - -namespace { - -extern "C" void getUnoScriptUrls(std::vector<std::u16string> * urls) { - assert(urls != nullptr); - OUString const base(emscripten::val::global("document")["baseURI"].as<std::u16string>()); - auto const val = emscripten::val::module_property("uno_scripts"); - if (!val.isUndefined()) { - auto const len = val["length"].as<std::uint32_t>(); - for (std::uint32_t i = 0; i != len; ++i) { - urls->push_back( - std::u16string( - rtl::Uri::convertRelToAbs(base, OUString(val[i].as<std::u16string>())))); - } - } -} - -#if HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD -EM_JS(void, runUnoScriptUrls, (emscripten::EM_VAL handle), { - importScripts.apply(self, Emval.toValue(handle)); -}); -#else -EM_JS(void, runUnoScriptUrls, (emscripten::EM_VAL handle), { - const urls = Emval.toValue(handle); - function step() { - if (urls.length !== 0) { - const url = urls.shift(); - fetch(url).then(res => { - if (!res.ok) { - throw Error( - "Loading <" + res.url + "> failed with " + res.status + " " - + res.statusText); - } - return res.blob(); - }).then(blob => blob.text()).then(text => { eval(text); step(); }); - } - }; - step(); -}); -#endif - -EM_JS(void, setupMainChannel, (), { - const orig = self.onmessage; - self.onmessage = function(e) { - if (e.data.cmd === "LOWA-channel") { - self.onmessage = orig; - Module.uno_mainPort = e.ports[0]; - Module.uno_init$resolve(); - } else if (orig) { - orig(e); - } - }; -}); - -extern "C" void resolveUnoMain(pthread_t id) { -#if HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD - EM_ASM({ - const sofficeMain = PThread.pthreads[$0]; - const channel = new MessageChannel(); - sofficeMain.postMessage({cmd:"LOWA-channel"}, [channel.port2]); - Module.uno_main$resolve(channel.port1); - }, id); -#else - EM_ASM({ - const channel = new MessageChannel(); - postMessage({cmd:"LOWA-channel"}, [channel.port2]); - Module.uno_main$resolve(channel.port1); - }, id); -#endif -} - -void initUno() { - init_unoembind_uno(); - std::vector<std::u16string> urls; - emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VI, getUnoScriptUrls, &urls); - runUnoScriptUrls(emscripten::val::array(urls).as_handle()); - setupMainChannel(); - emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VI, resolveUnoMain, pthread_self()); -} - -} - -#endif - namespace desktop { @@ -179,7 +83,7 @@ void Desktop::InitApplicationServiceManager() #endif comphelper::setProcessServiceFactory(sm); #if defined EMSCRIPTEN - initUno(); + initJsUnoScripting(); #endif } diff --git a/desktop/source/app/initjsunoscripting.cxx b/desktop/source/app/initjsunoscripting.cxx new file mode 100644 index 000000000000..a7de93f5f4f4 --- /dev/null +++ b/desktop/source/app/initjsunoscripting.cxx @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <sal/config.h> + +#if defined EMSCRIPTEN + +#include <cassert> +#include <cstdint> +#include <string> +#include <vector> + +#include <pthread.h> + +#include <emscripten.h> +#include <emscripten/threading.h> +#include <emscripten/val.h> + +#include <bindings_uno.hxx> +#include <config_emscripten.h> +#include <rtl/uri.hxx> +#include <rtl/ustring.hxx> + +namespace { + +extern "C" void getUnoScriptUrls(std::vector<std::u16string> * urls) { + assert(urls != nullptr); + OUString const base(emscripten::val::global("document")["baseURI"].as<std::u16string>()); + auto const val = emscripten::val::module_property("uno_scripts"); + if (!val.isUndefined()) { + auto const len = val["length"].as<std::uint32_t>(); + for (std::uint32_t i = 0; i != len; ++i) { + urls->push_back( + std::u16string( + rtl::Uri::convertRelToAbs(base, OUString(val[i].as<std::u16string>())))); + } + } +} + +#if HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD +EM_JS(void, runUnoScriptUrls, (emscripten::EM_VAL handle), { + importScripts.apply(self, Emval.toValue(handle)); +}); +#else +EM_JS(void, runUnoScriptUrls, (emscripten::EM_VAL handle), { + const urls = Emval.toValue(handle); + function step() { + if (urls.length !== 0) { + const url = urls.shift(); + fetch(url).then(res => { + if (!res.ok) { + throw Error( + "Loading <" + res.url + "> failed with " + res.status + " " + + res.statusText); + } + return res.blob(); + }).then(blob => blob.text()).then(text => { eval(text); step(); }); + } + }; + step(); +}); +#endif + +EM_JS(void, setupMainChannel, (), { + const orig = self.onmessage; + self.onmessage = function(e) { + if (e.data.cmd === "LOWA-channel") { + self.onmessage = orig; + Module.uno_mainPort = e.ports[0]; + Module.uno_init$resolve(); + } else if (orig) { + orig(e); + } + }; +}); + +extern "C" void resolveUnoMain(pthread_t id) { +#if HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD + EM_ASM({ + const sofficeMain = PThread.pthreads[$0]; + const channel = new MessageChannel(); + sofficeMain.postMessage({cmd:"LOWA-channel"}, [channel.port2]); + Module.uno_main$resolve(channel.port1); + }, id); +#else + EM_ASM({ + const channel = new MessageChannel(); + postMessage({cmd:"LOWA-channel"}, [channel.port2]); + Module.uno_main$resolve(channel.port1); + }, id); +#endif +} + +} + +void initJsUnoScripting() { + init_unoembind_uno(); + std::vector<std::u16string> urls; + emscripten_sync_run_in_main_runtime_thread(EM_FUNC_SIG_VI, getUnoScriptUrls, &urls); + runUnoScriptUrls(emscripten::val::array(urls).as_handle()); + setupMainChannel(); + emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_VI, resolveUnoMain, pthread_self()); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 0e97be68ebc1..24e480b326c9 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -48,6 +48,7 @@ #include <dp_misc.h> #include "dp_gui_extensioncmdqueue.hxx" #include <ucbhelper/content.hxx> +#include <tools/urlobj.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/ref.hxx> #include <salhelper/thread.hxx> @@ -559,7 +560,20 @@ bool UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update ::ucbhelper::Content sourceContent; (void)dp_misc::create_ucb_content(&sourceContent, sDownloadURL, m_updateCmdEnv); - const OUString sTitle( StrTitle::getTitle( sourceContent ) ); + OUString sTitle(StrTitle::getTitle(sourceContent)); + if (sTitle.indexOf('.') < 0) + { + // The title could be changed due to redirection (seen with github URLs, which arrive + // something like 'eff2c80e-138d-4b06-8139-e433f4672379'). This will create problems in + // PackageRegistryImpl::bindPackage, where extension will be required to get mediatype. + // Try to restore the filename with extension from the URL. + // TODO: could also use Content-Disposition (RFC 6266), where the filename is provided. + INetURLObject aUrl(sDownloadURL); + aUrl.removeFinalSlash(); + OUString newTitle = aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset); + if (newTitle.indexOf('.') >= 0) + sTitle = newTitle; + } destFolderContent.transferContent( sourceContent, ::ucbhelper::InsertOperation::Copy, diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1b55caded471..ce25145c9604 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -212,6 +212,7 @@ #include <svx/pageitem.hxx> #include <app.hxx> +#include <initjsunoscripting.hxx> #include "../app/cmdlineargs.hxx" // We also need to hackily be able to start the main libreoffice thread: @@ -7768,6 +7769,10 @@ static bool initialize_uno(const OUString& aAppProgramURL) xSFactory.set(xFactory, uno::UNO_QUERY_THROW); comphelper::setProcessServiceFactory(xSFactory); +#if defined EMSCRIPTEN + initJsUnoScripting(); +#endif + SAL_INFO("lok", "Uno initialized - " << xContext.is()); // set UserInstallation to user profile dir in test/user-template diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c index 0b1cdd866337..c80980389181 100644 --- a/desktop/unx/source/start.c +++ b/desktop/unx/source/start.c @@ -587,7 +587,7 @@ static void extend_library_path(const char *new_element) rtl_uString *pEnvName=NULL, *pOrigEnvVar=NULL, *pNewEnvVar=NULL; rtl_uString_newFromAscii(&pEnvName, "LD_LIBRARY_PATH"); - rtl_uString_newFromAscii(&pNewEnvVar, new_element); + rtl_string2UString(&pNewEnvVar, new_element, strlen(new_element), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); osl_getEnvironment(pEnvName, &pOrigEnvVar); if (pOrigEnvVar && pOrigEnvVar->length) diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx index 13a1d3f1d1a4..43fbcc7027ae 100644 --- a/editeng/inc/editdoc.hxx +++ b/editeng/inc/editdoc.hxx @@ -215,6 +215,10 @@ public: { return *mpItemPool; } + void SetItemPool(SfxItemPool* pPool) + { + mpItemPool = pPool; + } void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd ); void InsertAttrib( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem& rPoolItem ); diff --git a/editeng/source/editeng/StripPortionsHelper.cxx b/editeng/source/editeng/StripPortionsHelper.cxx index cf8e59d6489e..808f848991a4 100644 --- a/editeng/source/editeng/StripPortionsHelper.cxx +++ b/editeng/source/editeng/StripPortionsHelper.cxx @@ -85,7 +85,8 @@ CheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, } rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> -buildTextPortionPrimitive(const DrawPortionInfo& rInfo, const OUString& rText, +buildTextPortionPrimitive(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, + const DrawPortionInfo& rInfo, const OUString& rText, const drawinglayer::attribute::FontAttribute& rFontAttribute, const std::vector<double>& rDXArray, const basegfx::B2DHomMatrix& rNewTransform) @@ -103,7 +104,9 @@ buildTextPortionPrimitive(const DrawPortionInfo& rInfo, const OUString& rText, } // tdf#167511 get FontColor, evtl. adapted for HighContrast - const Color aFontColor(Application::GetSettings().GetStyleSettings().GetHighContrastMode() + const bool bHighContrast(Application::GetSettings().GetStyleSettings().GetHighContrastMode() + && rViewInformation2D.getEditViewActive()); + const Color aFontColor(bHighContrast ? Application::GetSettings().GetStyleSettings().GetWindowTextColor() : rInfo.mrFont.GetColor()); const basegfx::BColor aBFontColor(aFontColor.getBColor()); @@ -222,6 +225,7 @@ buildTextPortionPrimitive(const DrawPortionInfo& rInfo, const OUString& rText, class DoCapitalsDrawPortionInfo : public SvxDoCapitals { private: + const drawinglayer::geometry::ViewInformation2D& mrViewInformation2D; drawinglayer::primitive2d::Primitive2DContainer& mrTarget; const basegfx::B2DHomMatrix& mrNewTransformA; const basegfx::B2DHomMatrix& mrNewTransformB; @@ -229,11 +233,13 @@ private: SvxFont m_aFont; public: - DoCapitalsDrawPortionInfo(drawinglayer::primitive2d::Primitive2DContainer& rTarget, + DoCapitalsDrawPortionInfo(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, + drawinglayer::primitive2d::Primitive2DContainer& rTarget, const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const DrawPortionInfo& rInfo) : SvxDoCapitals(rInfo.maText, rInfo.mnTextStart, rInfo.mnTextLen) + , mrViewInformation2D(rViewInformation2D) , mrTarget(rTarget) , mrNewTransformA(rNewTransformA) , mrNewTransformB(rNewTransformB) @@ -255,6 +261,7 @@ public: }; void CreateTextPortionPrimitivesFromDrawPortionInfo( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, drawinglayer::primitive2d::Primitive2DContainer& rTarget, const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const DrawPortionInfo& rInfo) @@ -340,7 +347,8 @@ void CreateTextPortionPrimitivesFromDrawPortionInfo( OUString caseMappedText = rInfo.mrFont.CalcCaseMap(rInfo.maText); rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> pNewPrimitive( - buildTextPortionPrimitive(rInfo, caseMappedText, aFontAttribute, aDXArray, aNewTransform)); + buildTextPortionPrimitive(rViewInformation2D, rInfo, caseMappedText, aFontAttribute, + aDXArray, aNewTransform)); bool bSmallCaps = rInfo.mrFont.IsCapital(); if (bSmallCaps && rInfo.mpDXArray.empty()) @@ -351,8 +359,8 @@ void CreateTextPortionPrimitivesFromDrawPortionInfo( if (bSmallCaps) { // rerun with each sub-portion - DoCapitalsDrawPortionInfo aDoDrawPortionInfo(rTarget, rNewTransformA, rNewTransformB, - rInfo); + DoCapitalsDrawPortionInfo aDoDrawPortionInfo(rViewInformation2D, rTarget, rNewTransformA, + rNewTransformB, rInfo); rInfo.mrFont.DoOnCapitals(aDoDrawPortionInfo); // transfer collected primitives from rTarget to a new container @@ -525,8 +533,8 @@ void DoCapitalsDrawPortionInfo::Do(const OUString& rSpanTxt, const sal_Int32 nSp nullptr, /* no field in subportion, handled outside */ false, false, false, m_rInfo.mpLocale, m_rInfo.maOverlineColor, m_rInfo.maTextLineColor); - CreateTextPortionPrimitivesFromDrawPortionInfo(mrTarget, mrNewTransformA, mrNewTransformB, - aInfo); + CreateTextPortionPrimitivesFromDrawPortionInfo(mrViewInformation2D, mrTarget, mrNewTransformA, + mrNewTransformB, aInfo); if (!bUpper) m_aFont.SetPropr(nProp); @@ -599,8 +607,9 @@ void TextHierarchyBreakup::flushLinePrimitivesToParagraphPrimitives(sal_Int32 nP void TextHierarchyBreakup::processDrawPortionInfo(const DrawPortionInfo& rDrawPortionInfo) { - CreateTextPortionPrimitivesFromDrawPortionInfo(maTextPortionPrimitives, maNewTransformA, - maNewTransformB, rDrawPortionInfo); + CreateTextPortionPrimitivesFromDrawPortionInfo(getViewInformation2D(), maTextPortionPrimitives, + maNewTransformA, maNewTransformB, + rDrawPortionInfo); if (rDrawPortionInfo.mbEndOfLine || rDrawPortionInfo.mbEndOfParagraph) { @@ -656,8 +665,10 @@ void TextHierarchyBreakup::directlyAddB2DPrimitive( maTextPortionPrimitives.push_back(rSource); } -TextHierarchyBreakup::TextHierarchyBreakup() - : maTextPortionPrimitives() +TextHierarchyBreakup::TextHierarchyBreakup( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D) + : StripPortionsHelper(rViewInformation2D) + , maTextPortionPrimitives() , maLinePrimitives() , maParagraphPrimitives() , maNewTransformA() @@ -665,9 +676,11 @@ TextHierarchyBreakup::TextHierarchyBreakup() { } -TextHierarchyBreakup::TextHierarchyBreakup(const basegfx::B2DHomMatrix& rNewTransformA, - const basegfx::B2DHomMatrix& rNewTransformB) - : maTextPortionPrimitives() +TextHierarchyBreakup::TextHierarchyBreakup( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, + const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB) + : StripPortionsHelper(rViewInformation2D) + , maTextPortionPrimitives() , maLinePrimitives() , maParagraphPrimitives() , maNewTransformA(rNewTransformA) @@ -707,16 +720,17 @@ sal_Int32 TextHierarchyBreakupOutliner::getParagraphCount() const return mrOutliner.GetParagraphCount(); } -TextHierarchyBreakupOutliner::TextHierarchyBreakupOutliner(Outliner& rOutliner) - : TextHierarchyBreakup() +TextHierarchyBreakupOutliner::TextHierarchyBreakupOutliner( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, Outliner& rOutliner) + : TextHierarchyBreakup(rViewInformation2D) , mrOutliner(rOutliner) { } TextHierarchyBreakupOutliner::TextHierarchyBreakupOutliner( - Outliner& rOutliner, const basegfx::B2DHomMatrix& rNewTransformA, - const basegfx::B2DHomMatrix& rNewTransformB) - : TextHierarchyBreakup(rNewTransformA, rNewTransformB) + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, Outliner& rOutliner, + const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB) + : TextHierarchyBreakup(rViewInformation2D, rNewTransformA, rNewTransformB) , mrOutliner(rOutliner) { } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 3a0a0eb2eb24..b9a23c68f4d2 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1194,14 +1194,14 @@ bool EditEngine::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder ) return false; } -void EditEngine::SetEditTextObjectPool( SfxItemPool* pPool ) +void EditEngine::SetItemPool( SfxItemPool* pPool ) { - getImpl().SetEditTextObjectPool(pPool); + getImpl().GetEditDoc().SetItemPool(pPool); } -SfxItemPool* EditEngine::GetEditTextObjectPool() const +SfxItemPool* EditEngine::GetItemPool() const { - return getImpl().GetEditTextObjectPool(); + return &getImpl().GetEditDoc().GetItemPool(); } void EditEngine::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index ae94c4c9b3f0..b21cd9a56a66 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -411,7 +411,8 @@ void EditView::DrawText_ToEditView( const tools::Rectangle& rRect, OutputDevice* { // use TextHierarchyBreakup to get all text embedded to the // TextHierarchy.*Primitive2D groupings for better processing - TextHierarchyBreakup aHelper; + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; + TextHierarchyBreakup aHelper(aViewInformation2D); // hand that Helper over to DrawText_ToEditView at the EditEngine // for usage diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 32bcbd1337d1..8e61f99c8dd6 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -557,7 +557,6 @@ private: std::unique_ptr<TextRanger> mpTextRanger; SfxStyleSheetPool* mpStylePool; - SfxItemPool* mpTextObjectPool; VclPtr<VirtualDevice> mpVirtDev; VclPtr<OutputDevice> mpRefDev; @@ -1267,9 +1266,6 @@ public: sal_Int32 StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem ); bool HasText( const SvxSearchItem& rSearchItem ); - void SetEditTextObjectPool( SfxItemPool* pP ) { mpTextObjectPool = pP; } - SfxItemPool* GetEditTextObjectPool() const { return mpTextObjectPool; } - const SvxNumberFormat * GetNumberFormat( const ContentNode* pNode ) const; sal_Int32 GetSpaceBeforeAndMinLabelWidth( const ContentNode *pNode, sal_Int32 *pnSpaceBefore = nullptr, sal_Int32 *pnMinLabelWidth = nullptr ) const; diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 423223e6357f..a03026da03ad 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -103,7 +103,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : mpEditEngine(pEE), mpActiveView(nullptr), mpStylePool(nullptr), - mpTextObjectPool(nullptr), mpUndoManager(nullptr), maWordDelimiters(u" .,;:-`'?!_=\"{}()[]"_ustr), maBackgroundColor(COL_AUTO), diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 7ddae54bd77d..4ef20665453c 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3382,18 +3382,18 @@ void ImpEditEngine::DrawText_ToPosition( OutputDevice& rOutDev, const Point& rSt if (bUsePrimitives) { // extract Primitives. + // create ViewInformation2D based on target OutputDevice + drawinglayer::geometry::ViewInformation2D aViewInformation2D; + aViewInformation2D.setViewTransformation(rOutDev.GetViewTransformation()); + // Do not use Orientation, that will be added below as transformation - TextHierarchyBreakup aHelper; + TextHierarchyBreakup aHelper(aViewInformation2D); PaintOrStrip(rOutDev, aBigRect, aStartPos, 0_deg10, &aHelper); if (aHelper.getTextPortionPrimitives().empty()) // no Primitives, done return; - // create ViewInformation2D based on target OutputDevice - drawinglayer::geometry::ViewInformation2D aViewInformation2D; - aViewInformation2D.setViewTransformation(rOutDev.GetViewTransformation()); - // get content drawinglayer::primitive2d::Primitive2DContainer aContent(aHelper.getTextPortionPrimitives()); @@ -3450,20 +3450,20 @@ void ImpEditEngine::DrawText_ToRectangle( OutputDevice& rOutDev, const tools::Re if (bUsePrimitives) { + // create ViewInformation2D based on target OutputDevice + drawinglayer::geometry::ViewInformation2D aViewInformation2D; + aViewInformation2D.setViewTransformation(rOutDev.GetViewTransformation()); + const basegfx::B2DRange aClipRange(vcl::unotools::b2DRectangleFromRectangle(aOutRect)); + aViewInformation2D.setViewport(aClipRange); + // extract Primitives - TextHierarchyBreakup aHelper; + TextHierarchyBreakup aHelper(aViewInformation2D); PaintOrStrip(rOutDev, aOutRect, aStartPos, 0_deg10, &aHelper); if (aHelper.getTextPortionPrimitives().empty()) // no Primitives, done return; - // create ViewInformation2D based on target OutputDevice - drawinglayer::geometry::ViewInformation2D aViewInformation2D; - aViewInformation2D.setViewTransformation(rOutDev.GetViewTransformation()); - const basegfx::B2DRange aClipRange(vcl::unotools::b2DRectangleFromRectangle(aOutRect)); - aViewInformation2D.setViewport(aClipRange); - // get content and it's range drawinglayer::primitive2d::Primitive2DContainer aContent(aHelper.getTextPortionPrimitives()); const basegfx::B2DRange aContentRange(aContent.getB2DRange(aViewInformation2D)); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index c21eecb893a2..b8e9e0a0de81 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1185,7 +1185,7 @@ std::unique_ptr<EditTextObject> ImpEditEngine::CreateTextObject() std::unique_ptr<EditTextObject> ImpEditEngine::CreateTextObject(const EditSelection& rSel) { - return CreateTextObject(rSel, GetEditTextObjectPool(), maStatus.AllowBigObjects(), mnBigTextObjectStart); + return CreateTextObject(rSel, &maEditDoc.GetItemPool(), maStatus.AllowBigObjects(), mnBigTextObjectStart); } std::unique_ptr<EditTextObject> ImpEditEngine::CreateTextObject( EditSelection aSel, SfxItemPool* pPool, bool bAllowBigObjects, sal_Int32 nBigObjectStart ) diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 2305d85b50f0..a53c11db8676 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -358,14 +358,14 @@ bool Outliner::HasText( const SvxSearchItem& rSearchItem ) return pEditEngine->HasText( rSearchItem ); } -void Outliner::SetEditTextObjectPool( SfxItemPool* pPool ) +void Outliner::SetEditEnginePool( SfxItemPool* pPool ) { - pEditEngine->SetEditTextObjectPool( pPool ); + pEditEngine->SetItemPool( pPool ); } -SfxItemPool* Outliner::GetEditTextObjectPool() const +SfxItemPool* Outliner::GetEditEnginePool() const { - return pEditEngine->GetEditTextObjectPool(); + return pEditEngine->GetItemPool(); } bool Outliner::SpellNextDocument() diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index c7e772be9524..dd6dd6ce3652 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -70,7 +70,8 @@ void OutlinerView::DrawText_ToEditView( const tools::Rectangle& rRect, OutputDev // use TextHierarchyBreakupOutliner to get all text embedded to the // TextHierarchy.*Primitive2D groupings for better processing, plus // the correct paragtaph countings - TextHierarchyBreakupOutliner aHelper(rOwner); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; + TextHierarchyBreakupOutliner aHelper(aViewInformation2D, rOwner); // hand that Helper over to DrawText_ToEditView at the EditEngine // for usage diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index ac7c88c08fc7..c37f12a23867 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -33,6 +33,7 @@ #include <sal/config.h> #include <sal/macros.h> #include <memory> +#include <iterator> #if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL #include <stdarg.h> @@ -980,7 +981,7 @@ OUString Sane::GetOptionUnitName( int n ) OUString aText; SANE_Unit nUnit = mppOptions[n]->unit; size_t nUnitAsSize = static_cast<size_t>(nUnit); - if (nUnitAsSize >= SAL_N_ELEMENTS( ppUnits )) + if (nUnitAsSize >= std::size( ppUnits )) aText = "[unknown units]"; else aText = OUString( ppUnits[ nUnit ], strlen(ppUnits[ nUnit ]), osl_getThreadTextEncoding() ); diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 7f26c06e4555..56fe37b8e3d0 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -627,7 +627,7 @@ void UpdateHandler::loadStrings() msResumeBtn = loadString( loc, RID_UPDATE_BTN_RESUME ); msCancelBtn = loadString( loc, RID_UPDATE_BTN_CANCEL ); - std::pair<TranslateId, TranslateId> RID_UPDATE_BUBBLE[] = + static constexpr std::pair<TranslateId, TranslateId> RID_UPDATE_BUBBLE[] = { { RID_UPDATE_BUBBLE_UPDATE_AVAIL, RID_UPDATE_BUBBLE_T_UPDATE_AVAIL }, { RID_UPDATE_BUBBLE_UPDATE_NO_DOWN, RID_UPDATE_BUBBLE_T_UPDATE_NO_DOWN }, diff --git a/external/boost/include/boost/algorithm/string.hpp b/external/boost/include/boost/algorithm/string.hpp index 791fdb2309c3..472a574f6a77 100644 --- a/external/boost/include/boost/algorithm/string.hpp +++ b/external/boost/include/boost/algorithm/string.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/algorithm/string/classification.hpp b/external/boost/include/boost/algorithm/string/classification.hpp index 89b311109938..eb1aa76adbc2 100644 --- a/external/boost/include/boost/algorithm/string/classification.hpp +++ b/external/boost/include/boost/algorithm/string/classification.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/algorithm/string/join.hpp b/external/boost/include/boost/algorithm/string/join.hpp index 4bf26b211d3f..40609df2c811 100644 --- a/external/boost/include/boost/algorithm/string/join.hpp +++ b/external/boost/include/boost/algorithm/string/join.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/algorithm/string/predicate.hpp b/external/boost/include/boost/algorithm/string/predicate.hpp index d67e07cf935d..915cc978d541 100644 --- a/external/boost/include/boost/algorithm/string/predicate.hpp +++ b/external/boost/include/boost/algorithm/string/predicate.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/algorithm/string/replace.hpp b/external/boost/include/boost/algorithm/string/replace.hpp index 5a8e0052a80b..a2589ad92c8b 100644 --- a/external/boost/include/boost/algorithm/string/replace.hpp +++ b/external/boost/include/boost/algorithm/string/replace.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/algorithm/string/split.hpp b/external/boost/include/boost/algorithm/string/split.hpp index 687fae94864a..315c3d2571d4 100644 --- a/external/boost/include/boost/algorithm/string/split.hpp +++ b/external/boost/include/boost/algorithm/string/split.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/algorithm/string/trim.hpp b/external/boost/include/boost/algorithm/string/trim.hpp index 11662ccf6315..2c7215d533a9 100644 --- a/external/boost/include/boost/algorithm/string/trim.hpp +++ b/external/boost/include/boost/algorithm/string/trim.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/any.hpp b/external/boost/include/boost/any.hpp index 617491ae8ce1..a6dbf86b7fa4 100644 --- a/external/boost/include/boost/any.hpp +++ b/external/boost/include/boost/any.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/archive/iterators/base64_from_binary.hpp b/external/boost/include/boost/archive/iterators/base64_from_binary.hpp index 6f717c89ccc4..21215264a11c 100644 --- a/external/boost/include/boost/archive/iterators/base64_from_binary.hpp +++ b/external/boost/include/boost/archive/iterators/base64_from_binary.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/archive/iterators/binary_from_base64.hpp b/external/boost/include/boost/archive/iterators/binary_from_base64.hpp index a12b0fb1b234..1b77e76eab9c 100644 --- a/external/boost/include/boost/archive/iterators/binary_from_base64.hpp +++ b/external/boost/include/boost/archive/iterators/binary_from_base64.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/archive/iterators/remove_whitespace.hpp b/external/boost/include/boost/archive/iterators/remove_whitespace.hpp index 8a3909ec3307..61a0314adb91 100644 --- a/external/boost/include/boost/archive/iterators/remove_whitespace.hpp +++ b/external/boost/include/boost/archive/iterators/remove_whitespace.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/archive/iterators/transform_width.hpp b/external/boost/include/boost/archive/iterators/transform_width.hpp index 5ffa69741c04..c2e23f004f0e 100644 --- a/external/boost/include/boost/archive/iterators/transform_width.hpp +++ b/external/boost/include/boost/archive/iterators/transform_width.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/bind/bind.hpp b/external/boost/include/boost/bind/bind.hpp index 2eee648dad05..babdac2fd43e 100644 --- a/external/boost/include/boost/bind/bind.hpp +++ b/external/boost/include/boost/bind/bind.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/cast.hpp b/external/boost/include/boost/cast.hpp index f0d932072836..ef9dca82f344 100644 --- a/external/boost/include/boost/cast.hpp +++ b/external/boost/include/boost/cast.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/circular_buffer.hpp b/external/boost/include/boost/circular_buffer.hpp index ca246bb11558..6e963e818ef1 100644 --- a/external/boost/include/boost/circular_buffer.hpp +++ b/external/boost/include/boost/circular_buffer.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/container/deque.hpp b/external/boost/include/boost/container/deque.hpp index 527c24908ae0..cd8781e4b0b8 100644 --- a/external/boost/include/boost/container/deque.hpp +++ b/external/boost/include/boost/container/deque.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/container/flat_map.hpp b/external/boost/include/boost/container/flat_map.hpp index 32bcfddd7714..43a633c2fb44 100644 --- a/external/boost/include/boost/container/flat_map.hpp +++ b/external/boost/include/boost/container/flat_map.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/container/small_vector.hpp b/external/boost/include/boost/container/small_vector.hpp index 64329c24f39f..2382383e1bab 100644 --- a/external/boost/include/boost/container/small_vector.hpp +++ b/external/boost/include/boost/container/small_vector.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/core/noinit_adaptor.hpp b/external/boost/include/boost/core/noinit_adaptor.hpp index f512adf53f52..4fb9b72da2e6 100644 --- a/external/boost/include/boost/core/noinit_adaptor.hpp +++ b/external/boost/include/boost/core/noinit_adaptor.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/cstdint.hpp b/external/boost/include/boost/cstdint.hpp index 3ac17c91e18c..66e8c4321e00 100644 --- a/external/boost/include/boost/cstdint.hpp +++ b/external/boost/include/boost/cstdint.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/current_function.hpp b/external/boost/include/boost/current_function.hpp index f8e044e4e6a8..47002b61eaec 100644 --- a/external/boost/include/boost/current_function.hpp +++ b/external/boost/include/boost/current_function.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/date_time.hpp b/external/boost/include/boost/date_time.hpp index e99ef34d23f6..b9629a46d95e 100644 --- a/external/boost/include/boost/date_time.hpp +++ b/external/boost/include/boost/date_time.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/date_time/gregorian/greg_date.hpp b/external/boost/include/boost/date_time/gregorian/greg_date.hpp index 379fe2c70ae5..ffe15b05763e 100644 --- a/external/boost/include/boost/date_time/gregorian/greg_date.hpp +++ b/external/boost/include/boost/date_time/gregorian/greg_date.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/date_time/posix_time/posix_time.hpp b/external/boost/include/boost/date_time/posix_time/posix_time.hpp index b8f2e564c8cf..f0ec8364e9fc 100644 --- a/external/boost/include/boost/date_time/posix_time/posix_time.hpp +++ b/external/boost/include/boost/date_time/posix_time/posix_time.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/enable_shared_from_this.hpp b/external/boost/include/boost/enable_shared_from_this.hpp index 936f06e34482..261a77b97d51 100644 --- a/external/boost/include/boost/enable_shared_from_this.hpp +++ b/external/boost/include/boost/enable_shared_from_this.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/filesystem.hpp b/external/boost/include/boost/filesystem.hpp index 702766e04d40..6efb78f6c811 100644 --- a/external/boost/include/boost/filesystem.hpp +++ b/external/boost/include/boost/filesystem.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/filesystem/path.hpp b/external/boost/include/boost/filesystem/path.hpp index c713c721d2de..7b3b4e265756 100644 --- a/external/boost/include/boost/filesystem/path.hpp +++ b/external/boost/include/boost/filesystem/path.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/format.hpp b/external/boost/include/boost/format.hpp index a944343ab858..b483226a628f 100644 --- a/external/boost/include/boost/format.hpp +++ b/external/boost/include/boost/format.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/function.hpp b/external/boost/include/boost/function.hpp index 65166d58027d..1d2e2a705da8 100644 --- a/external/boost/include/boost/function.hpp +++ b/external/boost/include/boost/function.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/functional/hash.hpp b/external/boost/include/boost/functional/hash.hpp index 9b0741dce22e..fe2cbf3d6687 100644 --- a/external/boost/include/boost/functional/hash.hpp +++ b/external/boost/include/boost/functional/hash.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/fusion/adapted/std_pair.hpp b/external/boost/include/boost/fusion/adapted/std_pair.hpp index a0f70a517676..bfc667ef9cd3 100644 --- a/external/boost/include/boost/fusion/adapted/std_pair.hpp +++ b/external/boost/include/boost/fusion/adapted/std_pair.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/fusion/include/adapt_struct.hpp b/external/boost/include/boost/fusion/include/adapt_struct.hpp index 88ec1e174b89..f19c4694e432 100644 --- a/external/boost/include/boost/fusion/include/adapt_struct.hpp +++ b/external/boost/include/boost/fusion/include/adapt_struct.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/fusion/include/std_pair.hpp b/external/boost/include/boost/fusion/include/std_pair.hpp index 9357b6b52cd1..bc115040eaac 100644 --- a/external/boost/include/boost/fusion/include/std_pair.hpp +++ b/external/boost/include/boost/fusion/include/std_pair.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/interprocess/file_mapping.hpp b/external/boost/include/boost/interprocess/file_mapping.hpp index 7ccba5ae6613..8f3bb340be9d 100644 --- a/external/boost/include/boost/interprocess/file_mapping.hpp +++ b/external/boost/include/boost/interprocess/file_mapping.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/interprocess/mapped_region.hpp b/external/boost/include/boost/interprocess/mapped_region.hpp index d3b31e5b9dca..bba283c8d527 100644 --- a/external/boost/include/boost/interprocess/mapped_region.hpp +++ b/external/boost/include/boost/interprocess/mapped_region.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/intrusive/circular_list_algorithms.hpp b/external/boost/include/boost/intrusive/circular_list_algorithms.hpp index 33d02eff9627..456d4dbf47f3 100644 --- a/external/boost/include/boost/intrusive/circular_list_algorithms.hpp +++ b/external/boost/include/boost/intrusive/circular_list_algorithms.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/intrusive_ptr.hpp b/external/boost/include/boost/intrusive_ptr.hpp index bc64b6365b83..2b21a26f834e 100644 --- a/external/boost/include/boost/intrusive_ptr.hpp +++ b/external/boost/include/boost/intrusive_ptr.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/iostreams/device/file_descriptor.hpp b/external/boost/include/boost/iostreams/device/file_descriptor.hpp index 54709f3a0011..16517f28f17c 100644 --- a/external/boost/include/boost/iostreams/device/file_descriptor.hpp +++ b/external/boost/include/boost/iostreams/device/file_descriptor.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/iostreams/filter/gzip.hpp b/external/boost/include/boost/iostreams/filter/gzip.hpp index 1c9c50eb7c04..7f700501a290 100644 --- a/external/boost/include/boost/iostreams/filter/gzip.hpp +++ b/external/boost/include/boost/iostreams/filter/gzip.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/iostreams/filtering_stream.hpp b/external/boost/include/boost/iostreams/filtering_stream.hpp index 34ae39ea8abb..a5f566c3a651 100644 --- a/external/boost/include/boost/iostreams/filtering_stream.hpp +++ b/external/boost/include/boost/iostreams/filtering_stream.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/iterator/iterator_facade.hpp b/external/boost/include/boost/iterator/iterator_facade.hpp index e0cac196dd76..b6610c19f03f 100644 --- a/external/boost/include/boost/iterator/iterator_facade.hpp +++ b/external/boost/include/boost/iterator/iterator_facade.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/lexical_cast.hpp b/external/boost/include/boost/lexical_cast.hpp index 05316296cc6d..4f2d00e28d91 100644 --- a/external/boost/include/boost/lexical_cast.hpp +++ b/external/boost/include/boost/lexical_cast.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/locale.hpp b/external/boost/include/boost/locale.hpp index e02e9a437384..6b9529635635 100644 --- a/external/boost/include/boost/locale.hpp +++ b/external/boost/include/boost/locale.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/locale/gnu_gettext.hpp b/external/boost/include/boost/locale/gnu_gettext.hpp index e3f44ec482b6..5487b5d41b89 100644 --- a/external/boost/include/boost/locale/gnu_gettext.hpp +++ b/external/boost/include/boost/locale/gnu_gettext.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/make_shared.hpp b/external/boost/include/boost/make_shared.hpp index 54ddad0386cc..7c8511076790 100644 --- a/external/boost/include/boost/make_shared.hpp +++ b/external/boost/include/boost/make_shared.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/math/constants/constants.hpp b/external/boost/include/boost/math/constants/constants.hpp index 7ed40c12ead3..af2acf585aff 100644 --- a/external/boost/include/boost/math/constants/constants.hpp +++ b/external/boost/include/boost/math/constants/constants.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/math/special_functions/sinc.hpp b/external/boost/include/boost/math/special_functions/sinc.hpp index a2a9384e4fa6..38875f4f66cc 100644 --- a/external/boost/include/boost/math/special_functions/sinc.hpp +++ b/external/boost/include/boost/math/special_functions/sinc.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_array.hpp b/external/boost/include/boost/multi_array.hpp index 52ad818447a8..64a7b8002786 100644 --- a/external/boost/include/boost/multi_array.hpp +++ b/external/boost/include/boost/multi_array.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index/composite_key.hpp b/external/boost/include/boost/multi_index/composite_key.hpp index ff987096ccd2..dccd54eac08f 100644 --- a/external/boost/include/boost/multi_index/composite_key.hpp +++ b/external/boost/include/boost/multi_index/composite_key.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index/identity.hpp b/external/boost/include/boost/multi_index/identity.hpp index 5c994a42cfae..a3a8d3f0bf04 100644 --- a/external/boost/include/boost/multi_index/identity.hpp +++ b/external/boost/include/boost/multi_index/identity.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index/mem_fun.hpp b/external/boost/include/boost/multi_index/mem_fun.hpp index 69ac0c4ca309..be5343e1174d 100644 --- a/external/boost/include/boost/multi_index/mem_fun.hpp +++ b/external/boost/include/boost/multi_index/mem_fun.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index/ordered_index.hpp b/external/boost/include/boost/multi_index/ordered_index.hpp index 74885794dc3b..3667290cef4e 100644 --- a/external/boost/include/boost/multi_index/ordered_index.hpp +++ b/external/boost/include/boost/multi_index/ordered_index.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index/random_access_index.hpp b/external/boost/include/boost/multi_index/random_access_index.hpp index 71dd53c5c188..7e7f8a7ba16b 100644 --- a/external/boost/include/boost/multi_index/random_access_index.hpp +++ b/external/boost/include/boost/multi_index/random_access_index.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index/tag.hpp b/external/boost/include/boost/multi_index/tag.hpp index 5d0bfbb62f3d..65b57f4de6af 100644 --- a/external/boost/include/boost/multi_index/tag.hpp +++ b/external/boost/include/boost/multi_index/tag.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/multi_index_container.hpp b/external/boost/include/boost/multi_index_container.hpp index bb0c3e2f39af..d7b7435f5947 100644 --- a/external/boost/include/boost/multi_index_container.hpp +++ b/external/boost/include/boost/multi_index_container.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/none.hpp b/external/boost/include/boost/none.hpp index f8018cf053e4..e02a162ff400 100644 --- a/external/boost/include/boost/none.hpp +++ b/external/boost/include/boost/none.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/numeric/conversion/cast.hpp b/external/boost/include/boost/numeric/conversion/cast.hpp index 5b1ad9fe4459..452ac4609c31 100644 --- a/external/boost/include/boost/numeric/conversion/cast.hpp +++ b/external/boost/include/boost/numeric/conversion/cast.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/operators.hpp b/external/boost/include/boost/operators.hpp index bff38b721c75..266e511ff553 100644 --- a/external/boost/include/boost/operators.hpp +++ b/external/boost/include/boost/operators.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/optional.hpp b/external/boost/include/boost/optional.hpp index 4f3f9c38f3c2..4369bf77eec9 100644 --- a/external/boost/include/boost/optional.hpp +++ b/external/boost/include/boost/optional.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/phoenix.hpp b/external/boost/include/boost/phoenix.hpp index a07c3dc60b01..674054aca90e 100644 --- a/external/boost/include/boost/phoenix.hpp +++ b/external/boost/include/boost/phoenix.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/pool/object_pool.hpp b/external/boost/include/boost/pool/object_pool.hpp index a981a26487ed..9f109ff18157 100644 --- a/external/boost/include/boost/pool/object_pool.hpp +++ b/external/boost/include/boost/pool/object_pool.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/program_options.hpp b/external/boost/include/boost/program_options.hpp index 570da5a94c34..b763a905e452 100644 --- a/external/boost/include/boost/program_options.hpp +++ b/external/boost/include/boost/program_options.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/property_tree/ini_parser.hpp b/external/boost/include/boost/property_tree/ini_parser.hpp index 59d0b8f1c44c..d510817939e3 100644 --- a/external/boost/include/boost/property_tree/ini_parser.hpp +++ b/external/boost/include/boost/property_tree/ini_parser.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/property_tree/json_parser.hpp b/external/boost/include/boost/property_tree/json_parser.hpp index 104243cd8ca8..e6c24c19c60f 100644 --- a/external/boost/include/boost/property_tree/json_parser.hpp +++ b/external/boost/include/boost/property_tree/json_parser.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/property_tree/json_parser/error.hpp b/external/boost/include/boost/property_tree/json_parser/error.hpp index 937c2b0b6dda..b4e084fc4406 100644 --- a/external/boost/include/boost/property_tree/json_parser/error.hpp +++ b/external/boost/include/boost/property_tree/json_parser/error.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/property_tree/ptree.hpp b/external/boost/include/boost/property_tree/ptree.hpp index 7ad884aa8a11..f44ddac47b8b 100644 --- a/external/boost/include/boost/property_tree/ptree.hpp +++ b/external/boost/include/boost/property_tree/ptree.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/property_tree/ptree_fwd.hpp b/external/boost/include/boost/property_tree/ptree_fwd.hpp index 93ff95d8af69..2d85e28d7093 100644 --- a/external/boost/include/boost/property_tree/ptree_fwd.hpp +++ b/external/boost/include/boost/property_tree/ptree_fwd.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/range/adaptor/reversed.hpp b/external/boost/include/boost/range/adaptor/reversed.hpp index e8da5c1e8fb4..95b7c2dfcc46 100644 --- a/external/boost/include/boost/range/adaptor/reversed.hpp +++ b/external/boost/include/boost/range/adaptor/reversed.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/range/iterator_range.hpp b/external/boost/include/boost/range/iterator_range.hpp index 011304764ed8..9252012d3edd 100644 --- a/external/boost/include/boost/range/iterator_range.hpp +++ b/external/boost/include/boost/range/iterator_range.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/rational.hpp b/external/boost/include/boost/rational.hpp index cc5a6550d425..9e879bb79f84 100644 --- a/external/boost/include/boost/rational.hpp +++ b/external/boost/include/boost/rational.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/regex.hpp b/external/boost/include/boost/regex.hpp index e4218bfddc09..3c7465b41510 100644 --- a/external/boost/include/boost/regex.hpp +++ b/external/boost/include/boost/regex.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/scoped_ptr.hpp b/external/boost/include/boost/scoped_ptr.hpp index f96846917463..4d2ac5f8bede 100644 --- a/external/boost/include/boost/scoped_ptr.hpp +++ b/external/boost/include/boost/scoped_ptr.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/shared_ptr.hpp b/external/boost/include/boost/shared_ptr.hpp index a57ac3c248a9..a531a6760099 100644 --- a/external/boost/include/boost/shared_ptr.hpp +++ b/external/boost/include/boost/shared_ptr.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/smart_ptr/make_shared.hpp b/external/boost/include/boost/smart_ptr/make_shared.hpp index b47a86f0acbd..3d9027174a4d 100644 --- a/external/boost/include/boost/smart_ptr/make_shared.hpp +++ b/external/boost/include/boost/smart_ptr/make_shared.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/classic.hpp b/external/boost/include/boost/spirit/include/classic.hpp index 5fb9db446efe..08f9541b52fb 100644 --- a/external/boost/include/boost/spirit/include/classic.hpp +++ b/external/boost/include/boost/spirit/include/classic.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/classic_core.hpp b/external/boost/include/boost/spirit/include/classic_core.hpp index 8ad07162bb9a..872bc6df4d09 100644 --- a/external/boost/include/boost/spirit/include/classic_core.hpp +++ b/external/boost/include/boost/spirit/include/classic_core.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/classic_error_handling.hpp b/external/boost/include/boost/spirit/include/classic_error_handling.hpp index ad7da30b4196..8c15ad91e6e8 100644 --- a/external/boost/include/boost/spirit/include/classic_error_handling.hpp +++ b/external/boost/include/boost/spirit/include/classic_error_handling.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/classic_file_iterator.hpp b/external/boost/include/boost/spirit/include/classic_file_iterator.hpp index 3fa37af9625c..3fd75cd603bc 100644 --- a/external/boost/include/boost/spirit/include/classic_file_iterator.hpp +++ b/external/boost/include/boost/spirit/include/classic_file_iterator.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/classic_utility.hpp b/external/boost/include/boost/spirit/include/classic_utility.hpp index 528be00f5213..30648200bf08 100644 --- a/external/boost/include/boost/spirit/include/classic_utility.hpp +++ b/external/boost/include/boost/spirit/include/classic_utility.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/phoenix.hpp b/external/boost/include/boost/spirit/include/phoenix.hpp index 2aa62dfd5bc6..8051c7caff92 100644 --- a/external/boost/include/boost/spirit/include/phoenix.hpp +++ b/external/boost/include/boost/spirit/include/phoenix.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi.hpp b/external/boost/include/boost/spirit/include/qi.hpp index 26f96c74af0f..69389b5c84d2 100644 --- a/external/boost/include/boost/spirit/include/qi.hpp +++ b/external/boost/include/boost/spirit/include/qi.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi_attr.hpp b/external/boost/include/boost/spirit/include/qi_attr.hpp index caa36eb0f472..314f7e8cd5a7 100644 --- a/external/boost/include/boost/spirit/include/qi_attr.hpp +++ b/external/boost/include/boost/spirit/include/qi_attr.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi_lit.hpp b/external/boost/include/boost/spirit/include/qi_lit.hpp index 9754acc12436..66d7ad804ea9 100644 --- a/external/boost/include/boost/spirit/include/qi_lit.hpp +++ b/external/boost/include/boost/spirit/include/qi_lit.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi_optional.hpp b/external/boost/include/boost/spirit/include/qi_optional.hpp index b9f785e3d374..c6b4b90fbaca 100644 --- a/external/boost/include/boost/spirit/include/qi_optional.hpp +++ b/external/boost/include/boost/spirit/include/qi_optional.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi_parse_attr.hpp b/external/boost/include/boost/spirit/include/qi_parse_attr.hpp index cf6e076ecf4c..399df002e93a 100644 --- a/external/boost/include/boost/spirit/include/qi_parse_attr.hpp +++ b/external/boost/include/boost/spirit/include/qi_parse_attr.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi_sequence.hpp b/external/boost/include/boost/spirit/include/qi_sequence.hpp index 710a0e9a5af8..ed6dbf821d98 100644 --- a/external/boost/include/boost/spirit/include/qi_sequence.hpp +++ b/external/boost/include/boost/spirit/include/qi_sequence.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/spirit/include/qi_symbols.hpp b/external/boost/include/boost/spirit/include/qi_symbols.hpp index f109d7dfccb6..f8e479ddf039 100644 --- a/external/boost/include/boost/spirit/include/qi_symbols.hpp +++ b/external/boost/include/boost/spirit/include/qi_symbols.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/static_assert.hpp b/external/boost/include/boost/static_assert.hpp index 6ad006193fe6..52a3cb459414 100644 --- a/external/boost/include/boost/static_assert.hpp +++ b/external/boost/include/boost/static_assert.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/system/error_code.hpp b/external/boost/include/boost/system/error_code.hpp index 5363711209b7..a78acae4d303 100644 --- a/external/boost/include/boost/system/error_code.hpp +++ b/external/boost/include/boost/system/error_code.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/type_index.hpp b/external/boost/include/boost/type_index.hpp index 5c3b652835e0..2b45b772f9df 100644 --- a/external/boost/include/boost/type_index.hpp +++ b/external/boost/include/boost/type_index.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/type_traits/function_traits.hpp b/external/boost/include/boost/type_traits/function_traits.hpp index f6a38942d533..34d4da4556b9 100644 --- a/external/boost/include/boost/type_traits/function_traits.hpp +++ b/external/boost/include/boost/type_traits/function_traits.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/unordered_map.hpp b/external/boost/include/boost/unordered_map.hpp index d8a88013461e..a5b6251cde89 100644 --- a/external/boost/include/boost/unordered_map.hpp +++ b/external/boost/include/boost/unordered_map.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/uuid/detail/sha1.hpp b/external/boost/include/boost/uuid/detail/sha1.hpp index 722824375ff5..fc48b0a98787 100644 --- a/external/boost/include/boost/uuid/detail/sha1.hpp +++ b/external/boost/include/boost/uuid/detail/sha1.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/uuid/sha1.hpp b/external/boost/include/boost/uuid/sha1.hpp index 255798b08177..36356294490c 100644 --- a/external/boost/include/boost/uuid/sha1.hpp +++ b/external/boost/include/boost/uuid/sha1.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/uuid/uuid.hpp b/external/boost/include/boost/uuid/uuid.hpp index 559af546d6a8..0a629f2c325d 100644 --- a/external/boost/include/boost/uuid/uuid.hpp +++ b/external/boost/include/boost/uuid/uuid.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/uuid/uuid_generators.hpp b/external/boost/include/boost/uuid/uuid_generators.hpp index 6489b6a16070..9cf428738b5e 100644 --- a/external/boost/include/boost/uuid/uuid_generators.hpp +++ b/external/boost/include/boost/uuid/uuid_generators.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/uuid/uuid_io.hpp b/external/boost/include/boost/uuid/uuid_io.hpp index 61f947614c30..a605a8c0ede5 100644 --- a/external/boost/include/boost/uuid/uuid_io.hpp +++ b/external/boost/include/boost/uuid/uuid_io.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/variant.hpp b/external/boost/include/boost/variant.hpp index 36113d3bcc87..adda214637cb 100644 --- a/external/boost/include/boost/variant.hpp +++ b/external/boost/include/boost/variant.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/variant/recursive_variant.hpp b/external/boost/include/boost/variant/recursive_variant.hpp index f0a81ac10bf4..23491f236c88 100644 --- a/external/boost/include/boost/variant/recursive_variant.hpp +++ b/external/boost/include/boost/variant/recursive_variant.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/boost/include/boost/version.hpp b/external/boost/include/boost/version.hpp index 47797f163a92..f0d78c0acac1 100644 --- a/external/boost/include/boost/version.hpp +++ b/external/boost/include/boost/version.hpp @@ -23,6 +23,7 @@ #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #pragma GCC diagnostic ignored "-Wunused-macros" #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/external/clew/source/clew.c b/external/clew/source/clew.c index 4ed80035d3a5..08b6a637e0d0 100644 --- a/external/clew/source/clew.c +++ b/external/clew/source/clew.c @@ -242,7 +242,7 @@ int clewInit(const char* path) //! \return a string representation of the error code const char* clewErrorString(cl_int error) { - static const char* strings[] = + static const char* const strings[] = { // Error Codes "CL_SUCCESS" // 0 diff --git a/external/clucene/patches/clucene-const.patch.1 b/external/clucene/patches/clucene-const.patch.1 index d51098a59d7d..b6391c636444 100644 --- a/external/clucene/patches/clucene-const.patch.1 +++ b/external/clucene/patches/clucene-const.patch.1 @@ -1,6 +1,27 @@ +diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/libstemmer/modules.h clucene/src/contribs-lib/CLucene/snowball/libstemmer/modules.h +--- clucene.orig/src/contribs-lib/CLucene/snowball/libstemmer/modules.h 2025-07-22 11:53:24.795091157 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/libstemmer/modules.h 2025-07-22 11:53:59.994967168 +0100 +@@ -62,7 +62,7 @@ + void (*close)(struct SN_env *); + int (*stem)(struct SN_env *); + }; +-static struct stemmer_modules modules[] = { ++static const struct stemmer_modules modules[] = { + {"da", ENC_ISO_8859_1, danish_ISO_8859_1_create_env, danish_ISO_8859_1_close_env, danish_ISO_8859_1_stem}, + {"da", ENC_UTF_8, danish_UTF_8_create_env, danish_UTF_8_close_env, danish_UTF_8_stem}, + {"dan", ENC_ISO_8859_1, danish_ISO_8859_1_create_env, danish_ISO_8859_1_close_env, danish_ISO_8859_1_stem}, +@@ -147,7 +147,7 @@ + {"swedish", ENC_UTF_8, swedish_UTF_8_create_env, swedish_UTF_8_close_env, swedish_UTF_8_stem}, + {0,0,0,0,0} + }; +-static const char * algorithm_names[] = { ++static const char* const algorithm_names[] = { + "danish", + "dutch", + "english", diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_danish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_danish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_danish.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_danish.c 2025-07-14 10:02:16.697229310 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_danish.c 2025-07-22 11:53:24.797765105 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_danish.c 2025-07-22 11:53:28.916972707 +0100 @@ -13,40 +13,40 @@ extern struct SN_env * danish_ISO_8859_1_create_env(void); extern void danish_ISO_8859_1_close_env(struct SN_env * z); @@ -133,8 +154,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_da static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_dutch.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_dutch.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_dutch.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_dutch.c 2025-07-14 10:02:16.698405000 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_dutch.c 2025-07-22 11:53:24.797765105 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_dutch.c 2025-07-22 11:53:28.917771880 +0100 @@ -17,18 +17,18 @@ extern struct SN_env * dutch_ISO_8859_1_create_env(void); extern void dutch_ISO_8859_1_close_env(struct SN_env * z); @@ -314,8 +335,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_du static int r_prelude(struct SN_env * z) { int among_var; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_english.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_english.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_english.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_english.c 2025-07-14 10:02:16.699761448 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_english.c 2025-07-22 11:53:24.797765105 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_english.c 2025-07-22 11:53:28.918547052 +0100 @@ -23,34 +23,34 @@ extern struct SN_env * english_ISO_8859_1_create_env(void); extern void english_ISO_8859_1_close_env(struct SN_env * z); @@ -754,8 +775,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_en static int r_prelude(struct SN_env * z) { z->B[0] = 0; /* unset Y_found, line 26 */ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_finnish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_finnish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_finnish.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_finnish.c 2025-07-14 10:02:16.700733919 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_finnish.c 2025-07-22 11:53:24.797765105 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_finnish.c 2025-07-22 11:53:28.920862479 +0100 @@ -19,18 +19,18 @@ extern struct SN_env * finnish_ISO_8859_1_create_env(void); extern void finnish_ISO_8859_1_close_env(struct SN_env * z); @@ -1086,8 +1107,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_fi static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_french.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_french.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_french.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_french.c 2025-07-14 10:02:16.701126506 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_french.c 2025-07-22 11:53:24.797765105 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_french.c 2025-07-22 11:53:28.922723934 +0100 @@ -20,11 +20,11 @@ extern struct SN_env * french_ISO_8859_1_create_env(void); extern void french_ISO_8859_1_close_env(struct SN_env * z); @@ -1551,8 +1572,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_fr static int r_prelude(struct SN_env * z) { while(1) { /* repeat, line 38 */ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_german.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_german.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_german.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_german.c 2025-07-14 10:02:16.701563342 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_german.c 2025-07-22 11:53:24.797765105 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_german.c 2025-07-22 11:53:28.923596831 +0100 @@ -14,13 +14,13 @@ extern struct SN_env * german_ISO_8859_1_create_env(void); extern void german_ISO_8859_1_close_env(struct SN_env * z); @@ -1702,8 +1723,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_ge static int r_prelude(struct SN_env * z) { { int c_test = z->c; /* test, line 30 */ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_italian.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_italian.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_italian.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_italian.c 2025-07-14 10:02:16.701759821 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_italian.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_italian.c 2025-07-22 11:53:28.924466109 +0100 @@ -18,14 +18,14 @@ extern struct SN_env * italian_ISO_8859_1_create_env(void); extern void italian_ISO_8859_1_close_env(struct SN_env * z); @@ -2233,8 +2254,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_it static int r_prelude(struct SN_env * z) { int among_var; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_norwegian.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_norwegian.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_norwegian.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_norwegian.c 2025-07-14 10:02:16.702126767 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_norwegian.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_norwegian.c 2025-07-22 11:53:28.925135716 +0100 @@ -12,37 +12,37 @@ extern struct SN_env * norwegian_ISO_8859_1_create_env(void); extern void norwegian_ISO_8859_1_close_env(struct SN_env * z); @@ -2365,8 +2386,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_no static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_porter.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_porter.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_porter.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_porter.c 2025-07-14 10:02:16.702304373 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_porter.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_porter.c 2025-07-22 11:53:28.925961067 +0100 @@ -19,12 +19,12 @@ extern struct SN_env * porter_ISO_8859_1_create_env(void); extern void porter_ISO_8859_1_close_env(struct SN_env * z); @@ -2640,8 +2661,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_po static int r_shortv(struct SN_env * z) { if (!(out_grouping_b(z, g_v_WXY, 89, 121))) return 0; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_portuguese.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_portuguese.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_portuguese.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_portuguese.c 2025-07-14 10:02:16.702502440 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_portuguese.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_portuguese.c 2025-07-22 11:53:28.927017684 +0100 @@ -18,32 +18,32 @@ extern struct SN_env * portuguese_ISO_8859_1_create_env(void); extern void portuguese_ISO_8859_1_close_env(struct SN_env * z); @@ -3155,8 +3176,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_po static int r_prelude(struct SN_env * z) { int among_var; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_spanish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_spanish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_spanish.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_spanish.c 2025-07-14 10:02:16.702922549 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_spanish.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_spanish.c 2025-07-22 11:53:28.927805367 +0100 @@ -18,13 +18,13 @@ extern struct SN_env * spanish_ISO_8859_1_create_env(void); extern void spanish_ISO_8859_1_close_env(struct SN_env * z); @@ -3712,8 +3733,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_sp static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_swedish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_swedish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_swedish.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_swedish.c 2025-07-14 10:02:16.703178426 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_swedish.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_swedish.c 2025-07-22 11:53:28.928736275 +0100 @@ -12,45 +12,45 @@ extern struct SN_env * swedish_ISO_8859_1_create_env(void); extern void swedish_ISO_8859_1_close_env(struct SN_env * z); @@ -3860,8 +3881,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_ISO_8859_1_sw static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russian.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russian.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russian.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russian.c 2025-07-14 10:02:16.703365277 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russian.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russian.c 2025-07-22 11:53:28.929337955 +0100 @@ -18,17 +18,17 @@ extern struct SN_env * russian_KOI8_R_create_env(void); extern void russian_KOI8_R_close_env(struct SN_env * z); @@ -4235,8 +4256,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_KOI8_R_russia static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish.c 2025-07-14 10:02:16.703551795 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish.c 2025-07-22 11:53:28.929986527 +0100 @@ -13,40 +13,40 @@ extern struct SN_env * danish_UTF_8_create_env(void); extern void danish_UTF_8_close_env(struct SN_env * z); @@ -4369,8 +4390,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_danish. static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c 2025-07-14 10:02:16.703730673 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c 2025-07-22 11:53:28.930525646 +0100 @@ -17,18 +17,18 @@ extern struct SN_env * dutch_UTF_8_create_env(void); extern void dutch_UTF_8_close_env(struct SN_env * z); @@ -4550,8 +4571,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_dutch.c static int r_prelude(struct SN_env * z) { int among_var; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english.c 2025-07-14 10:02:16.703914434 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english.c 2025-07-22 11:53:28.931155500 +0100 @@ -23,34 +23,34 @@ extern struct SN_env * english_UTF_8_create_env(void); extern void english_UTF_8_close_env(struct SN_env * z); @@ -4990,8 +5011,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_english static int r_prelude(struct SN_env * z) { z->B[0] = 0; /* unset Y_found, line 26 */ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish.c 2025-07-14 10:02:16.704290745 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish.c 2025-07-22 11:53:28.931976470 +0100 @@ -19,18 +19,18 @@ extern struct SN_env * finnish_UTF_8_create_env(void); extern void finnish_UTF_8_close_env(struct SN_env * z); @@ -5322,8 +5343,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_finnish static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french.c 2025-07-14 10:02:13.791063032 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french.c 2025-07-14 10:02:16.704570638 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french.c 2025-07-22 11:53:24.797844184 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french.c 2025-07-22 11:53:28.932564428 +0100 @@ -20,11 +20,11 @@ extern struct SN_env * french_UTF_8_create_env(void); extern void french_UTF_8_close_env(struct SN_env * z); @@ -5787,8 +5808,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_french. static int r_prelude(struct SN_env * z) { while(1) { /* repeat, line 38 */ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german.c 2025-07-14 10:02:16.704959841 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german.c 2025-07-22 11:53:24.798844189 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german.c 2025-07-22 11:53:28.933184872 +0100 @@ -14,13 +14,13 @@ extern struct SN_env * german_UTF_8_create_env(void); extern void german_UTF_8_close_env(struct SN_env * z); @@ -5938,8 +5959,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_german. static int r_prelude(struct SN_env * z) { { int c_test = z->c; /* test, line 30 */ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian.c 2025-07-14 10:02:16.705154803 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian.c 2025-07-22 11:53:24.798844189 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian.c 2025-07-22 11:53:28.933611915 +0100 @@ -18,14 +18,14 @@ extern struct SN_env * italian_UTF_8_create_env(void); extern void italian_UTF_8_close_env(struct SN_env * z); @@ -6469,8 +6490,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_italian static int r_prelude(struct SN_env * z) { int among_var; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegian.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegian.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegian.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegian.c 2025-07-14 10:02:16.705480225 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegian.c 2025-07-22 11:53:24.799844193 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegian.c 2025-07-22 11:53:28.934151901 +0100 @@ -12,37 +12,37 @@ extern struct SN_env * norwegian_UTF_8_create_env(void); extern void norwegian_UTF_8_close_env(struct SN_env * z); @@ -6601,8 +6622,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_norwegi static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter.c 2025-07-14 10:02:16.705646813 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter.c 2025-07-22 11:53:24.799844193 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter.c 2025-07-22 11:53:28.934517711 +0100 @@ -19,12 +19,12 @@ extern struct SN_env * porter_UTF_8_create_env(void); extern void porter_UTF_8_close_env(struct SN_env * z); @@ -6876,8 +6897,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_porter. static int r_shortv(struct SN_env * z) { if (!(out_grouping_b_U(z, g_v_WXY, 89, 121))) return 0; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portuguese.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portuguese.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portuguese.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portuguese.c 2025-07-14 10:02:16.705938785 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portuguese.c 2025-07-22 11:53:24.799844193 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portuguese.c 2025-07-22 11:53:28.934982071 +0100 @@ -18,32 +18,32 @@ extern struct SN_env * portuguese_UTF_8_create_env(void); extern void portuguese_UTF_8_close_env(struct SN_env * z); @@ -7391,8 +7412,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_portugu static int r_prelude(struct SN_env * z) { int among_var; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian.c 2025-07-14 10:02:16.706356248 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian.c 2025-07-22 11:53:24.799844193 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian.c 2025-07-22 11:53:28.935552428 +0100 @@ -18,17 +18,17 @@ extern struct SN_env * russian_UTF_8_create_env(void); extern void russian_UTF_8_close_env(struct SN_env * z); @@ -7766,8 +7787,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_russian static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish.c 2025-07-14 10:02:16.706577456 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish.c 2025-07-22 11:53:24.799844193 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish.c 2025-07-22 11:53:28.936016852 +0100 @@ -18,13 +18,13 @@ extern struct SN_env * spanish_UTF_8_create_env(void); extern void spanish_UTF_8_close_env(struct SN_env * z); @@ -8323,8 +8344,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_spanish static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish.c clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish.c ---- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish.c 2025-07-14 10:02:13.792063038 +0100 -+++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish.c 2025-07-14 10:02:16.706862622 +0100 +--- clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish.c 2025-07-22 11:53:24.799844193 +0100 ++++ clucene/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish.c 2025-07-22 11:53:28.936522584 +0100 @@ -12,45 +12,45 @@ extern struct SN_env * swedish_UTF_8_create_env(void); extern void swedish_UTF_8_close_env(struct SN_env * z); @@ -8471,8 +8492,8 @@ diff -ru clucene.orig/src/contribs-lib/CLucene/snowball/src_c/stem_UTF_8_swedish static int r_mark_regions(struct SN_env * z) { z->I[0] = z->l; diff -ru clucene.orig/src/core/CLucene/analysis/Analyzers.cpp clucene/src/core/CLucene/analysis/Analyzers.cpp ---- clucene.orig/src/core/CLucene/analysis/Analyzers.cpp 2025-07-14 21:22:25.560506427 +0100 -+++ clucene/src/core/CLucene/analysis/Analyzers.cpp 2025-07-14 21:22:35.955552591 +0100 +--- clucene.orig/src/core/CLucene/analysis/Analyzers.cpp 2025-07-22 11:53:24.804844215 +0100 ++++ clucene/src/core/CLucene/analysis/Analyzers.cpp 2025-07-22 11:53:28.937049573 +0100 @@ -195,7 +195,7 @@ bool StopFilter::getEnablePositionIncrements() const { return enablePositionIncrements; } void StopFilter::setEnablePositionIncrements(const bool enable) { this->enablePositionIncrements = enable; } @@ -8492,8 +8513,8 @@ diff -ru clucene.orig/src/core/CLucene/analysis/Analyzers.cpp clucene/src/core/C _T("a"), _T("an"), _T("and"), _T("are"), _T("as"), _T("at"), _T("be"), _T("but"), _T("by"), _T("for"), _T("if"), _T("in"), _T("into"), _T("is"), _T("it"), diff -ru clucene.orig/src/core/CLucene/analysis/Analyzers.h clucene/src/core/CLucene/analysis/Analyzers.h ---- clucene.orig/src/core/CLucene/analysis/Analyzers.h 2025-07-14 21:22:25.560506427 +0100 -+++ clucene/src/core/CLucene/analysis/Analyzers.h 2025-07-14 21:22:35.957413701 +0100 +--- clucene.orig/src/core/CLucene/analysis/Analyzers.h 2025-07-22 11:53:24.804844215 +0100 ++++ clucene/src/core/CLucene/analysis/Analyzers.h 2025-07-22 11:53:28.937453346 +0100 @@ -160,7 +160,7 @@ * Note: the stopWords list must be a static list because the strings are not copied */ @@ -8513,8 +8534,8 @@ diff -ru clucene.orig/src/core/CLucene/analysis/Analyzers.h clucene/src/core/CLu diff -ru clucene.orig/src/core/CLucene/index/IndexFileNames.cpp clucene/src/core/CLucene/index/IndexFileNames.cpp ---- clucene.orig/src/core/CLucene/index/IndexFileNames.cpp 2025-07-14 21:22:25.582506524 +0100 -+++ clucene/src/core/CLucene/index/IndexFileNames.cpp 2025-07-14 21:22:30.824736167 +0100 +--- clucene.orig/src/core/CLucene/index/IndexFileNames.cpp 2025-07-22 11:53:24.808844233 +0100 ++++ clucene/src/core/CLucene/index/IndexFileNames.cpp 2025-07-22 11:53:28.937911664 +0100 @@ -13,26 +13,26 @@ CL_NS_DEF(index) @@ -8563,8 +8584,8 @@ diff -ru clucene.orig/src/core/CLucene/index/IndexFileNames.cpp clucene/src/core const char* IndexFileNames_INDEX_EXTENSIONS_s[] = { diff -ru clucene.orig/src/core/CLucene/index/_IndexFileNames.h clucene/src/core/CLucene/index/_IndexFileNames.h ---- clucene.orig/src/core/CLucene/index/_IndexFileNames.h 2025-07-14 10:02:13.797063065 +0100 -+++ clucene/src/core/CLucene/index/_IndexFileNames.h 2025-07-14 10:05:34.796157976 +0100 +--- clucene.orig/src/core/CLucene/index/_IndexFileNames.h 2025-07-22 11:53:24.808844233 +0100 ++++ clucene/src/core/CLucene/index/_IndexFileNames.h 2025-07-22 11:53:28.938818701 +0100 @@ -14,26 +14,26 @@ static CL_NS(util)::ConstValueArray<const char*> _COMPOUND_EXTENSIONS; static CL_NS(util)::ConstValueArray<const char*> _VECTOR_EXTENSIONS; @@ -8613,8 +8634,8 @@ diff -ru clucene.orig/src/core/CLucene/index/_IndexFileNames.h clucene/src/core/ LUCENE_STATIC_CONSTANT(int32_t,COMPOUND_EXTENSIONS_LENGTH=7); LUCENE_STATIC_CONSTANT(int32_t,VECTOR_EXTENSIONS_LENGTH=3); diff -ru clucene.orig/src/core/CLucene/index/IndexWriter.cpp clucene/src/core/CLucene/index/IndexWriter.cpp ---- clucene.orig/src/core/CLucene/index/IndexWriter.cpp 2025-07-14 10:02:13.797063065 +0100 -+++ clucene/src/core/CLucene/index/IndexWriter.cpp 2025-07-14 10:04:47.076055233 +0100 +--- clucene.orig/src/core/CLucene/index/IndexWriter.cpp 2025-07-22 11:53:24.808844233 +0100 ++++ clucene/src/core/CLucene/index/IndexWriter.cpp 2025-07-22 11:53:28.939104136 +0100 @@ -40,7 +40,7 @@ CL_NS_DEF(index) @@ -8625,8 +8646,8 @@ diff -ru clucene.orig/src/core/CLucene/index/IndexWriter.cpp clucene/src/core/CL const int32_t IndexWriter::MERGE_READ_BUFFER_SIZE = 4096; diff -ru clucene.orig/src/core/CLucene/index/IndexWriter.h clucene/src/core/CLucene/index/IndexWriter.h ---- clucene.orig/src/core/CLucene/index/IndexWriter.h 2025-07-14 10:02:13.797063065 +0100 -+++ clucene/src/core/CLucene/index/IndexWriter.h 2025-07-14 10:04:43.787880123 +0100 +--- clucene.orig/src/core/CLucene/index/IndexWriter.h 2025-07-22 11:53:24.808844233 +0100 ++++ clucene/src/core/CLucene/index/IndexWriter.h 2025-07-22 11:53:28.940003758 +0100 @@ -353,7 +353,7 @@ /** * Name of the write lock in the index. @@ -8637,8 +8658,8 @@ diff -ru clucene.orig/src/core/CLucene/index/IndexWriter.h clucene/src/core/CLuc /** * @deprecated diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParserConstants.h clucene/src/core/CLucene/queryParser/QueryParserConstants.h ---- clucene.orig/src/core/CLucene/queryParser/QueryParserConstants.h 2025-07-14 21:22:25.584506533 +0100 -+++ clucene/src/core/CLucene/queryParser/QueryParserConstants.h 2025-07-14 21:22:35.958548353 +0100 +--- clucene.orig/src/core/CLucene/queryParser/QueryParserConstants.h 2025-07-22 11:53:24.810408214 +0100 ++++ clucene/src/core/CLucene/queryParser/QueryParserConstants.h 2025-07-22 11:53:28.940666729 +0100 @@ -53,7 +53,7 @@ DEFAULT = 3 }; @@ -8649,8 +8670,8 @@ diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParserConstants.h clucen protected: /** diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParser.cpp clucene/src/core/CLucene/queryParser/QueryParser.cpp ---- clucene.orig/src/core/CLucene/queryParser/QueryParser.cpp 2025-07-14 21:22:25.587506546 +0100 -+++ clucene/src/core/CLucene/queryParser/QueryParser.cpp 2025-07-14 21:22:35.959114783 +0100 +--- clucene.orig/src/core/CLucene/queryParser/QueryParser.cpp 2025-07-22 11:53:24.810408214 +0100 ++++ clucene/src/core/CLucene/queryParser/QueryParser.cpp 2025-07-22 11:53:28.940905259 +0100 @@ -43,7 +43,7 @@ CL_NS_DEF(queryParser) @@ -8670,8 +8691,8 @@ diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParser.cpp clucene/src/c // TODO: Check to see what's a realistic initial value for the buffers here // TODO: Make eol configurable (will be useful for PrintStream implementation as well later)? diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParser.h clucene/src/core/CLucene/queryParser/QueryParser.h ---- clucene.orig/src/core/CLucene/queryParser/QueryParser.h 2025-07-14 21:22:25.584506533 +0100 -+++ clucene/src/core/CLucene/queryParser/QueryParser.h 2025-07-14 21:22:35.960694453 +0100 +--- clucene.orig/src/core/CLucene/queryParser/QueryParser.h 2025-07-22 11:53:24.810408214 +0100 ++++ clucene/src/core/CLucene/queryParser/QueryParser.h 2025-07-22 11:53:28.941764082 +0100 @@ -524,7 +524,7 @@ TCHAR* getParseExceptionMessage(QueryToken* currentToken, CL_NS(util)::CLVector< CL_NS(util)::ValueArray<int32_t>*, @@ -8682,8 +8703,8 @@ diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParser.h clucene/src/cor CL_NS_END #endif diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.cpp clucene/src/core/CLucene/queryParser/QueryParserTokenManager.cpp ---- clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.cpp 2025-07-14 21:22:25.587506546 +0100 -+++ clucene/src/core/CLucene/queryParser/QueryParserTokenManager.cpp 2025-07-14 21:22:30.826276026 +0100 +--- clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.cpp 2025-07-22 11:53:24.810408214 +0100 ++++ clucene/src/core/CLucene/queryParser/QueryParserTokenManager.cpp 2025-07-22 11:53:28.942300758 +0100 @@ -23,12 +23,12 @@ 15, 17, 18, 29, 32, 23, 33, 30, 20, 21, 32, 23, 33, 31, 34, 27, 2, 4, 5, 0, 1 @@ -8700,8 +8721,8 @@ diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.cpp c _T("RangeEx"), _T("RangeIn"), diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.h clucene/src/core/CLucene/queryParser/QueryParserTokenManager.h ---- clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.h 2025-07-14 10:02:13.798859548 +0100 -+++ clucene/src/core/CLucene/queryParser/QueryParserTokenManager.h 2025-07-14 10:04:16.156729609 +0100 +--- clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.h 2025-07-22 11:53:24.810408214 +0100 ++++ clucene/src/core/CLucene/queryParser/QueryParserTokenManager.h 2025-07-22 11:53:28.942700800 +0100 @@ -68,8 +68,8 @@ const int64_t l2); @@ -8714,8 +8735,8 @@ diff -ru clucene.orig/src/core/CLucene/queryParser/QueryParserTokenManager.h clu static const int64_t jjtoToken []; static const int64_t jjtoSkip []; diff -ru clucene.orig/src/core/CLucene/util/MD5Digester.cpp clucene/src/core/CLucene/util/MD5Digester.cpp ---- clucene.orig/src/core/CLucene/util/MD5Digester.cpp 2025-07-14 10:02:13.802928930 +0100 -+++ clucene/src/core/CLucene/util/MD5Digester.cpp 2025-07-14 10:02:16.707048030 +0100 +--- clucene.orig/src/core/CLucene/util/MD5Digester.cpp 2025-07-22 11:53:24.815276214 +0100 ++++ clucene/src/core/CLucene/util/MD5Digester.cpp 2025-07-22 11:53:28.942865174 +0100 @@ -44,7 +44,7 @@ #include "_MD5Digester.h" CL_NS_DEF(util) @@ -8762,8 +8783,8 @@ diff -ru clucene.orig/src/core/CLucene/util/MD5Digester.cpp clucene/src/core/CLu uint32_t i, j; diff -ru clucene.orig/src/core/CLucene/util/_MD5Digester.h clucene/src/core/CLucene/util/_MD5Digester.h ---- clucene.orig/src/core/CLucene/util/_MD5Digester.h 2025-07-14 10:02:13.802928930 +0100 -+++ clucene/src/core/CLucene/util/_MD5Digester.h 2025-07-14 10:02:16.707185796 +0100 +--- clucene.orig/src/core/CLucene/util/_MD5Digester.h 2025-07-22 11:53:24.815276214 +0100 ++++ clucene/src/core/CLucene/util/_MD5Digester.h 2025-07-22 11:53:28.943363542 +0100 @@ -58,15 +58,15 @@ public: md5() { Init(); } @@ -8785,8 +8806,8 @@ diff -ru clucene.orig/src/core/CLucene/util/_MD5Digester.h clucene/src/core/CLuc inline uint32_t rotate_left(uint32_t x, uint32_t n) diff -ru clucene.orig/src/shared/CLucene/SharedHeader.cpp clucene/src/shared/CLucene/SharedHeader.cpp ---- clucene.orig/src/shared/CLucene/SharedHeader.cpp 2025-07-14 10:02:13.807381245 +0100 -+++ clucene/src/shared/CLucene/SharedHeader.cpp 2025-07-14 10:03:56.173760153 +0100 +--- clucene.orig/src/shared/CLucene/SharedHeader.cpp 2025-07-22 11:53:24.826861980 +0100 ++++ clucene/src/shared/CLucene/SharedHeader.cpp 2025-07-22 11:53:28.943715967 +0100 @@ -13,8 +13,8 @@ #endif @@ -8799,8 +8820,8 @@ diff -ru clucene.orig/src/shared/CLucene/SharedHeader.cpp clucene/src/shared/CLu #if defined(_ASCII) diff -ru clucene.orig/src/shared/CLucene/_SharedHeader.h clucene/src/shared/CLucene/_SharedHeader.h ---- clucene.orig/src/shared/CLucene/_SharedHeader.h 2025-07-14 10:02:13.807381245 +0100 -+++ clucene/src/shared/CLucene/_SharedHeader.h 2025-07-14 10:03:51.636596029 +0100 +--- clucene.orig/src/shared/CLucene/_SharedHeader.h 2025-07-22 11:53:24.826861980 +0100 ++++ clucene/src/shared/CLucene/_SharedHeader.h 2025-07-22 11:53:28.943864199 +0100 @@ -47,9 +47,9 @@ @@ -8814,8 +8835,8 @@ diff -ru clucene.orig/src/shared/CLucene/_SharedHeader.h clucene/src/shared/CLuc #if defined(_WIN32) || defined(_WIN64) diff -ru clucene.orig/src/shared/CLucene/util/Misc.cpp clucene/src/shared/CLucene/util/Misc.cpp ---- clucene.orig/src/shared/CLucene/util/Misc.cpp 2025-07-14 10:02:13.807762156 +0100 -+++ clucene/src/shared/CLucene/util/Misc.cpp 2025-07-14 10:02:16.707295208 +0100 +--- clucene.orig/src/shared/CLucene/util/Misc.cpp 2025-07-22 11:53:24.826861980 +0100 ++++ clucene/src/shared/CLucene/util/Misc.cpp 2025-07-22 11:53:28.944014973 +0100 @@ -407,7 +407,7 @@ } diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk index 20cf9184516e..fbb6ecdd4bad 100644 --- a/external/coinmp/UnpackedTarball_coinmp.mk +++ b/external/coinmp/UnpackedTarball_coinmp.mk @@ -37,6 +37,9 @@ endif # * external/coinmp/Wnon-c-typedef-for-linkage.patch upstream at # <https://list.coin-or.org/pipermail/coin-discuss/2020-February/003972.html> "[Coin-discuss] # Small patch to fix Clang -Wnon-c-typedef-for-linkage in Clp": +# * external/coinmp/const.patch.1 upstream at +# <https://github.com/coin-or/CoinMP/pull/26> and +# <https://github.com/coin-or/Clp/pull/315> $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\ external/coinmp/no-binaries.patch.1 \ external/coinmp/werror-undef.patch.0 \ @@ -52,6 +55,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\ external/coinmp/bind2nd.patch.1 \ external/coinmp/clang-with-path.patch \ external/coinmp/odr.patch \ + external/coinmp/const.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/coinmp/const.patch.1 b/external/coinmp/const.patch.1 new file mode 100644 index 000000000000..d7e462f0a987 --- /dev/null +++ b/external/coinmp/const.patch.1 @@ -0,0 +1,44 @@ +diff -ru coinmp.orig/Clp/src/CbcOrClpParam.cpp coinmp/Clp/src/CbcOrClpParam.cpp +--- coinmp.orig/Clp/src/CbcOrClpParam.cpp 2025-07-19 12:25:58.571664720 +0100 ++++ coinmp/Clp/src/CbcOrClpParam.cpp 2025-07-19 12:31:48.302362167 +0100 +@@ -29,9 +29,9 @@ + #endif + #ifdef COIN_HAS_CBC + // from CoinSolve +-static char coin_prompt[] = "Coin:"; ++static const char coin_prompt[] = "Coin:"; + #else +-static char coin_prompt[] = "Clp:"; ++static const char coin_prompt[] = "Clp:"; + #endif + #ifdef CLP_CILK + #ifndef CBC_THREAD +diff -ru coinmp.orig/Clp/src/ClpLsqr.cpp coinmp/Clp/src/ClpLsqr.cpp +--- coinmp.orig/Clp/src/ClpLsqr.cpp 2025-07-19 12:25:58.565664691 +0100 ++++ coinmp/Clp/src/ClpLsqr.cpp 2025-07-19 12:26:11.300280454 +0100 +@@ -20,7 +20,7 @@ + */ + + // Initialize. +- static char term_msg[8][80] = { ++ static const char term_msg[8][80] = { + "The exact solution is x = 0", + "The residual Ax - b is small enough, given ATOL and BTOL", + "The least squares error is small enough, given ATOL", +diff -ru coinmp.orig/CoinMP/src/CoinMP.cpp coinmp/CoinMP/src/CoinMP.cpp +--- coinmp.orig/CoinMP/src/CoinMP.cpp 2025-07-19 12:25:58.538664560 +0100 ++++ coinmp/CoinMP/src/CoinMP.cpp 2025-07-19 12:29:50.486149026 +0100 +@@ -35,11 +35,11 @@ + #include "CoinMP.h" + + +-const char* COINMP_VERSIONSTR = "1.8.4"; ++const char* const COINMP_VERSIONSTR = "1.8.4"; + const int COINMP_VERSIONINT = 184; + const double COINMP_VERSIONDBL = 1.84; + +-const char* COINMP_NAME = "CoinMP"; ++const char* const COINMP_NAME = "CoinMP"; + + + /************************************************************************/ diff --git a/external/lcms2/0001-Mark-some-tables-as-const.patch.1 b/external/lcms2/0001-Mark-some-tables-as-const.patch.1 new file mode 100644 index 000000000000..6c00dd89faba --- /dev/null +++ b/external/lcms2/0001-Mark-some-tables-as-const.patch.1 @@ -0,0 +1,40 @@ +From 58affbcc90f060b6b34bad2ed508a2d159fd9320 Mon Sep 17 00:00:00 2001 +From: Marti Maria <marti.maria@littlecms.com> +Date: Mon, 21 Jul 2025 20:12:09 +0200 +Subject: [PATCH] Mark some tables as const + +per PR #501 +--- + src/cmsalpha.c | 2 +- + src/cmscgats.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cmsalpha.c b/src/cmsalpha.c +index a5f1a16..b8e1a26 100644 +--- a/src/cmsalpha.c ++++ b/src/cmsalpha.c +@@ -377,7 +377,7 @@ int FormatterPos(cmsUInt32Number frm) + static + cmsFormatterAlphaFn _cmsGetFormatterAlpha(cmsContext id, cmsUInt32Number in, cmsUInt32Number out) + { +-static cmsFormatterAlphaFn FormattersAlpha[6][6] = { ++static const cmsFormatterAlphaFn FormattersAlpha[6][6] = { + + /* from 8 */ { copy8, from8to16, from8to16SE, from8toHLF, from8toFLT, from8toDBL }, + /* from 16*/ { from16to8, copy16, from16to16, from16toHLF, from16toFLT, from16toDBL }, +diff --git a/src/cmscgats.c b/src/cmscgats.c +index 53e3442..7df8a16 100644 +--- a/src/cmscgats.c ++++ b/src/cmscgats.c +@@ -266,7 +266,7 @@ typedef struct { + WRITEMODE as; // How is supposed to be written + } PROPERTY; + +-static PROPERTY PredefinedProperties[] = { ++static const PROPERTY PredefinedProperties[] = { + + {"NUMBER_OF_FIELDS", WRITE_UNCOOKED}, // Required - NUMBER OF FIELDS + {"NUMBER_OF_SETS", WRITE_UNCOOKED}, // Required - NUMBER OF SETS +-- +2.49.0 + diff --git a/external/lcms2/UnpackedTarball_lcms2.mk b/external/lcms2/UnpackedTarball_lcms2.mk index f99fc708a33e..e6cf51f3911d 100644 --- a/external/lcms2/UnpackedTarball_lcms2.mk +++ b/external/lcms2/UnpackedTarball_lcms2.mk @@ -20,8 +20,12 @@ ifneq ($(MSYSTEM),) $(eval $(call gb_UnpackedTarball_set_patchflags,lcms2,--binary)) endif +# external/lcms2/0001-Mark-some-tables-as-const.patch.1 +# upstream effort at: https://github.com/mm2/Little-CMS/pull/501 + $(eval $(call gb_UnpackedTarball_add_patches,lcms2,\ external/lcms2/lcms2-2.4-windows.patch \ + external/lcms2/0001-Mark-some-tables-as-const.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/liborcus/0001-const-up-some-things-and-move-them-out-of-data-secti.patch b/external/liborcus/0001-const-up-some-things-and-move-them-out-of-data-secti.patch new file mode 100644 index 000000000000..9d3b283ad252 --- /dev/null +++ b/external/liborcus/0001-const-up-some-things-and-move-them-out-of-data-secti.patch @@ -0,0 +1,606 @@ +From 5641adad370edf85df712fcd6c553273f515a868 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Fri, 18 Jul 2025 21:08:49 +0100 +Subject: [PATCH] const up some things and move them out of data section + +--- + include/orcus/tokens.hpp | 4 +- + misc/xml-tokens/gen-odf-tokens.py | 4 +- + misc/xml-tokens/token_util.py | 4 +- + src/liborcus/gnumeric_namespace_types.cpp | 4 +- + src/liborcus/gnumeric_namespace_types.hpp | 2 +- + src/liborcus/gnumeric_tokens.inl | 4 +- + src/liborcus/odf_namespace_types_cpp.inl | 2 +- + src/liborcus/odf_namespace_types_hpp.inl | 2 +- + src/liborcus/odf_tokens.inl | 4 +- + src/liborcus/ods_content_xml_context.cpp | 2 +- + src/liborcus/ooxml_content_types.cpp | 4 +- + src/liborcus/ooxml_content_types.hpp | 2 +- + src/liborcus/ooxml_namespace_types.cpp | 12 +++--- + src/liborcus/ooxml_namespace_types.hpp | 6 +-- + src/liborcus/ooxml_schemas.cpp | 50 +++++++++++------------ + src/liborcus/ooxml_schemas.hpp | 48 +++++++++++----------- + src/liborcus/ooxml_tokens.inl | 4 +- + src/liborcus/opc_context.cpp | 2 +- + src/liborcus/opc_tokens.inl | 4 +- + src/liborcus/xls_xml_namespace_types.cpp | 4 +- + src/liborcus/xls_xml_namespace_types.hpp | 2 +- + src/liborcus/xls_xml_tokens.inl | 4 +- + src/liborcus/yaml_document_tree.cpp | 12 +++--- + src/parser/tokens.cpp | 2 +- + src/parser/types.cpp | 2 +- + 25 files changed, 95 insertions(+), 95 deletions(-) + +diff --git a/include/orcus/tokens.hpp b/include/orcus/tokens.hpp +index 9edc8771..fde4b924 100644 +--- a/include/orcus/tokens.hpp ++++ b/include/orcus/tokens.hpp +@@ -31,7 +31,7 @@ class ORCUS_PSR_DLLPUBLIC tokens + public: + tokens() = delete; + tokens(const tokens&) = delete; +- tokens(const char** token_names, size_t token_name_count); ++ tokens(const char* const* token_names, size_t token_name_count); + ~tokens(); + + /** +@@ -64,7 +64,7 @@ private: + using token_map_type = std::unordered_map<std::string_view, xml_token_t>; + + token_map_type m_tokens; +- const char** m_token_names; ++ const char* const* m_token_names; + size_t m_token_name_count; + }; + +diff --git a/misc/xml-tokens/gen-odf-tokens.py b/misc/xml-tokens/gen-odf-tokens.py +index 2838604b..af83ed80 100755 +--- a/misc/xml-tokens/gen-odf-tokens.py ++++ b/misc/xml-tokens/gen-odf-tokens.py +@@ -98,7 +98,7 @@ def gen_namespace_tokens(filepath, ns_values): + outfile.write("extern const xmlns_id_t NS_odf_") + outfile.write(key) + outfile.write(";\n") +- outfile.write("\nextern const xmlns_id_t* NS_odf_all;\n") ++ outfile.write("\nextern const xmlns_id_t* const NS_odf_all;\n") + outfile.write("\n}\n\n") + outfile.close() + +@@ -125,7 +125,7 @@ def gen_namespace_tokens(filepath, ns_values): + outfile.write("};\n\n") + outfile.write("} // anonymous\n\n") + +- outfile.write("const xmlns_id_t* NS_odf_all = odf_ns;\n\n") ++ outfile.write("const xmlns_id_t* const NS_odf_all = odf_ns;\n\n") + + outfile.write("}\n\n") + outfile.close() +diff --git a/misc/xml-tokens/token_util.py b/misc/xml-tokens/token_util.py +index 19ba4369..ddf637ac 100644 +--- a/misc/xml-tokens/token_util.py ++++ b/misc/xml-tokens/token_util.py +@@ -57,7 +57,7 @@ def gen_token_names(outfile, tokens): + print(get_auto_gen_warning(), file=f) + print(file=f) + +- print("const char* token_names[] = {", file=f) ++ print("const char* const token_names[] = {", file=f) + print(f" \"{unknown_token_name}\", // 0", file=f) + + for i, token in enumerate(tokens): +@@ -67,4 +67,4 @@ def gen_token_names(outfile, tokens): + print(f" \"{token}\"{s} // {i+1}", file=f) + print("};", file=f) + print(file=f) +- print(f"size_t token_name_count = {len(tokens)+1};", file=f) ++ print(f"const size_t token_name_count = {len(tokens)+1};", file=f) +diff --git a/src/liborcus/gnumeric_namespace_types.cpp b/src/liborcus/gnumeric_namespace_types.cpp +index 1ff0ec97..91c97c8f 100644 +--- a/src/liborcus/gnumeric_namespace_types.cpp ++++ b/src/liborcus/gnumeric_namespace_types.cpp +@@ -18,7 +18,7 @@ const xmlns_id_t NS_gnumeric_xsi = "http://www.w3.org/2001/XMLSchema-instance"; + + namespace { + +-xmlns_id_t gnumeric_ns[] = { ++const xmlns_id_t gnumeric_ns[] = { + NS_gnumeric_dc, + NS_gnumeric_gnm, + NS_gnumeric_ooo, +@@ -32,7 +32,7 @@ xmlns_id_t gnumeric_ns[] = { + + } + +-const xmlns_id_t* NS_gnumeric_all = gnumeric_ns; ++const xmlns_id_t* const NS_gnumeric_all = gnumeric_ns; + + } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/src/liborcus/gnumeric_namespace_types.hpp b/src/liborcus/gnumeric_namespace_types.hpp +index 2d6b7ab2..4fa89fc8 100644 +--- a/src/liborcus/gnumeric_namespace_types.hpp ++++ b/src/liborcus/gnumeric_namespace_types.hpp +@@ -18,7 +18,7 @@ extern const xmlns_id_t NS_gnumeric_ooo; + extern const xmlns_id_t NS_gnumeric_xlink; + extern const xmlns_id_t NS_gnumeric_xsi; + +-extern const xmlns_id_t* NS_gnumeric_all; ++extern const xmlns_id_t* const NS_gnumeric_all; + + } + +diff --git a/src/liborcus/gnumeric_tokens.inl b/src/liborcus/gnumeric_tokens.inl +index c20fb69b..ecd8e74d 100644 +--- a/src/liborcus/gnumeric_tokens.inl ++++ b/src/liborcus/gnumeric_tokens.inl +@@ -1,6 +1,6 @@ + // This file has been auto-generated. Do not hand-edit this. + +-const char* token_names[] = { ++const char* const token_names[] = { + "??", // 0 + "Active", // 1 + "AllowBlank", // 2 +@@ -279,4 +279,4 @@ const char* token_names[] = { + "width" // 275 + }; + +-size_t token_name_count = 276; ++const size_t token_name_count = 276; +diff --git a/src/liborcus/odf_namespace_types_cpp.inl b/src/liborcus/odf_namespace_types_cpp.inl +index 8b0dc1ff..a91959a3 100644 +--- a/src/liborcus/odf_namespace_types_cpp.inl ++++ b/src/liborcus/odf_namespace_types_cpp.inl +@@ -57,7 +57,7 @@ const xmlns_id_t odf_ns[] = { + + } // anonymous + +-const xmlns_id_t* NS_odf_all = odf_ns; ++const xmlns_id_t* const NS_odf_all = odf_ns; + + } + +diff --git a/src/liborcus/odf_namespace_types_hpp.inl b/src/liborcus/odf_namespace_types_hpp.inl +index a80c9173..75941235 100644 +--- a/src/liborcus/odf_namespace_types_hpp.inl ++++ b/src/liborcus/odf_namespace_types_hpp.inl +@@ -25,7 +25,7 @@ extern const xmlns_id_t NS_odf_xforms; + extern const xmlns_id_t NS_odf_xhtml; + extern const xmlns_id_t NS_odf_xlink; + +-extern const xmlns_id_t* NS_odf_all; ++extern const xmlns_id_t* const NS_odf_all; + + } + +diff --git a/src/liborcus/odf_tokens.inl b/src/liborcus/odf_tokens.inl +index 623c7216..21c85618 100644 +--- a/src/liborcus/odf_tokens.inl ++++ b/src/liborcus/odf_tokens.inl +@@ -1,6 +1,6 @@ + // This file has been auto-generated. Do not hand-edit this. + +-const char* token_names[] = { ++const char* const token_names[] = { + "??", // 0 + "0", // 1 + "0deg", // 2 +@@ -2282,4 +2282,4 @@ const char* token_names[] = { + "zero-values" // 2278 + }; + +-size_t token_name_count = 2279; +\ No newline at end of file ++const size_t token_name_count = 2279; +diff --git a/src/liborcus/ods_content_xml_context.cpp b/src/liborcus/ods_content_xml_context.cpp +index bd84b2f8..18c56276 100644 +--- a/src/liborcus/ods_content_xml_context.cpp ++++ b/src/liborcus/ods_content_xml_context.cpp +@@ -34,7 +34,7 @@ namespace cell_value { + using map_type = mdds::sorted_string_map<ods_content_xml_context::cell_value_type>; + + // Keys must be sorted. +-map_type::entry_type entries[] = { ++constexpr map_type::entry_type entries[] = { + { "date", ods_content_xml_context::vt_date }, + { "float", ods_content_xml_context::vt_float }, + { "string", ods_content_xml_context::vt_string } +diff --git a/src/liborcus/ooxml_content_types.cpp b/src/liborcus/ooxml_content_types.cpp +index eb614c7b..13e78d15 100644 +--- a/src/liborcus/ooxml_content_types.cpp ++++ b/src/liborcus/ooxml_content_types.cpp +@@ -37,7 +37,7 @@ const content_type_t CT_image_png = "image/png"; + + namespace { + +-content_type_t cts[] = { ++const content_type_t cts[] = { + CT_ooxml_extended_properties, + CT_ooxml_drawing, + CT_ooxml_vml_drawing, +@@ -68,7 +68,7 @@ content_type_t cts[] = { + + } + +-const content_type_t* CT_all = cts; ++const content_type_t* const CT_all = cts; + + } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/src/liborcus/ooxml_content_types.hpp b/src/liborcus/ooxml_content_types.hpp +index d82dd53f..af8ab7c7 100644 +--- a/src/liborcus/ooxml_content_types.hpp ++++ b/src/liborcus/ooxml_content_types.hpp +@@ -41,7 +41,7 @@ extern const content_type_t CT_image_png; + /** + * Null-terminated array of all content types. + */ +-extern const content_type_t* CT_all; ++extern const content_type_t* const CT_all; + + } + +diff --git a/src/liborcus/ooxml_namespace_types.cpp b/src/liborcus/ooxml_namespace_types.cpp +index 8c1224b2..31b26d2d 100644 +--- a/src/liborcus/ooxml_namespace_types.cpp ++++ b/src/liborcus/ooxml_namespace_types.cpp +@@ -22,7 +22,7 @@ const xmlns_id_t NS_mso_x14 = "http://schemas.microsoft.com/office/spreadsheetml + + namespace { + +-xmlns_id_t ooxml_ns[] = { ++const xmlns_id_t ooxml_ns[] = { + NS_ooxml_a, + NS_ooxml_r, + NS_ooxml_xdr, +@@ -30,13 +30,13 @@ xmlns_id_t ooxml_ns[] = { + nullptr + }; + +-xmlns_id_t opc_ns[] = { ++const xmlns_id_t opc_ns[] = { + NS_opc_ct, + NS_opc_rel, + nullptr + }; + +-xmlns_id_t misc_ns[] = { ++const xmlns_id_t misc_ns[] = { + NS_mc, + NS_mso_x14, + nullptr +@@ -44,9 +44,9 @@ xmlns_id_t misc_ns[] = { + + } + +-const xmlns_id_t* NS_ooxml_all = ooxml_ns; +-const xmlns_id_t* NS_opc_all = opc_ns; +-const xmlns_id_t* NS_misc_all = misc_ns; ++const xmlns_id_t* const NS_ooxml_all = ooxml_ns; ++const xmlns_id_t* const NS_opc_all = opc_ns; ++const xmlns_id_t* const NS_misc_all = misc_ns; + + } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/src/liborcus/ooxml_namespace_types.hpp b/src/liborcus/ooxml_namespace_types.hpp +index 8183bf89..5cd5f519 100644 +--- a/src/liborcus/ooxml_namespace_types.hpp ++++ b/src/liborcus/ooxml_namespace_types.hpp +@@ -26,17 +26,17 @@ extern const xmlns_id_t NS_mso_x14; + /** + * Null-terminated array of all ooxml namespaces. + */ +-extern const xmlns_id_t* NS_ooxml_all; ++extern const xmlns_id_t* const NS_ooxml_all; + + /** + * Null-terminated array of all opc namespaces. + */ +-extern const xmlns_id_t* NS_opc_all; ++extern const xmlns_id_t* const NS_opc_all; + + /** + * Null-terminated array of all the other namespaces. + */ +-extern const xmlns_id_t* NS_misc_all; ++extern const xmlns_id_t* const NS_misc_all; + + } + +diff --git a/src/liborcus/ooxml_schemas.cpp b/src/liborcus/ooxml_schemas.cpp +index b0e86e49..22364ced 100644 +--- a/src/liborcus/ooxml_schemas.cpp ++++ b/src/liborcus/ooxml_schemas.cpp +@@ -9,33 +9,33 @@ + + namespace orcus { + +-schema_t SCH_mc = "http://schemas.openxmlformats.org/markup-compatibility/2006"; +-schema_t SCH_opc_content_types = "http://schemas.openxmlformats.org/package/2006/content-types"; +-schema_t SCH_opc_rels = "http://schemas.openxmlformats.org/package/2006/relationships"; +-schema_t SCH_opc_rels_metadata_core_props = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"; +-schema_t SCH_od_rels_calc_chain = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain"; +-schema_t SCH_od_rels_connections = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections"; +-schema_t SCH_od_rels_printer_settings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings"; +-schema_t SCH_od_rels_rev_headers = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionHeaders"; +-schema_t SCH_od_rels_rev_log = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionLog"; +-schema_t SCH_od_rels_shared_strings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"; +-schema_t SCH_od_rels_styles = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"; +-schema_t SCH_od_rels_theme = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"; +-schema_t SCH_od_rels_usernames = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/usernames"; +-schema_t SCH_od_rels_worksheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"; +-schema_t SCH_od_rels_extended_props = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"; +-schema_t SCH_od_rels_office_doc = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"; +-schema_t SCH_od_rels_table = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"; +-schema_t SCH_od_rels_pivot_cache_def = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition"; +-schema_t SCH_od_rels_pivot_cache_rec = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords"; +-schema_t SCH_od_rels_pivot_table = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"; +-schema_t SCH_od_rels_drawing = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"; +-schema_t SCH_xlsx_main = "http://schemas.openxmlformats.org/spreadsheetml/2006/main"; +-schema_t SCH_mso_x14ac = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"; ++const schema_t SCH_mc = "http://schemas.openxmlformats.org/markup-compatibility/2006"; ++const schema_t SCH_opc_content_types = "http://schemas.openxmlformats.org/package/2006/content-types"; ++const schema_t SCH_opc_rels = "http://schemas.openxmlformats.org/package/2006/relationships"; ++const schema_t SCH_opc_rels_metadata_core_props = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"; ++const schema_t SCH_od_rels_calc_chain = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain"; ++const schema_t SCH_od_rels_connections = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections"; ++const schema_t SCH_od_rels_printer_settings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings"; ++const schema_t SCH_od_rels_rev_headers = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionHeaders"; ++const schema_t SCH_od_rels_rev_log = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionLog"; ++const schema_t SCH_od_rels_shared_strings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"; ++const schema_t SCH_od_rels_styles = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"; ++const schema_t SCH_od_rels_theme = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"; ++const schema_t SCH_od_rels_usernames = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/usernames"; ++const schema_t SCH_od_rels_worksheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"; ++const schema_t SCH_od_rels_extended_props = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"; ++const schema_t SCH_od_rels_office_doc = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"; ++const schema_t SCH_od_rels_table = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"; ++const schema_t SCH_od_rels_pivot_cache_def = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition"; ++const schema_t SCH_od_rels_pivot_cache_rec = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords"; ++const schema_t SCH_od_rels_pivot_table = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"; ++const schema_t SCH_od_rels_drawing = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"; ++const schema_t SCH_xlsx_main = "http://schemas.openxmlformats.org/spreadsheetml/2006/main"; ++const schema_t SCH_mso_x14ac = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"; + + namespace { + +-schema_t schs[] = { ++const schema_t schs[] = { + SCH_mc, + SCH_opc_content_types, + SCH_opc_rels, +@@ -64,7 +64,7 @@ schema_t schs[] = { + + } + +-schema_t* SCH_all = schs; ++const schema_t* const SCH_all = schs; + + } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/src/liborcus/ooxml_schemas.hpp b/src/liborcus/ooxml_schemas.hpp +index 85adb6f2..bb0c0a06 100644 +--- a/src/liborcus/ooxml_schemas.hpp ++++ b/src/liborcus/ooxml_schemas.hpp +@@ -12,34 +12,34 @@ + + namespace orcus { + +-extern schema_t SCH_mc; +-extern schema_t SCH_opc_content_types; +-extern schema_t SCH_opc_rels; +-extern schema_t SCH_opc_rels_metadata_core_props; +-extern schema_t SCH_od_rels_calc_chain; +-extern schema_t SCH_od_rels_connections; +-extern schema_t SCH_od_rels_printer_settings; +-extern schema_t SCH_od_rels_rev_headers; +-extern schema_t SCH_od_rels_rev_log; +-extern schema_t SCH_od_rels_shared_strings; +-extern schema_t SCH_od_rels_styles; +-extern schema_t SCH_od_rels_theme; +-extern schema_t SCH_od_rels_usernames; +-extern schema_t SCH_od_rels_worksheet; +-extern schema_t SCH_od_rels_extended_props; +-extern schema_t SCH_od_rels_office_doc; +-extern schema_t SCH_od_rels_table; +-extern schema_t SCH_od_rels_pivot_cache_def; +-extern schema_t SCH_od_rels_pivot_cache_rec; +-extern schema_t SCH_od_rels_pivot_table; +-extern schema_t SCH_od_rels_drawing; +-extern schema_t SCH_xlsx_main; +-extern schema_t SCH_mso_x14ac; ++const extern schema_t SCH_mc; ++const extern schema_t SCH_opc_content_types; ++const extern schema_t SCH_opc_rels; ++const extern schema_t SCH_opc_rels_metadata_core_props; ++const extern schema_t SCH_od_rels_calc_chain; ++const extern schema_t SCH_od_rels_connections; ++const extern schema_t SCH_od_rels_printer_settings; ++const extern schema_t SCH_od_rels_rev_headers; ++const extern schema_t SCH_od_rels_rev_log; ++const extern schema_t SCH_od_rels_shared_strings; ++const extern schema_t SCH_od_rels_styles; ++const extern schema_t SCH_od_rels_theme; ++const extern schema_t SCH_od_rels_usernames; ++const extern schema_t SCH_od_rels_worksheet; ++const extern schema_t SCH_od_rels_extended_props; ++const extern schema_t SCH_od_rels_office_doc; ++const extern schema_t SCH_od_rels_table; ++const extern schema_t SCH_od_rels_pivot_cache_def; ++const extern schema_t SCH_od_rels_pivot_cache_rec; ++const extern schema_t SCH_od_rels_pivot_table; ++const extern schema_t SCH_od_rels_drawing; ++const extern schema_t SCH_xlsx_main; ++const extern schema_t SCH_mso_x14ac; + + /** + * Null-terminated array of all schema types. + */ +-extern schema_t* SCH_all; ++const extern schema_t* const SCH_all; + + } + +diff --git a/src/liborcus/ooxml_tokens.inl b/src/liborcus/ooxml_tokens.inl +index 5fa2ad05..e9a74419 100644 +--- a/src/liborcus/ooxml_tokens.inl ++++ b/src/liborcus/ooxml_tokens.inl +@@ -1,6 +1,6 @@ + // This file has been auto-generated. Do not hand-edit this. + +-const char* token_names[] = { ++const char* const token_names[] = { + "??", // 0 + "AbbreviatedCaseNumber", // 1 + "Accel", // 2 +@@ -3521,4 +3521,4 @@ const char* token_names[] = { + "zoomToFit" // 3517 + }; + +-size_t token_name_count = 3518; +\ No newline at end of file ++const size_t token_name_count = 3518; +diff --git a/src/liborcus/opc_context.cpp b/src/liborcus/opc_context.cpp +index e3b1bb57..a9936a2c 100644 +--- a/src/liborcus/opc_context.cpp ++++ b/src/liborcus/opc_context.cpp +@@ -240,7 +240,7 @@ opc_relations_context::opc_relations_context(session_context& session_cxt, const + xml_context_base(session_cxt, _tokens) + { + // build content type cache. +- for (schema_t* p = SCH_all; *p; ++p) ++ for (const schema_t* p = SCH_all; *p; ++p) + m_schema_cache.insert(std::string_view(*p)); + } + +diff --git a/src/liborcus/opc_tokens.inl b/src/liborcus/opc_tokens.inl +index 5f72a6a1..e8cc7c6d 100644 +--- a/src/liborcus/opc_tokens.inl ++++ b/src/liborcus/opc_tokens.inl +@@ -1,6 +1,6 @@ + // This file has been auto-generated. Do not hand-edit this. + +-const char* token_names[] = { ++const char* const token_names[] = { + "??", // 0 + "ContentType", // 1 + "Default", // 2 +@@ -32,5 +32,5 @@ const char* token_names[] = { + "version" // 28 + }; + +-size_t token_name_count = 29; ++const size_t token_name_count = 29; + +diff --git a/src/liborcus/xls_xml_namespace_types.cpp b/src/liborcus/xls_xml_namespace_types.cpp +index 96ccf6de..a93758f9 100644 +--- a/src/liborcus/xls_xml_namespace_types.cpp ++++ b/src/liborcus/xls_xml_namespace_types.cpp +@@ -16,7 +16,7 @@ const xmlns_id_t NS_xls_xml_html ="http://www.w3.org/TR/REC-html40"; + + namespace { + +-xmlns_id_t xls_xml_ns[] = { ++const xmlns_id_t xls_xml_ns[] = { + NS_xls_xml_ss, + NS_xls_xml_o, + NS_xls_xml_x, +@@ -26,7 +26,7 @@ xmlns_id_t xls_xml_ns[] = { + + } + +-const xmlns_id_t* NS_xls_xml_all = xls_xml_ns; ++const xmlns_id_t* const NS_xls_xml_all = xls_xml_ns; + + } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/src/liborcus/xls_xml_namespace_types.hpp b/src/liborcus/xls_xml_namespace_types.hpp +index 37de5b0a..de7bf4a1 100644 +--- a/src/liborcus/xls_xml_namespace_types.hpp ++++ b/src/liborcus/xls_xml_namespace_types.hpp +@@ -20,7 +20,7 @@ extern const xmlns_id_t NS_xls_xml_html; + /** + * Null-terminated array of all xls xml namespaces. + */ +-extern const xmlns_id_t* NS_xls_xml_all; ++extern const xmlns_id_t* const NS_xls_xml_all; + + } + +diff --git a/src/liborcus/xls_xml_tokens.inl b/src/liborcus/xls_xml_tokens.inl +index 73cd1fc5..ca961b97 100644 +--- a/src/liborcus/xls_xml_tokens.inl ++++ b/src/liborcus/xls_xml_tokens.inl +@@ -1,6 +1,6 @@ + // This file has been auto-generated. Do not hand-edit this. + +-const char* token_names[] = { ++const char* const token_names[] = { + "??", // 0 + "AcceptLabelsInFormulas", // 1 + "Action", // 2 +@@ -994,4 +994,4 @@ const char* token_names[] = { + "yrange" // 990 + }; + +-size_t token_name_count = 991; ++const size_t token_name_count = 991; +diff --git a/src/liborcus/yaml_document_tree.cpp b/src/liborcus/yaml_document_tree.cpp +index 1bd37a8b..c65793f4 100644 +--- a/src/liborcus/yaml_document_tree.cpp ++++ b/src/liborcus/yaml_document_tree.cpp +@@ -558,11 +558,11 @@ const_node document_tree::get_document_root(size_t index) const + + namespace { + +-const char* indent = " "; +-const char* kw_true = "true"; +-const char* kw_false = "false"; +-const char* kw_tilde = "~"; +-const char* kw_null = "null"; ++const char* const indent = " "; ++const char* const kw_true = "true"; ++const char* const kw_false = "false"; ++const char* const kw_tilde = "~"; ++const char* const kw_null = "null"; + + const char quote = '"'; + +@@ -812,7 +812,7 @@ void dump_json_node(std::ostringstream& os, const yaml_value& node, size_t scope + } + } + +-const char* warning_multiple_documents = ++const char* const warning_multiple_documents = + "warning: this YAML file contains multiple documents. Only the first document\n" + "will be written."; + +diff --git a/src/parser/tokens.cpp b/src/parser/tokens.cpp +index 5d3c5333..e28219f7 100644 +--- a/src/parser/tokens.cpp ++++ b/src/parser/tokens.cpp +@@ -9,7 +9,7 @@ + + namespace orcus { + +-tokens::tokens(const char** token_names, size_t token_name_count) : ++tokens::tokens(const char* const* token_names, size_t token_name_count) : + m_token_names(token_names), + m_token_name_count(token_name_count) + { +diff --git a/src/parser/types.cpp b/src/parser/types.cpp +index ae8843e2..fdf39cb0 100644 +--- a/src/parser/types.cpp ++++ b/src/parser/types.cpp +@@ -1427,7 +1427,7 @@ std::ostream& operator<< (std::ostream& os, const date_time_t& v) + + std::ostream& operator<< (std::ostream& os, format_t v) + { +- static const char* values[] = { ++ static const char* const values[] = { + "unknown", + "ods", + "xlsx", +-- +2.49.0 + diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 8bf355a1abed..da57d0de383c 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -13,9 +13,13 @@ $(eval $(call gb_UnpackedTarball_set_tarball,liborcus,$(ORCUS_TARBALL))) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus)) +# external/liborcus/0001-const-up-some-things-and-move-them-out-of-data-secti.patch +# upstream effort as: https://gitlab.com/orcus/orcus/-/merge_requests/225 + $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/rpath.patch.0 \ external/liborcus/libtool.patch.0 \ + external/liborcus/0001-const-up-some-things-and-move-them-out-of-data-secti.patch \ )) ifeq ($(OS),WNT) diff --git a/external/libwpd/0001-const-up-tibetanMap1-to-move-out-of-data-section.patch.1 b/external/libwpd/0001-const-up-tibetanMap1-to-move-out-of-data-section.patch.1 new file mode 100644 index 000000000000..b72f6b48da81 --- /dev/null +++ b/external/libwpd/0001-const-up-tibetanMap1-to-move-out-of-data-section.patch.1 @@ -0,0 +1,25 @@ +From 25b5652b66fb7db429e5a5b4c6d484c96b37c532 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Fri, 18 Jul 2025 20:37:15 +0100 +Subject: [PATCH] const up tibetanMap1 to move out of data section + +--- + src/lib/WP6TibetanMap.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/WP6TibetanMap.h b/src/lib/WP6TibetanMap.h +index 6d4545de..39038cfc 100644 +--- a/src/lib/WP6TibetanMap.h ++++ b/src/lib/WP6TibetanMap.h +@@ -228,7 +228,7 @@ const unsigned tibetan_1_250[] = { 0x0F7C, 0x0F7E, 0 }; + const unsigned tibetan_1_251[] = { 0x0F7D, 0x0F7E, 0 }; + const unsigned tibetan_1_252[] = { 0x0F84, 0 }; + +-const unsigned *tibetanMap1[] = ++const unsigned* const tibetanMap1[] = + { + nullptr, + nullptr, +-- +2.49.0 + diff --git a/external/libwpd/UnpackedTarball_libwpd.mk b/external/libwpd/UnpackedTarball_libwpd.mk index c72baa515d09..3e8cea767584 100644 --- a/external/libwpd/UnpackedTarball_libwpd.mk +++ b/external/libwpd/UnpackedTarball_libwpd.mk @@ -15,11 +15,15 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwpd,0)) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwpd)) +# external/libwpd/0001-const-up-tibetanMap1-to-move-out-of-data-section.patch.1 +# upstream effort as: https://sourceforge.net/p/libwpd/code/merge-requests/1/ + $(eval $(call gb_UnpackedTarball_add_patches,libwpd,\ external/libwpd/libwpd-vs2013.patch.1 \ external/libwpd/tdf153034_3_WrongGreekCharactersWP5Import.patch \ $(if $(SYSTEM_REVENGE),,external/libwpd/rpath.patch) \ external/libwpd/include.patch \ + external/libwpd/0001-const-up-tibetanMap1-to-move-out-of-data-section.patch.1 \ )) ifneq ($(OS),MACOSX) diff --git a/external/libwps/0001-const-up-some-things.patch.1 b/external/libwps/0001-const-up-some-things.patch.1 new file mode 100644 index 000000000000..6b64bd92b83a --- /dev/null +++ b/external/libwps/0001-const-up-some-things.patch.1 @@ -0,0 +1,63 @@ +From 3dc9924f0494f9da84e8618607a7dc6084401afa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Sat, 19 Jul 2025 21:11:34 +0100 +Subject: [PATCH] const up some things + +and so move them out of the data section +--- + src/lib/LotusStyleManager.cpp | 2 +- + src/lib/Multiplan.cpp | 4 ++-- + src/lib/WPSOLEParser.cpp | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/lib/LotusStyleManager.cpp b/src/lib/LotusStyleManager.cpp +index 2030c12..eab74ee 100644 +--- a/src/lib/LotusStyleManager.cpp ++++ b/src/lib/LotusStyleManager.cpp +@@ -472,7 +472,7 @@ bool State::getColor256(int id, WPSColor &color) + return false; + } + // in one file, find 0xEF as current... +- static uint32_t colorMap[]= ++ static const uint32_t colorMap[]= + { + 0xffffff, 0xffcc99, 0xffffcc, 0xccff99, 0x99ff33, 0x99ff66, 0x99ff99, 0xccffcc, // 0 + 0xccffff, 0x99ccff, 0x6699ff, 0xccccff, 0xcc99ff, 0xffccff, 0xff99cc, 0xffffff, +diff --git a/src/lib/Multiplan.cpp b/src/lib/Multiplan.cpp +index 2a0fecc..650ccea 100644 +--- a/src/lib/Multiplan.cpp ++++ b/src/lib/Multiplan.cpp +@@ -1017,7 +1017,7 @@ static Functions const s_listOperators[] = + { "", -2}, { "", -2}, { "", -2}, { "", -2}, + }; + +-static char const *s_listFunctions[]= ++static char const* const s_listFunctions[]= + { + // 0 + "Count", "If", "IsNA", "IsError", +@@ -1371,7 +1371,7 @@ static Functions const s_listOperatorsV2[] = + { "", -2}, { "", -2}, { "", -2}, { "", -2}, + }; + +-static char const *s_listFunctionsV2[]= ++static char const* const s_listFunctionsV2[]= + { + // 0 + nullptr /* special Row */, nullptr/* special Column*/, nullptr/* checkme: unknown*/, nullptr/* checkme: unknown*/, +diff --git a/src/lib/WPSOLEParser.cpp b/src/lib/WPSOLEParser.cpp +index 0c67bec..310766a 100644 +--- a/src/lib/WPSOLEParser.cpp ++++ b/src/lib/WPSOLEParser.cpp +@@ -1280,7 +1280,7 @@ bool WPSOLEParser::readSummaryInformation(RVNGInputStreamPtr input, std::string + librevenge::RVNGString text; + if (readSummaryPropertyString(input, endPos, type, text, f) && !text.empty()) + { +- static char const *attribNames[] = ++ static char const* const attribNames[] = + { + "", "", "dc:title", "dc:subject", "meta:initial-creator", + "meta:keywords", "dc:description"/*comment*/, "", "dc:creator" +-- +2.49.0 + diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk index de2e2040abdd..44a0ab6c80ec 100644 --- a/external/libwps/UnpackedTarball_libwps.mk +++ b/external/libwps/UnpackedTarball_libwps.mk @@ -15,10 +15,14 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwps,0)) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwps)) +# external/libwps/0001-const-up-some-things.patch.1 +# upstream effort as: https://sourceforge.net/p/libwps/code/merge-requests/1/ + $(eval $(call gb_UnpackedTarball_add_patches,libwps,\ $(if $(SYSTEM_REVENGE),,external/libwps/rpath.patch.0) \ external/libwps/libtool.patch.0 \ external/libwps/enumarith.patch \ + external/libwps/0001-const-up-some-things.patch.1 \ )) ifneq ($(OS),MACOSX) diff --git a/external/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk index 072cfece9a74..0caabe1263af 100644 --- a/external/libxml2/ExternalPackage_libxml2.mk +++ b/external/libxml2/ExternalPackage_libxml2.mk @@ -13,7 +13,7 @@ $(eval $(call gb_ExternalPackage_use_external_project,libxml2,libxml2)) ifneq ($(DISABLE_DYNLOADING),TRUE) ifeq ($(OS),MACOSX) -$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.2.dylib,.libs/libxml2.2.dylib)) +$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.16.dylib,.libs/libxml2.16.dylib)) else ifeq ($(OS),WNT) ifeq ($(COM),GCC) $(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,.libs/libxml2.dll)) diff --git a/external/redland/UnpackedTarball_rasqal.mk b/external/redland/UnpackedTarball_rasqal.mk index 16d67d6c18f2..d9ee0b59d577 100644 --- a/external/redland/UnpackedTarball_rasqal.mk +++ b/external/redland/UnpackedTarball_rasqal.mk @@ -18,6 +18,9 @@ $(eval $(call gb_UnpackedTarball_add_file,rasqal,src/rasqal.h,external/redland/r $(eval $(call gb_UnpackedTarball_set_patchlevel,rasqal,0)) +# 0001-const-up-rasqal_algebra_node_operator_labels.patch.1 +# upstream effort as: https://github.com/dajobe/rasqal/pull/20 + $(eval $(call gb_UnpackedTarball_add_patches,rasqal,\ external/redland/rasqal/rasqal-pkgconfig.patch.1 \ external/redland/rasqal/rasqal-freebsd.patch.1 \ @@ -28,6 +31,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,rasqal,\ external/redland/rasqal/rpath.patch \ external/redland/rasqal/clang-cl.patch \ external/redland/rasqal/libtool.patch \ + external/redland/rasqal/0001-const-up-rasqal_algebra_node_operator_labels.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/redland/rasqal/0001-const-up-rasqal_algebra_node_operator_labels.patch.1 b/external/redland/rasqal/0001-const-up-rasqal_algebra_node_operator_labels.patch.1 new file mode 100644 index 000000000000..2613b16203ad --- /dev/null +++ b/external/redland/rasqal/0001-const-up-rasqal_algebra_node_operator_labels.patch.1 @@ -0,0 +1,26 @@ +From 7765e00e7a41c4f706bf62418e1f3355eb5bd9fd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Mon, 21 Jul 2025 08:50:15 +0100 +Subject: [PATCH] const up rasqal_algebra_node_operator_labels + +and move the symbol out of the .data section +--- + src/rasqal_algebra.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rasqal_algebra.c b/src/rasqal_algebra.c +index e7e8be97..9131d0de 100644 +--- a/src/rasqal_algebra.c ++++ b/src/rasqal_algebra.c +@@ -773,7 +773,7 @@ rasqal_algebra_node_get_operator(rasqal_algebra_node* node) + } + + +-static struct { ++static const struct { + const char* const label; + size_t length; + } rasqal_algebra_node_operator_labels[RASQAL_ALGEBRA_OPERATOR_LAST + 1] = { +-- +2.49.0 + diff --git a/external/zxing/0001-const-up-some-symbols.patch b/external/zxing/0001-const-up-some-symbols.patch new file mode 100644 index 000000000000..d031a1c06ac3 --- /dev/null +++ b/external/zxing/0001-const-up-some-symbols.patch @@ -0,0 +1,54 @@ +From 62417799d3c46ea52a2e2feba4f97566c50de96c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Sun, 20 Jul 2025 20:56:39 +0100 +Subject: [PATCH] const up some symbols + +and move them out of the .data section +--- + core/src/BarcodeFormat.cpp | 2 +- + core/src/datamatrix/DMSymbolInfo.cpp | 2 +- + core/src/pdf417/PDFEncoder.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/core/src/BarcodeFormat.cpp b/core/src/BarcodeFormat.cpp +index ba9a2937..9be60850 100644 +--- a/core/src/BarcodeFormat.cpp ++++ b/core/src/BarcodeFormat.cpp +@@ -22,7 +22,7 @@ struct BarcodeFormatName + std::string_view name; + }; + +-static BarcodeFormatName NAMES[] = { ++static const BarcodeFormatName NAMES[] = { + {BarcodeFormat::None, "None"}, + {BarcodeFormat::Aztec, "Aztec"}, + {BarcodeFormat::Codabar, "Codabar"}, +diff --git a/core/src/datamatrix/DMSymbolInfo.cpp b/core/src/datamatrix/DMSymbolInfo.cpp +index 9247dd26..fee1b235 100644 +--- a/core/src/datamatrix/DMSymbolInfo.cpp ++++ b/core/src/datamatrix/DMSymbolInfo.cpp +@@ -50,7 +50,7 @@ static constexpr const SymbolInfo PROD_SYMBOLS[] = { + { false, 1558, 620, 22, 22, 36, -1, 62 }, + }; + +-static const SymbolInfo* s_symbols = PROD_SYMBOLS; ++static const SymbolInfo* const s_symbols = PROD_SYMBOLS; + static ZXING_IF_NOT_TEST(const) size_t s_symbolCount = Size(PROD_SYMBOLS); + + #ifdef ZXING_BUILD_FOR_TEST +diff --git a/core/src/pdf417/PDFEncoder.cpp b/core/src/pdf417/PDFEncoder.cpp +index a5b884e4..a5dd3ab4 100644 +--- a/core/src/pdf417/PDFEncoder.cpp ++++ b/core/src/pdf417/PDFEncoder.cpp +@@ -286,7 +286,7 @@ static const short EC_COEFFICIENTS_L8[] = { 352, 77, 373, 504, 35, 599, 428, 2 + 407, 164, 332, 899, 165, 726, 600, 325, 498, 655, 357, 752, 768, 223, 849, 647, + 63, 310, 863, 251, 366, 304, 282, 738, 675, 410, 389, 244, 31, 121, 303, 263, }; + +-static const short* EC_COEFFICIENTS[] = {EC_COEFFICIENTS_L0, EC_COEFFICIENTS_L1, EC_COEFFICIENTS_L2, ++static const short* const EC_COEFFICIENTS[] = {EC_COEFFICIENTS_L0, EC_COEFFICIENTS_L1, EC_COEFFICIENTS_L2, + EC_COEFFICIENTS_L3, EC_COEFFICIENTS_L4, EC_COEFFICIENTS_L5, + EC_COEFFICIENTS_L6, EC_COEFFICIENTS_L7, EC_COEFFICIENTS_L8}; + +-- +2.49.0 + diff --git a/external/zxing/UnpackedTarball_zxing.mk b/external/zxing/UnpackedTarball_zxing.mk index df4a2bdf811d..5c0b6a799d43 100644 --- a/external/zxing/UnpackedTarball_zxing.mk +++ b/external/zxing/UnpackedTarball_zxing.mk @@ -11,6 +11,9 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,zxing)) $(eval $(call gb_UnpackedTarball_set_tarball,zxing,$(ZXING_TARBALL))) +# external/zxing/0001-const-up-some-symbols.patch +# upstream effort at: https://github.com/zxing-cpp/zxing-cpp/pull/979 + ifneq ($(MSYSTEM),) # the 2.3.0 tarball contains dangling symlinks (to a submodule component/experimental backend) # git-bash/msys tar fails when extracting since MSYS defaults to not create those @@ -21,6 +24,7 @@ endif $(eval $(call gb_UnpackedTarball_add_patches,zxing, \ external/zxing/0001-add-ZXVersion-h.patch \ + external/zxing/0001-const-up-some-symbols.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/extras/source/tipoftheday/formdocuments.png b/extras/source/tipoftheday/formdocuments.png Binary files differindex 36daeea3744f..d6089dd3d280 100644 --- a/extras/source/tipoftheday/formdocuments.png +++ b/extras/source/tipoftheday/formdocuments.png diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 19a5c7f2633a..788eccd670f5 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1598,12 +1598,14 @@ ImpPDFTabLinksPage::ImpPDFTabLinksPage(weld::Container* pPage, weld::DialogContr , mbOpnLnksDefaultUserState(false) , mbOpnLnksLaunchUserState(false) , mbOpnLnksBrowserUserState(false) + , mbOpnLnksRemoveUserState(false) , m_xCbExprtBmkrToNmDst(m_xBuilder->weld_check_button(u"export"_ustr)) , m_xCbOOoToPDFTargets(m_xBuilder->weld_check_button(u"convert"_ustr)) , m_xCbExportRelativeFsysLinks(m_xBuilder->weld_check_button(u"exporturl"_ustr)) , m_xRbOpnLnksDefault(m_xBuilder->weld_radio_button(u"default"_ustr)) , m_xRbOpnLnksLaunch(m_xBuilder->weld_radio_button(u"openpdf"_ustr)) , m_xRbOpnLnksBrowser(m_xBuilder->weld_radio_button(u"openinternet"_ustr)) + , m_xRbOpnLnksRemove(m_xBuilder->weld_radio_button(u"removeexternallinks"_ustr)) { } @@ -1632,6 +1634,8 @@ void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* pParent ) mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active(); mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active(); } + // Option to remove links is possible regardless of PDF version + mbOpnLnksRemoveUserState = m_xRbOpnLnksRemove->get_active(); // the control states, or the saved is used // to form the stored selection pParent->mnViewPDFMode = 0; @@ -1639,6 +1643,8 @@ void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* pParent ) pParent->mnViewPDFMode = 2; else if( mbOpnLnksLaunchUserState ) pParent->mnViewPDFMode = 1; + else if( mbOpnLnksRemoveUserState ) + pParent->mnViewPDFMode = 3; pParent->mbConvertOOoTargets = m_xCbOOoToPDFTargets->get_active(); pParent->mbExportBmkToPDFDestination = m_xCbExprtBmkrToNmDst->get_active(); @@ -1668,6 +1674,10 @@ void ImpPDFTabLinksPage::SetFilterConfigItem( const ImpPDFTabDialog* pParent ) m_xRbOpnLnksBrowser->set_active(true); mbOpnLnksBrowserUserState = true; break; + case 3: + m_xRbOpnLnksRemove->set_active(true); + mbOpnLnksRemoveUserState = true; + break; } // now check the status of PDF/A selection @@ -1693,6 +1703,7 @@ void ImpPDFTabLinksPage::ImplPDFALinkControl( bool bEnableLaunch ) m_xRbOpnLnksDefault->set_active(mbOpnLnksDefaultUserState); m_xRbOpnLnksLaunch->set_active(mbOpnLnksLaunchUserState); m_xRbOpnLnksBrowser->set_active(mbOpnLnksBrowserUserState); + m_xRbOpnLnksRemove->set_active(mbOpnLnksRemoveUserState); } else { @@ -1700,6 +1711,7 @@ void ImpPDFTabLinksPage::ImplPDFALinkControl( bool bEnableLaunch ) mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active(); mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active(); mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active(); + mbOpnLnksRemoveUserState = m_xRbOpnLnksRemove->get_active(); m_xRbOpnLnksLaunch->set_sensitive(false); if (mbOpnLnksLaunchUserState) m_xRbOpnLnksBrowser->set_active(true); @@ -1712,6 +1724,7 @@ IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, weld::Toggleable&, mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active(); mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active(); mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active(); + mbOpnLnksRemoveUserState = m_xRbOpnLnksRemove->get_active(); } /// Reset the memory of a launch action present when PDF/A-1 was requested @@ -1720,6 +1733,7 @@ IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, weld::Toggleable&, mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active(); mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active(); mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active(); + mbOpnLnksRemoveUserState = m_xRbOpnLnksRemove->get_active(); } ImplErrorDialog::ImplErrorDialog(weld::Window* pParent, const std::set<vcl::PDFWriter::ErrorCode>& rErrors) diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index aff0023acda0..6d3bc4a3b695 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -389,6 +389,7 @@ class ImpPDFTabLinksPage : public SfxTabPage bool mbOpnLnksDefaultUserState; bool mbOpnLnksLaunchUserState; bool mbOpnLnksBrowserUserState; + bool mbOpnLnksRemoveUserState; std::unique_ptr<weld::CheckButton> m_xCbExprtBmkrToNmDst; std::unique_ptr<weld::CheckButton> m_xCbOOoToPDFTargets; @@ -396,6 +397,7 @@ class ImpPDFTabLinksPage : public SfxTabPage std::unique_ptr<weld::RadioButton> m_xRbOpnLnksDefault; std::unique_ptr<weld::RadioButton> m_xRbOpnLnksLaunch; std::unique_ptr<weld::RadioButton> m_xRbOpnLnksBrowser; + std::unique_ptr<weld::RadioButton> m_xRbOpnLnksRemove; DECL_LINK(ClickRbOpnLnksDefaultHdl, weld::Toggleable&, void); DECL_LINK(ClickRbOpnLnksBrowserHdl, weld::Toggleable&, void); diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index b89244fa0242..8b50dc1bbe45 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -989,6 +989,10 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& // view PDF through an Internet browser aContext.DefaultLinkAction = vcl::PDFWriter::URIActionDestination; break; + case 3: + // do not emit Link annotations for external links + aContext.DefaultLinkAction = vcl::PDFWriter::RemoveExternalLinks; + break; } aContext.ConvertOOoTargetToPDFTarget = bConvertOOoTargetToPDFTarget; diff --git a/filter/uiconfig/ui/pdflinkspage.ui b/filter/uiconfig/ui/pdflinkspage.ui index f1229cc9681e..93d3047737a9 100644 --- a/filter/uiconfig/ui/pdflinkspage.ui +++ b/filter/uiconfig/ui/pdflinkspage.ui @@ -175,6 +175,26 @@ <property name="top-attach">2</property> </packing> </child> + <child> + <object class="GtkRadioButton" id="removeexternallinks"> + <property name="label" translatable="yes" context="pdflinkspage|removeexternallinks">Remove cross-document links</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <property name="group">default</property> + <child internal-child="accessible"> + <object class="AtkObject" id="removeexternallinks-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="pdflinkspage|extended_tip|removeexternallinks">Cross-document links will be removed from your PDF document.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">3</property> + </packing> + </child> </object> </child> <child type="label"> diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 999bc986bf07..2ebab406beac 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -53,11 +53,13 @@ #include <com/sun/star/sdbc/XRowSet.hpp> #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> +#include <com/sun/star/util/NumberFormatter.hpp> #include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/util/XModifiable2.hpp> #include <comphelper/basicio.hxx> +#include <comphelper/numbers.hxx> #include <comphelper/property.hxx> #include <comphelper/seqstream.hxx> #include <comphelper/sequence.hxx> @@ -68,6 +70,7 @@ #include <rtl/math.hxx> #include <rtl/tencinfo.h> #include <svl/inettype.hxx> +#include <svl/numformat.hxx> #include <tools/datetime.hxx> #include <tools/debug.hxx> #include <comphelper/diagnose_ex.hxx> @@ -1923,6 +1926,70 @@ void SAL_CALL ODatabaseForm::reset() } } +Reference<XNumberFormatter> ODatabaseForm::getFormatter() +{ + if (auto xSupplier = dbtools::getNumberFormats(getConnection(), true, m_xContext)) + { + auto result = NumberFormatter::create(m_xContext); + result->attachNumberFormatsSupplier(xSupplier); + return result; + } + return {}; +} + +static void maybeConvertDefaultStringToDate(Any& def, const auto& getFieldPropOrDefault, + const auto& getFormatter) +{ + OUString sDefault; + if (!(def >>= sDefault)) + return; + + sal_Int32 dataType = getFieldPropOrDefault(PROPERTY_FIELDTYPE, sal_Int32()); + if (dataType != css::sdbc::DataType::DATE && dataType != css::sdbc::DataType::TIMESTAMP) + return; + + Reference<XNumberFormatter> xFormatter = getFormatter(); + if (!xFormatter) + return; + + // Convert to a date + sal_uInt32 nFormatKey = xFormatter->detectNumberFormat( + getFieldPropOrDefault(PROPERTY_FORMATKEY, sal_uInt32()), sDefault); + sal_Int16 nType = comphelper::getNumberFormatType(xFormatter, nFormatKey); + if ((nType & css::util::NumberFormat::DATE) == 0) + return; + + Reference<XNumberFormatsSupplier> xSupplier = xFormatter->getNumberFormatsSupplier(); + css::util::Date aNull; + try + { + if (!(xSupplier->getNumberFormatSettings()->getPropertyValue(u"NullDate"_ustr) >>= aNull)) + return; + } + catch (const Exception&) + { + return; + } + ::Date d(aNull); + + double value = xFormatter->convertStringToNumber(nFormatKey, sDefault); + switch (dataType) + { + case css::sdbc::DataType::DATE: + { + d.AddDays(value); + def <<= d.GetUNODate(); + break; + } + case css::sdbc::DataType::TIMESTAMP: + { + ::DateTime dt(d); + dt.AddTime(value); + def <<= dt.GetUNODateTime(); + break; + } + } +} void ODatabaseForm::reset_impl(bool _bApproveByListeners) { @@ -1956,31 +2023,34 @@ void ODatabaseForm::reset_impl(bool _bApproveByListeners) if ( !xColUpdate.is() ) continue; - Reference< XPropertySetInfo > xPSI; - if ( xColProps.is() ) - xPSI = xColProps->getPropertySetInfo( ); - - static constexpr OUString PROPERTY_CONTROLDEFAULT = u"ControlDefault"_ustr; - if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) ) + auto getPropValOrDefault = [&xColProps, xPSI = xColProps->getPropertySetInfo()]( + const OUString& propname, auto default_value) { - Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT ); + if (xPSI && xPSI->hasPropertyByName(propname)) + fromAny(xColProps->getPropertyValue(propname), &default_value); + return default_value; + }; - bool bReadOnly = false; - if ( xPSI->hasPropertyByName( PROPERTY_ISREADONLY ) ) - xColProps->getPropertyValue( PROPERTY_ISREADONLY ) >>= bReadOnly; + Any aDefault = getPropValOrDefault(u"ControlDefault"_ustr, Any()); + if (!aDefault.hasValue()) + continue; - if ( !bReadOnly ) - { - try - { - if ( aDefault.hasValue() ) - xColUpdate->updateObject( aDefault ); - } - catch(const Exception&) - { - DBG_UNHANDLED_EXCEPTION("forms.component"); - } - } + if (getPropValOrDefault(PROPERTY_ISREADONLY, false)) + continue; + + // If the column is a date, and the default is a string, it may be + // impossible to convert the string to date at a later stage (namely, in + // DBTypeConversion::getValue, where the column formatting is unknown). + maybeConvertDefaultStringToDate(aDefault, getPropValOrDefault, + [this]() { return getFormatter(); }); + + try + { + xColUpdate->updateObject( aDefault ); + } + catch(const Exception&) + { + DBG_UNHANDLED_EXCEPTION("forms.component"); } } } @@ -2923,16 +2993,14 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction // reloading... EventObject aEvent(static_cast<XWeak*>(this)); + // only if there is no approve listener we can post the event at this time + // otherwise see approveRowsetChange + // the approval is done by the aggregate + if (!m_aRowSetApproveListeners.getLength()) { - // only if there is no approve listener we can post the event at this time - // otherwise see approveRowsetChange - // the approval is done by the aggregate - if (!m_aRowSetApproveListeners.getLength()) - { - aGuard.clear(); - m_aLoadListeners.notifyEach( &XLoadListener::reloading, aEvent); - aGuard.reset(); - } + aGuard.clear(); + m_aLoadListeners.notifyEach( &XLoadListener::reloading, aEvent); + aGuard.reset(); } bool bSuccess = true; diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 73831a9c67ba..a9c4badb6545 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -54,6 +54,7 @@ #include <com/sun/star/beans/XPropertyContainer.hpp> #include <com/sun/star/beans/XPropertyAccess.hpp> #include <com/sun/star/sdbc/XWarningsSupplier.hpp> +#include <com/sun/star/util/XNumberFormatter.hpp> #include <tools/link.hxx> @@ -518,6 +519,9 @@ private: void impl_construct(); DECL_LINK( OnTimeout, Timer*, void ); + + css::uno::Reference<css::util::XNumberFormatter> getFormatter(); + protected: using OPropertySetHelper::getPropertyValues; }; diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index 37d11be7b257..7683a9cb8229 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -71,19 +71,19 @@ bool StructPage::InsertEntry(const OUString& rText, const weld::TreeIter* pParen case StructType::Folder: m_xTlbStruct->insert(pParent, nPos, &rText, &sId, nullptr, nullptr, false, &rRet); - m_xTlbStruct->set_image(rRet, BMP_STR_OPEN); + m_xTlbStruct->set_image(rRet, BMP_STR_OPEN, 0); bEntry = true; break; case StructType::End: m_xTlbStruct->insert(pParent, nPos, &rText, &sId, nullptr, nullptr, false, &rRet); - m_xTlbStruct->set_image(rRet, maImgEnd); + m_xTlbStruct->set_image(rRet, maImgEnd, 0); bEntry = true; break; case StructType::Error: m_xTlbStruct->insert(pParent, nPos, &rText, &sId, nullptr, nullptr, false, &rRet); - m_xTlbStruct->set_image(rRet, maImgError); + m_xTlbStruct->set_image(rRet, maImgError, 0); bEntry = true; break; } diff --git a/formula/uiconfig/ui/structpage.ui b/formula/uiconfig/ui/structpage.ui index 6faff9151657..f0bffc5c99be 100644 --- a/formula/uiconfig/ui/structpage.ui +++ b/formula/uiconfig/ui/structpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="for"> <requires lib="gtk+" version="3.20"/> <object class="GtkTreeStore" id="liststore1"> @@ -14,20 +14,20 @@ </object> <object class="GtkBox" id="StructPage"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="border_width">6</property> + <property name="border-width">6</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> <property name="label" translatable="yes" context="structpage|label1">Content:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">struct</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">struct</property> </object> <packing> <property name="expand">False</property> @@ -38,25 +38,25 @@ <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="struct"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore1</property> - <property name="headers_visible">False</property> - <property name="headers_clickable">False</property> - <property name="search_column">0</property> + <property name="headers-visible">False</property> + <property name="headers-clickable">False</property> + <property name="search-column">0</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="treeview-selection1"/> </child> <child> - <object class="GtkTreeViewColumn" id="treeviewcolumn2"> + <object class="GtkTreeViewColumn" id="treeviewcolumn1"> <property name="spacing">6</property> <child> <object class="GtkCellRendererPixbuf" id="cellrenderertext4"/> @@ -64,6 +64,11 @@ <attribute name="pixbuf">0</attribute> </attributes> </child> + </object> + </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn2"> + <property name="spacing">6</property> <child> <object class="GtkCellRendererText" id="cellrenderertext2"/> <attributes> diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 01d0b05ac201..f7d6ea9c72f3 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -836,12 +836,11 @@ bool ToolbarLayoutManager::dockToolbar( std::u16string_view rResourceURL, ui::Do ::Size aSize; SolarMutexGuard aGuard; - { - if (pToolBox) - aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); - else if (pWindow) - aSize = pWindow->GetSizePixel(); - } + + if (pToolBox) + aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); + else if (pWindow) + aSize = pWindow->GetSizePixel(); ::Point aPixelPos; awt::Point aDockPos; diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h index e549896a5eed..29ec90b8f49a 100644 --- a/hwpfilter/source/drawing.h +++ b/hwpfilter/source/drawing.h @@ -69,7 +69,7 @@ static int HWPDOArc2Func(int, HWPDrawingObject *, int, void *, int); static int HWPDOContainerFunc(int, HWPDrawingObject *, int, void *, int); static HWPPara *LoadParaList(); -HWPDOFuncType HWPDOFuncTbl[] = +const HWPDOFuncType HWPDOFuncTbl[] = { HWPDOContainerFunc, HWPDOLineFunc, diff --git a/include/basic/vbahelper.hxx b/include/basic/vbahelper.hxx index 8d18b66b1d10..c493169041d3 100644 --- a/include/basic/vbahelper.hxx +++ b/include/basic/vbahelper.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BASIC_VBAHELPER_HXX -#define INCLUDED_BASIC_VBAHELPER_HXX +#pragma once #include <rtl/ustring.hxx> #include <basic/basicdllapi.h> @@ -89,6 +88,4 @@ BASIC_DLLPUBLIC void registerCurrentDirectory( } // namespace basic::vba -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx index 0573ad9681a0..82f9447f50ac 100644 --- a/include/com/sun/star/uno/Any.hxx +++ b/include/com/sun/star/uno/Any.hxx @@ -124,9 +124,7 @@ inline Any & Any::operator = ( const Any & rAny ) { if (this != &rAny) { - ::uno_type_any_assign( - this, rAny.pData, rAny.pType, - cpp_acquire, cpp_release ); + setValue(rAny.pData, rAny.pType); } return *this; } @@ -171,9 +169,7 @@ inline ::rtl::OUString Any::getValueTypeName() const inline void Any::setValue( const void * pData_, const Type & rType ) { - ::uno_type_any_assign( - this, const_cast< void * >( pData_ ), rType.getTypeLibType(), - cpp_acquire, cpp_release ); + setValue(pData_, rType.getTypeLibType()); } inline void Any::setValue( const void * pData_, typelib_TypeDescriptionReference * pType_ ) @@ -207,11 +203,7 @@ inline bool Any::isExtractableTo( const Type & rType ) const template <typename T> inline bool Any::has() const { - Type const & rType = ::cppu::getTypeFavourUnsigned(static_cast< T * >(NULL)); - return ::uno_type_isAssignableFromData( - rType.getTypeLibType(), pData, pType, - cpp_queryInterface, - cpp_release ); + return isExtractableTo(::cppu::getTypeFavourUnsigned(static_cast< T * >(NULL))); } #if defined LIBO_INTERNAL_ONLY @@ -227,9 +219,7 @@ inline bool Any::operator == ( const Any & rAny ) const inline bool Any::operator != ( const Any & rAny ) const { - return (! ::uno_type_equalData( - pData, pType, rAny.pData, rAny.pType, - cpp_queryInterface, cpp_release )); + return (! operator==(rAny)); } @@ -279,9 +269,7 @@ template< class C > inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) { const Type & rType = ::cppu::getTypeFavourUnsigned(&value); - ::uno_type_any_assign( - &rAny, const_cast< C * >( &value ), rType.getTypeLibType(), - cpp_acquire, cpp_release ); + rAny.setValue(static_cast< const void * >( &value ), rType); } // additionally for C++ bool: @@ -289,10 +277,8 @@ inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) template<> inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) { - sal_Bool b = value; - ::uno_type_any_assign( - &rAny, &b, cppu::UnoType<bool>::get().getTypeLibType(), - cpp_acquire, cpp_release ); + // [-loplugin:fakebool] false positive: + rAny <<= sal_Bool(value); } @@ -300,22 +286,14 @@ inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) template< class C1, class C2 > inline void operator <<= ( Any & rAny, rtl::OUStringConcat< C1, C2 >&& value ) { - const rtl::OUString str( std::move(value) ); - const Type & rType = ::cppu::getTypeFavourUnsigned(&str); - ::uno_type_any_assign( - &rAny, const_cast< rtl::OUString * >( &str ), rType.getTypeLibType(), - cpp_acquire, cpp_release ); + rAny <<= rtl::OUString( std::move(value) ); } template<typename T1, typename T2> void operator <<=(Any &, rtl::OUStringConcat<T1, T2> const &) = delete; template< std::size_t nBufSize > inline void operator <<= ( Any & rAny, rtl::StringNumber< sal_Unicode, nBufSize >&& value ) { - const rtl::OUString str( std::move(value) ); - const Type & rType = ::cppu::getTypeFavourUnsigned(&str); - ::uno_type_any_assign( - &rAny, const_cast< rtl::OUString * >( &str ), rType.getTypeLibType(), - cpp_acquire, cpp_release ); + rAny <<= rtl::OUString( std::move(value) ); } template<std::size_t nBufSize> void operator <<=(Any &, rtl::StringNumber<sal_Unicode, nBufSize> const &) = delete; @@ -352,8 +330,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal template<> inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) { - return (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass && - bool(value) == bool(* static_cast< const sal_Bool * >( rAny.pData ))); + return rAny == bool(value); } diff --git a/include/connectivity/dbconversion.hxx b/include/connectivity/dbconversion.hxx index e9471344cea9..5150e5e7e384 100644 --- a/include/connectivity/dbconversion.hxx +++ b/include/connectivity/dbconversion.hxx @@ -111,7 +111,7 @@ namespace dbtools::DBTypeConversion */ inline double toNullDate(const css::util::Date& _rNullDate, double _rVal) { return _rVal - toDays(_rNullDate); } - // return the date from the numberformatsupplier or the STANDARD_DATE (1900,1,1) + // return the date from the numberformatsupplier or the STANDARD_DATE (1899,12,30) OOO_DLLPUBLIC_DBTOOLS css::util::Date getNULLDate(const css::uno::Reference< css::util::XNumberFormatsSupplier > &xSupplier); // return the date in the format %04d-%02d-%02d diff --git a/include/editeng/StripPortionsHelper.hxx b/include/editeng/StripPortionsHelper.hxx index dc235471eb37..ab19e78298e9 100644 --- a/include/editeng/StripPortionsHelper.hxx +++ b/include/editeng/StripPortionsHelper.hxx @@ -109,11 +109,23 @@ public: class EDITENG_DLLPUBLIC StripPortionsHelper { + const drawinglayer::geometry::ViewInformation2D& mrViewInformation2D; + public: + StripPortionsHelper(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D) + : mrViewInformation2D(rViewInformation2D) + { + } + virtual void processDrawPortionInfo(const DrawPortionInfo&) = 0; virtual void processDrawBulletInfo(const DrawBulletInfo&) = 0; virtual void directlyAddB2DPrimitive(const drawinglayer::primitive2d::Primitive2DReference&) = 0; + + const drawinglayer::geometry::ViewInformation2D& getViewInformation2D() const + { + return mrViewInformation2D; + } }; class EDITENG_DLLPUBLIC TextHierarchyBreakup : public StripPortionsHelper @@ -136,8 +148,9 @@ public: virtual void directlyAddB2DPrimitive(const drawinglayer::primitive2d::Primitive2DReference&) override; - TextHierarchyBreakup(); - TextHierarchyBreakup(const basegfx::B2DHomMatrix& rNewTransformA, + TextHierarchyBreakup(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D); + TextHierarchyBreakup(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, + const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB); const drawinglayer::primitive2d::Primitive2DContainer& getTextPortionPrimitives(); @@ -152,9 +165,11 @@ protected: virtual sal_Int32 getParagraphCount() const override; public: - TextHierarchyBreakupOutliner(Outliner& rOutliner); - TextHierarchyBreakupOutliner(Outliner& rOutliner, const basegfx::B2DHomMatrix& rNewTransformA, - const basegfx::B2DHomMatrix& rNewTransformB); + TextHierarchyBreakupOutliner( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, Outliner& rOutliner); + TextHierarchyBreakupOutliner( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, Outliner& rOutliner, + const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB); }; #endif // INCLUDED_EDITENG_STRIPPORTIONSHELPER_HXX diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 593fce2a59be..ca00ddd807d6 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -420,8 +420,8 @@ public: SAL_DLLPRIVATE void setRoundFontSizeToPt(bool bRound); - void SetEditTextObjectPool( SfxItemPool* pPool ); - SfxItemPool* GetEditTextObjectPool() const; + void SetItemPool( SfxItemPool* pPool ); + SfxItemPool* GetItemPool() const; void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index a6f740d3ec36..92d7117f5796 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -825,8 +825,8 @@ public: bool HasConvertibleTextPortion( LanguageType nLang ); virtual bool ConvertNextDocument(); - void SetEditTextObjectPool( SfxItemPool* pPool ); - SfxItemPool* GetEditTextObjectPool() const; + void SetEditEnginePool( SfxItemPool* pPool ); + SfxItemPool* GetEditEnginePool() const; void SetRefDevice( OutputDevice* pRefDev ); OutputDevice* GetRefDevice() const; diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx index 219ddc52a29a..ba77a2a3c65a 100644 --- a/include/editeng/svxenum.hxx +++ b/include/editeng/svxenum.hxx @@ -73,6 +73,9 @@ enum class SvxInterLineSpaceRule Fix }; +// The values map directly to css::style::ParagraphAdjust enum (returned as ParaAdjust property +// from SwUnoCursorHelper::GetPropertyValue, see SvxAdjustItem::QueryValue). Also, there is a +// mapping to css::text::HoriOrientation for numbering (see aSvxToUnoAdjust). enum class SvxAdjust { Left, diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 8a7875640762..f4f865bf991e 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -463,7 +463,7 @@ public: Size GetFirstPageSize() const; bool DoClose(); - std::shared_ptr<GDIMetaFile> GetPreviewMetaFile( bool bFullContent = false ) const; + std::shared_ptr<GDIMetaFile> GetPreviewMetaFile( bool bFullContent = false, bool bOutputForScreen = false ) const; BitmapEx GetPreviewBitmap() const; virtual void CancelTransfers(); @@ -713,7 +713,7 @@ public: // Destruction of storages and streams void InternalCloseAndRemoveFiles(); - SAL_DLLPRIVATE bool CreatePreview_Impl(bool bFullContent, VirtualDevice* pDevice, GDIMetaFile* pFile) const; + SAL_DLLPRIVATE bool CreatePreview_Impl(bool bFullContent, bool bOutputForScreen, VirtualDevice* pDevice, GDIMetaFile* pFile) const; SAL_DLLPRIVATE static bool IsPackageStorageFormat_Impl(const SfxMedium &); diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx index aa918ffe2f05..3e712bf0c8db 100644 --- a/include/svx/float3d.hxx +++ b/include/svx/float3d.hxx @@ -21,9 +21,12 @@ #define INCLUDED_SVX_FLOAT3D_HXX #include <memory> +#include <editeng/colritem.hxx> #include <sfx2/ctrlitem.hxx> #include <sfx2/dockwin.hxx> #include <vcl/weld.hxx> +#include <svl/eitem.hxx> +#include <svx/e3ditem.hxx> #include <svx/svxdllapi.h> #include <svx/dlgctl3d.hxx> @@ -45,19 +48,19 @@ class ColorListBox; struct Svx3DWinImpl; -class UNLESS_MERGELIBS(SVX_DLLPUBLIC) LightButton final +class UNLESS_MERGELIBS(SVX_DLLPUBLIC) TriStateToggleButton { public: - explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton); - - void switchLightOn(bool bOn); - bool isLightOn() const { return m_bLightOn;} - - bool get_active() const { return m_xButton->get_active(); } - void set_active(bool bActive) { m_xButton->set_active(bActive); } + explicit TriStateToggleButton(std::unique_ptr<weld::ToggleButton> xButton); + bool get_active() const { return m_xButton->get_active(); }; + void set_active(bool bActive) + { + m_bIndeterminate = false; + m_xButton->set_active(bActive); + } - TriState get_state() const { return m_xButton->get_state(); } - void set_state(TriState eState) { m_xButton->set_state(eState); } + bool is_indeterminate() { return m_bIndeterminate; }; + void set_indeterminate() { m_bIndeterminate = true; }; weld::ToggleButton* get_widget() const { return m_xButton.get(); } @@ -66,11 +69,23 @@ public: m_xButton->connect_clicked(rLink); } +private: + std::unique_ptr<weld::ToggleButton> m_xButton; + bool m_bIndeterminate = false; +}; + +class UNLESS_MERGELIBS(SVX_DLLPUBLIC) LightButton final : public TriStateToggleButton +{ +public: + explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton); + + void switchLightOn(bool bOn); + bool isLightOn() const { return m_bLightOn;} + bool get_prev_active() const { return m_bButtonPrevActive; } void set_prev_active(bool bPrevActive) { m_bButtonPrevActive = bPrevActive; } private: - std::unique_ptr<weld::ToggleButton> m_xButton; bool m_bLightOn; bool m_bButtonPrevActive; }; @@ -108,16 +123,16 @@ private: std::unique_ptr<weld::ToggleButton> m_xBtnNormalsObj; std::unique_ptr<weld::ToggleButton> m_xBtnNormalsFlat; std::unique_ptr<weld::ToggleButton> m_xBtnNormalsSphere; - std::unique_ptr<weld::ToggleButton> m_xBtnNormalsInvert; - std::unique_ptr<weld::ToggleButton> m_xBtnTwoSidedLighting; - std::unique_ptr<weld::ToggleButton> m_xBtnDoubleSided; + std::unique_ptr<TriStateToggleButton> m_xBtnNormalsInvert; + std::unique_ptr<TriStateToggleButton> m_xBtnTwoSidedLighting; + std::unique_ptr<TriStateToggleButton> m_xBtnDoubleSided; // presentation std::unique_ptr<weld::Container> m_xFLRepresentation; std::unique_ptr<weld::ComboBox> m_xLbShademode; std::unique_ptr<weld::Container> m_xFLShadow; - std::unique_ptr<weld::ToggleButton> m_xBtnShadow3d; + std::unique_ptr<TriStateToggleButton> m_xBtnShadow3d; std::unique_ptr<weld::Label> m_xFtSlant; std::unique_ptr<weld::MetricSpinButton> m_xMtrSlant; @@ -159,7 +174,7 @@ private: std::unique_ptr<weld::ToggleButton> m_xBtnTexObjectY; std::unique_ptr<weld::ToggleButton> m_xBtnTexParallelY; std::unique_ptr<weld::ToggleButton> m_xBtnTexCircleY; - std::unique_ptr<weld::ToggleButton> m_xBtnTexFilter; + std::unique_ptr<TriStateToggleButton> m_xBtnTexFilter; // material // material editor @@ -189,7 +204,7 @@ private: // bottom part std::unique_ptr<weld::Button> m_xBtnConvertTo3D; std::unique_ptr<weld::Button> m_xBtnLatheObject; - std::unique_ptr<weld::ToggleButton> m_xBtnPerspective; + std::unique_ptr<TriStateToggleButton> m_xBtnPerspective; // the rest ... bool bUpdate; @@ -227,7 +242,7 @@ private: SVX_DLLPRIVATE void Construct(); SVX_DLLPRIVATE void Reset(); - SVX_DLLPRIVATE static void LBSelectColor( ColorListBox* pLb, const Color& rColor ); + SVX_DLLPRIVATE static void LBSelectColor(ColorListBox& rLb, const Color& rColor); SVX_DLLPRIVATE sal_uInt16 GetLightSource( const LightButton* pBtn ) const; SVX_DLLPRIVATE ColorListBox* GetCLbByButton( const LightButton* pBtn = nullptr ); SVX_DLLPRIVATE LightButton* GetLbByButton( const weld::Button* pBtn ); @@ -248,6 +263,14 @@ public: void UpdatePreview(); // upward (private) void DocumentReload(); + +private: + void UpdateLight(const SfxItemSet& rAttrs, TypedWhichId<SvxColorItem> nWhichLightColor, + ColorListBox& rColorListBox, TypedWhichId<SfxBoolItem> nWhichLightOn, + LightButton& rLightButton, + TypedWhichId<SvxB3DVectorItem> nWhichLightDirection); + void UpdateToggleButton(const SfxItemSet& rAttrs, TypedWhichId<SfxBoolItem> nWhich, + TriStateToggleButton& rButton); }; /************************************************************************* diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx index 0af4f6804849..b8e45b213b9d 100644 --- a/include/svx/svdoutl.hxx +++ b/include/svx/svdoutl.hxx @@ -63,6 +63,7 @@ public: virtual void processDrawPortionInfo(const DrawPortionInfo& rDrawPortionInfo) override; TextHierarchyBreakupBlockText( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, SdrOutliner& rOutliner, const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, @@ -78,6 +79,7 @@ public: virtual void processDrawPortionInfo(const DrawPortionInfo& rDrawPortionInfo) override; TextHierarchyBreakupContourText( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, SdrOutliner& rOutliner, const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 4885e058c01a..9179d14a76c0 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -549,6 +549,7 @@ class XFillGradientItem; // CAUTION! Range <457 .. 457> used by EditEngine (!) +#define SID_INSERT_HYPERLINK ( SID_SVX_START + 458 ) #define SID_REMOVE_HYPERLINK ( SID_SVX_START + 459 ) #define SID_ATTR_ALIGN_INDENT ( SID_SVX_START + 460 ) #define SID_DEC_INDENT ( SID_SVX_START + 461 ) diff --git a/include/vcl/BitmapInfoAccess.hxx b/include/vcl/BitmapInfoAccess.hxx index e01c2aba7a8f..dece92e76a2d 100644 --- a/include/vcl/BitmapInfoAccess.hxx +++ b/include/vcl/BitmapInfoAccess.hxx @@ -25,8 +25,6 @@ #include <vcl/BitmapColor.hxx> #include <vcl/BitmapAccessMode.hxx> -bool Bitmap32IsPreMultipled(); - typedef BitmapColor (*FncGetPixel)(ConstScanline pScanline, tools::Long nX); typedef void (*FncSetPixel)(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor); diff --git a/include/vcl/CairoFormats.hxx b/include/vcl/CairoFormats.hxx index 1d2f3b426e8d..487d5ceb35c5 100644 --- a/include/vcl/CairoFormats.hxx +++ b/include/vcl/CairoFormats.hxx @@ -35,21 +35,21 @@ */ #if ENABLE_CAIRO_RGBA #define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb) -#define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcRgbx) +#define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcRgba) #define SVP_CAIRO_BLUE 2 #define SVP_CAIRO_GREEN 1 #define SVP_CAIRO_RED 0 #define SVP_CAIRO_ALPHA 3 #elif defined OSL_BIGENDIAN #define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb) -#define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcXrgb) +#define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcArgb) #define SVP_CAIRO_BLUE 3 #define SVP_CAIRO_GREEN 2 #define SVP_CAIRO_RED 1 #define SVP_CAIRO_ALPHA 0 #else #define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcBgr) -#define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcBgrx) +#define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcBgra) #define SVP_CAIRO_BLUE 0 #define SVP_CAIRO_GREEN 1 #define SVP_CAIRO_RED 2 diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index cfb2c1a95caa..68bf8d75bb38 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -566,6 +566,12 @@ public: // access to SystemDependentDataHolder, to support overload in derived class(es) const basegfx::SystemDependentDataHolder* accessSystemDependentDataHolder() const; + + /** + Can only be called on 32-bit bitmaps. Returns data split into color bitmap and alpha bitmap. + */ + std::pair<Bitmap, AlphaMask> SplitIntoColorAndAlpha() const; + public: /** ReassignWithSize and recalculate bitmap. diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 47e025f5ff31..c8f11f1f10cf 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -184,9 +184,6 @@ private: // The canvas interface for this output device. Is persistent after the first GetCanvas() call mutable css::uno::WeakReference< css::rendering::XCanvas > mxCanvas; - // TEMP TEMP TEMP - VclPtr<VirtualDevice> mpAlphaVDev; - /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) tools::Long mnOutOffOrigX; /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset) @@ -1357,7 +1354,10 @@ public: virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const; - bool HasAlpha() const { return bool(mpAlphaVDev); } + /** + * Does this device support alpha? + */ + virtual bool HasAlpha() const = 0; /** Query extended bitmap (with alpha channel, if available). */ @@ -1460,14 +1460,11 @@ private: const sal_Int32* pMapX, const sal_Int32* pMapY ); - SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha( + static SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha( Bitmap& aBmp, BitmapReadAccess const * pP, BitmapReadAccess const * pA, - const tools::Rectangle& aDstRect, - const sal_Int32 nOffY, const sal_Int32 nDstHeight, - const sal_Int32 nOffX, const sal_Int32 nDstWidth, const sal_Int32* pMapX, const sal_Int32* pMapY ); diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 5cd034c9878a..91efaeeeee82 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -609,7 +609,8 @@ public: { URIAction, URIActionDestination, - LaunchAction + LaunchAction, + RemoveExternalLinks }; struct PDFDocInfo diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index cb03346edbd0..2dc9a2e5127b 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -156,6 +156,8 @@ public: css::awt::DeviceInfo GetDeviceInfo() const override; + virtual bool HasAlpha() const override { return false; } + protected: virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, const Point& rDestPt, const Size& rDestSize, diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index 228a14c27482..8333f1a1b1a4 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> +#include <config_global.h> #include <rtl/ref.hxx> #include <utility> @@ -44,6 +45,24 @@ template<typename T> constexpr bool isIncompleteOrDerivedFromVclReferenceBase( int (*)[sizeof(T)]) { return std::is_base_of<VclReferenceBase, T>::value; } +// The above isIncompleteOrDerivedFromVclReferenceBase will cause will cause -Wsfinae-incomplete +// warnings when e.g. OutputDevice (include/vcl/outdev.hxx) contains members of type +// VclPtr<OutputDevice>, so OutputDevice is not yet complete when +// sIncompleteOrDerivedFromVclReferenceBase is instantiated, but will become complete later on +// ("warning: error: defining ‘OutputDevice’, which previously failed to be complete in a SFINAE +// context [-Werror=sfinae-incomplete=]"). A real solution would presumably be using C++26 +// reflection and rewriting the above isIncompleteOrDerivedFromVclReferenceBase as something like +// +// consteval bool isIncompleteOrDerivedFromVclReferenceBase(std::meta::info type) { +// return !std::meta::is_complete_type(type) +// || std::meta::is_base_of_type(^^VclReferenceBase, type); +// } +// +// But until then, use a HACK of (globally) ignoring that warning: +#if defined __GNUC__ && !defined __clang__ && HAVE_GCC_WSFINAE_INCOMPLETE +#pragma GCC diagnostic ignored "-Wsfinae-incomplete" +#endif + } // namespace vcl::detail /** diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 0ab91eae8973..84a7df790aec 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -55,7 +55,7 @@ private: bool mbForceZeroExtleadBug; SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData = nullptr ); - SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase ); + SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, bool bAlphaMaskTransparent ); VirtualDevice (const VirtualDevice &) = delete; VirtualDevice & operator= (const VirtualDevice &) = delete; @@ -144,6 +144,10 @@ public: bool IsScreenComp() const override { return mbScreenComp; } + bool IsWithoutAlpha() const { return meFormatAndAlpha == DeviceFormat::WITHOUT_ALPHA; } + + virtual bool HasAlpha() const override { return meFormatAndAlpha != DeviceFormat::WITHOUT_ALPHA; } + private: SAL_DLLPRIVATE void ImplSetReferenceDevice( RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY ); diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 564004be1905..3184fbc25b2c 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1606,36 +1606,13 @@ public: virtual void set_active(bool active) = 0; virtual bool get_active() const = 0; - virtual void set_inconsistent(bool inconsistent) = 0; - virtual bool get_inconsistent() const = 0; - - TriState get_state() const + virtual TriState get_state() const { - if (get_inconsistent()) - return TRISTATE_INDET; - else if (get_active()) + if (get_active()) return TRISTATE_TRUE; return TRISTATE_FALSE; } - void set_state(TriState eState) - { - switch (eState) - { - case TRISTATE_INDET: - set_inconsistent(true); - break; - case TRISTATE_TRUE: - set_inconsistent(false); - set_active(true); - break; - case TRISTATE_FALSE: - set_inconsistent(false); - set_active(false); - break; - } - } - void save_state() { m_eSavedValue = get_state(); } TriState get_saved_state() const { return m_eSavedValue; } bool get_state_changed_from_saved() const { return m_eSavedValue != get_state(); } @@ -1648,18 +1625,6 @@ class VCL_DLLPUBLIC ToggleButton : virtual public Button, virtual public Togglea friend class ::LOKTrigger; }; -struct VCL_DLLPUBLIC TriStateEnabled -{ - TriState eState; - bool bTriStateEnabled; - TriStateEnabled() - : eState(TRISTATE_INDET) - , bTriStateEnabled(true) - { - } - void ButtonToggled(Toggleable& rToggle); -}; - class VCL_DLLPUBLIC MenuButton : virtual public ToggleButton { friend class ::LOKTrigger; @@ -1718,22 +1683,40 @@ class VCL_DLLPUBLIC MenuToggleButton : virtual public MenuButton class VCL_DLLPUBLIC CheckButton : virtual public Toggleable { public: + // must override Toggleable::get_state to support TRISTATE_INDET + virtual TriState get_state() const override = 0; + virtual void set_state(TriState eState) = 0; + + virtual void set_active(bool bActive) override final + { + set_state(bActive ? TRISTATE_TRUE : TRISTATE_FALSE); + } + + virtual bool get_active() const override final { return get_state() == TRISTATE_TRUE; } + virtual void set_label(const OUString& rText) = 0; virtual OUString get_label() const = 0; virtual void set_label_wrap(bool wrap) = 0; }; -class VCL_DLLPUBLIC RadioButton : virtual public CheckButton +struct VCL_DLLPUBLIC TriStateEnabled { -public: - // radio button doesn't support inconsistent state - void set_inconsistent(bool bInconsistent) override + TriState eState; + bool bTriStateEnabled; + TriStateEnabled() + : eState(TRISTATE_INDET) + , bTriStateEnabled(true) { - assert(!bInconsistent && "Radio button doesn't support inconsistent state"); - (void)bInconsistent; } + void CheckButtonToggled(CheckButton& rToggle); +}; - bool get_inconsistent() const override { return false; } +class VCL_DLLPUBLIC RadioButton : virtual public Toggleable +{ +public: + virtual void set_label(const OUString& rText) = 0; + virtual OUString get_label() const = 0; + virtual void set_label_wrap(bool wrap) = 0; }; class VCL_DLLPUBLIC LinkButton : virtual public Widget diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index eaf49579339a..d04c3a9b668b 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -126,20 +126,18 @@ rtl::Reference< HyphenatedWord > HyphenatorDispatcher::buildHyphWord( return nullptr; #if OSL_DEBUG_LEVEL > 0 + if (std::u16string_view(aTmp) != rOrigWord) { - if (std::u16string_view(aTmp) != rOrigWord) + // both words should only differ by a having a trailing '.' + // character or not... + std::u16string_view aShorter(aTmp), aLonger(rOrigWord); + if (aTmp.getLength() > rOrigWord.getLength()) + std::swap(aShorter, aLonger); + sal_Int32 nS = aShorter.size(); + sal_Int32 nL = aLonger.size(); + if (nS > 0 && nL > 0) { - // both words should only differ by a having a trailing '.' - // character or not... - std::u16string_view aShorter(aTmp), aLonger(rOrigWord); - if (aTmp.getLength() > rOrigWord.getLength()) - std::swap(aShorter, aLonger); - sal_Int32 nS = aShorter.size(); - sal_Int32 nL = aLonger.size(); - if (nS > 0 && nL > 0) - { - assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && "HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" ); - } + assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && "HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" ); } } #endif diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 0816d6b987f8..d05f351dcadc 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -513,7 +513,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/awt,\ AccessibleToolBox \ AccessibleToolBoxItem \ AccessibleTreeListBox \ - AccessibleTreeListBoxEntry \ AccessibleWindow \ AnimatedImagesControl \ AnimatedImagesControlModel \ diff --git a/offapi/com/sun/star/awt/AccessibleTreeListBox.idl b/offapi/com/sun/star/awt/AccessibleTreeListBox.idl index fce939eb8f63..52203587c6a4 100644 --- a/offapi/com/sun/star/awt/AccessibleTreeListBox.idl +++ b/offapi/com/sun/star/awt/AccessibleTreeListBox.idl @@ -46,7 +46,7 @@ service AccessibleTreeListBox <li>Name: The name of a tree list box is its localized label.</li> <li>Description: The description of a tree list box is its localized help text.</li> - <li>Children: There exists children of type com::sun::star::awt::AccessibleTreeListBoxEntry. + <li>Children: There exists children representing the tree list box entries. </li> <li>Parent: The parent is the window that contains the tree list box.</li> <li>Relations: There are no relations.</li> diff --git a/offapi/com/sun/star/awt/AccessibleTreeListBoxEntry.idl b/offapi/com/sun/star/awt/AccessibleTreeListBoxEntry.idl deleted file mode 100644 index e35f4f5aaa3b..000000000000 --- a/offapi/com/sun/star/awt/AccessibleTreeListBoxEntry.idl +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -module com { module sun { module star { module accessibility { - - interface XAccessibleAction; - interface XAccessibleSelection; - interface XAccessibleText; - interface XAccessibleComponent; - -}; }; }; }; - -module com { module sun { module star { module awt { - - -/** specifies accessibility support for a treelistbox entry. - - @see com::sun::star::accessibility::AccessibleContext - - @see com::sun::star::accessibility::XAccessibleAction - @see com::sun::star::accessibility::XAccessibleSelection - @see com::sun::star::accessibility::XAccessibleText - - @since OOo 1.1.2 -*/ -service AccessibleTreeListBoxEntry -{ - /** This interface gives access to the structural information of a tree list box entry: - - <ul> - <li>Role: The role of a tree list box entry is - com::sun::star::accessibility::AccessibleRole::LABEL.</li> - <li>Name: The name of a tree list box entry is it's text.</li> - <li>Description: The description of a tree list box entry is empty.</li> - <li>Children: There can exist children of type com::sun::star::awt::AccessibleTreeListBoxEntry. - </li> - <li>Parent: The parent is either the com::sun::star::awt::AccessibleTreeListBox - or a com::sun::star::awt::AccessibleTreeListBoxEntry that contains the tree list box entry.</li> - <li>Relations: There are no relations.</li> - <li>States: The states supported by this service are - <ul> - <li>com::sun::star::accessibility::AccessibleStateType::DEFUNC - is set if the object has already been disposed - and subsequent calls to this object result in - com::sun::star::lang::DisposedException - exceptions.</li> - <li>com::sun::star::accessibility::AccessibleStateType::ENABLED - is set if the object is enabled.</li> - <li>com::sun::star::accessibility::AccessibleStateType::SHOWING - is set if the object is displayed on the screen.</li> - <li>com::sun::star::accessibility::AccessibleStateType::VISIBLE - is always set.</li> - <li>com::sun::star::accessibility::AccessibleStateType::EDITABLE - is set when a tree list box entry can be edited.</li> - <li>com::sun::star::accessibility::AccessibleStateType::EXPANDABLE - is always set.</li> - <li>com::sun::star::accessibility::AccessibleStateType::EXPANDED - is set when it is expanded.</li> - <li>com::sun::star::accessibility::AccessibleStateType::COLLAPSED - is set when it is collapsed.</li> - <li>com::sun::star::accessibility::AccessibleStateType::CHECKED - is set when it is checkable.</li> - <li>com::sun::star::accessibility::AccessibleStateType::CHECKED - is set when it is checked.</li> - <li>com::sun::star::accessibility::AccessibleStateType::SELECTABLE - is always set.</li> - <li>com::sun::star::accessibility::AccessibleStateType::SELECTED - is set when it is selected.</li> - </ul> - </li> - </ul> - */ - service com::sun::star::accessibility::AccessibleContext; - - interface com::sun::star::accessibility::XAccessibleComponent; - - /** This interface gives access to the actions that can be executed for - a menu. The supported actions for a tree list box entry are: - <ul> - <li>toggleExpand</li> - </ul> - */ - interface com::sun::star::accessibility::XAccessibleAction; - - /** This interface gives access to the selectable children of a - tree list box entry. - */ - interface com::sun::star::accessibility::XAccessibleSelection; - - /** This interface gives read-only access to the text representation - of a tool box item. - */ - interface com::sun::star::accessibility::XAccessibleText; -}; - -}; }; }; }; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index cd0cde2b0958..744956108ded 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -3455,6 +3455,17 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 <value>1</value> </prop> </node> + <node oor:name=".uno:InsertHyperlink" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~Hyperlink</value> + </prop> + <prop oor:name="PopupLabel" oor:type="xs:string"> + <value xml:lang="en-US">Insert Hyperlink...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:EditHyperlink" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Hyperlink</value> diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 64577409c0b1..ee87d752a65f 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -65,8 +65,15 @@ SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase& rFilter, const OUStri SlideFragmentHandler::~SlideFragmentHandler() { - // convert and insert all VML shapes (mostly form controls) - mpSlidePersistPtr->getDrawing()->convertAndInsert(); + try + { + // convert and insert all VML shapes (mostly form controls) + mpSlidePersistPtr->getDrawing()->convertAndInsert(); + } + catch (const uno::Exception&) + { + TOOLS_WARN_EXCEPTION("oox", "SlideFragmentHandler dtor: VML shape insertion failed"); + } } ::oox::core::ContextHandlerRef SlideFragmentHandler::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx index ff24fa6c2ce4..b98f4a92af36 100644 --- a/reportdesign/source/core/api/ReportEngineJFree.cxx +++ b/reportdesign/source/core/api/ReportEngineJFree.cxx @@ -111,20 +111,27 @@ sal_Bool SAL_CALL OReportEngineJFree::supportsService(const OUString& ServiceNam uno::Reference< report::XReportDefinition > SAL_CALL OReportEngineJFree::getReportDefinition() { ::osl::MutexGuard aGuard(m_aMutex); - return m_xReport; + return m_pReport; } void SAL_CALL OReportEngineJFree::setReportDefinition( const uno::Reference< report::XReportDefinition >& _report ) { if ( !_report.is() ) throw lang::IllegalArgumentException(); + + rtl::Reference<reportdesign::OReportDefinition> pReport + = dynamic_cast<reportdesign::OReportDefinition*>(_report.get()); + assert(pReport.is() && "Report is not an OReportDefinition instance"); + BoundListeners l; { ::osl::MutexGuard aGuard(m_aMutex); - if ( m_xReport != _report ) + if (m_pReport != pReport) { - prepareSet(PROPERTY_REPORTDEFINITION, uno::Any(m_xReport), uno::Any(_report), &l); - m_xReport = _report; + prepareSet(PROPERTY_REPORTDEFINITION, + uno::Any(uno::Reference<report::XReportDefinition>(m_pReport)), + uno::Any(_report), &l); + m_pReport = pReport; } } l.notify(); @@ -145,13 +152,13 @@ OUString OReportEngineJFree::getNewOutputName() { ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed); - if ( !m_xReport.is() || !m_xActiveConnection.is() ) + if (!m_pReport.is() || !m_xActiveConnection.is()) throw lang::IllegalArgumentException(); static constexpr OUString s_sMediaType = u"MediaType"_ustr; MimeConfigurationHelper aConfighelper(m_xContext); - const OUString sMimeType = m_xReport->getMimeType(); + const OUString sMimeType = m_pReport->getMimeType(); std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetDefaultFilter( aConfighelper.GetDocServiceNameFromMediaType(sMimeType) ); OUString sExt(u".rpt"_ustr); if ( pFilter ) @@ -165,11 +172,11 @@ OUString OReportEngineJFree::getNewOutputName() { xStorageProp->setPropertyValue( s_sMediaType, uno::Any(sMimeType)); } - m_xReport->storeToStorage(xTemp,aEmpty); // store to temp file because it may contain information which isn't in the database yet. + m_pReport->storeToStorage(xTemp, aEmpty); // store to temp file because it may contain information which isn't in the database yet. - OUString sName = m_xReport->getCaption(); + OUString sName = m_pReport->getCaption(); if ( sName.isEmpty() ) - sName = m_xReport->getName(); + sName = m_pReport->getName(); OUString sFileURL = ::utl::CreateTempURL(sName, false, sExt); if ( sFileURL.isEmpty() ) { @@ -201,11 +208,11 @@ OUString OReportEngineJFree::getNewOutputName() uno::Sequence< beans::NamedValue > aConvertedProperties{ {u"InputStorage"_ustr, uno::Any(xTemp) }, {u"OutputStorage"_ustr, uno::Any(xOut) }, - {PROPERTY_REPORTDEFINITION, uno::Any(m_xReport) }, + {PROPERTY_REPORTDEFINITION, uno::Any(uno::Reference<report::XReportDefinition>(m_pReport)) }, {PROPERTY_ACTIVECONNECTION, uno::Any(m_xActiveConnection) }, {PROPERTY_MAXROWS, uno::Any(m_nMaxRows) }, {u"Author"_ustr, uno::Any(sAuthor) }, - {u"Title"_ustr, uno::Any(m_xReport->getCaption()) } + {u"Title"_ustr, uno::Any(m_pReport->getCaption()) } }; OUString sOutputName; @@ -213,7 +220,7 @@ OUString OReportEngineJFree::getNewOutputName() // create job factory and initialize const OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_xContext); uno::Reference<task::XJob> xJob(m_xContext->getServiceManager()->createInstanceWithContext(sReportEngineServiceName,m_xContext),uno::UNO_QUERY_THROW); - if ( !m_xReport->getCommand().isEmpty() ) + if (!m_pReport->getCommand().isEmpty()) { xJob->execute(aConvertedProperties); if ( xStorageProp.is() ) diff --git a/reportdesign/source/core/inc/ReportEngineJFree.hxx b/reportdesign/source/core/inc/ReportEngineJFree.hxx index e0ab1d60b34b..cd3af13fa2f1 100644 --- a/reportdesign/source/core/inc/ReportEngineJFree.hxx +++ b/reportdesign/source/core/inc/ReportEngineJFree.hxx @@ -21,6 +21,8 @@ #include <sal/config.h> +#include <ReportDefinition.hxx> + #include <com/sun/star/report/XReportEngine.hpp> #include <cppuhelper/compbase.hxx> #include <comphelper/broadcasthelper.hxx> @@ -40,7 +42,7 @@ namespace reportdesign public ReportEnginePropertySet { css::uno::Reference< css::uno::XComponentContext > m_xContext; - css::uno::Reference< css::report::XReportDefinition > m_xReport; + rtl::Reference<reportdesign::OReportDefinition> m_pReport; css::uno::Reference< css::task::XStatusIndicator> m_StatusIndicator; css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection; ::sal_Int32 m_nMaxRows; diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 4c2f6f247f94..a28945c2fb57 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -683,7 +683,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) bool bShapeHandled = false; ::std::map<sal_Int32,sal_Int32> aRowSpan; - for (sal_Int32 j = 0; aRowIter != aRowEnd; ++aRowIter,++j,++aHeightIter) + for (; aRowIter != aRowEnd; ++aRowIter,++aHeightIter) { AddAttribute( m_sTableStyle,*aHeightIter ); SvXMLElementExport aRow(*this,XML_NAMESPACE_TABLE, XML_TABLE_ROW, true, true); diff --git a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui index 72a65d988478..b334625a0db3 100644 --- a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui +++ b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui @@ -1,39 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="rpt"> <requires lib="gtk+" version="3.20"/> <object class="GtkDialog" id="CondFormat"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="border_width">6</property> + <property name="border-width">6</property> <property name="title" translatable="yes" context="condformatdialog|CondFormat">Conditional Formatting</property> <property name="modal">True</property> - <property name="default_width">0</property> - <property name="default_height">0</property> - <property name="type_hint">dialog</property> - <child> - <placeholder/> - </child> + <property name="default-width">0</property> + <property name="default-height">0</property> + <property name="type-hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -46,9 +43,9 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -61,9 +58,9 @@ <object class="GtkButton" id="help"> <property name="label" translatable="yes" context="stock">_Help</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -77,32 +74,32 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport" id="viewport1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkBox" id="condPlaygroundDrawingarea"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> diff --git a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui index 96b6f9a0ab1d..3926d66b44dc 100644 --- a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui +++ b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="rpt"> <requires lib="gtk+" version="3.20"/> <object class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-down</property> </object> <object class="GtkBox" id="ConditionWin"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="border_width">6</property> + <property name="border-width">6</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="headerLabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> </object> <packing> @@ -32,23 +32,23 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="spacing">12</property> <child> <object class="GtkComboBoxText" id="typeCombobox"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <items> <item translatable="yes" context="conditionwin|typeCombobox">Field Value Is</item> <item translatable="yes" context="conditionwin|typeCombobox">Expression Is</item> @@ -63,7 +63,7 @@ <child> <object class="GtkComboBoxText" id="opCombobox"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <items> <item translatable="yes" context="conditionwin|opCombobox">between</item> <item translatable="yes" context="conditionwin|opCombobox">not between</item> @@ -82,36 +82,36 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <property name="hexpand">True</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkEntry" id="lhsEntry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="lhsButton"> <property name="label" translatable="yes" context="conditionwin|lhsButton">...</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -124,7 +124,7 @@ <child> <object class="GtkLabel" id="andLabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <property name="label" translatable="yes" context="conditionwin|andLabel">and</property> </object> @@ -135,36 +135,36 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <property name="hexpand">True</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkEntry" id="rhsEntry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="rhsButton"> <property name="label" translatable="yes" context="conditionwin|rhsButton">...</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -176,44 +176,44 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="upButton"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> <property name="image">image1</property> <property name="always-show-image">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="spacing">12</property> <child> <object class="GtkToolbar" id="formatToolbox"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> <property name="valign">start</property> - <property name="toolbar_style">icons</property> - <property name="show_arrow">False</property> + <property name="toolbar-style">icons</property> + <property name="show-arrow">False</property> <child> <object class="GtkToggleToolButton" id="bold"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem1">Bold</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_bold.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_bold.png</property> </object> <packing> <property name="expand">False</property> @@ -224,8 +224,8 @@ <object class="GtkToggleToolButton" id="italic"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem2">Italic</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_italic.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_italic.png</property> </object> <packing> <property name="expand">False</property> @@ -236,8 +236,8 @@ <object class="GtkToggleToolButton" id="underline"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem3">Underline</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_underline.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_underline.png</property> </object> <packing> <property name="expand">False</property> @@ -247,7 +247,7 @@ <child> <object class="GtkSeparatorToolItem" id="separatortoolitem1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> </object> <packing> <property name="expand">False</property> @@ -258,8 +258,8 @@ <object class="GtkMenuToolButton" id="background"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem4">Background Color</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_backgroundcolor.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_backgroundcolor.png</property> </object> <packing> <property name="expand">False</property> @@ -270,8 +270,8 @@ <object class="GtkMenuToolButton" id="foreground"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem5">Font Color</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_fontcolor.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_fontcolor.png</property> </object> <packing> <property name="expand">False</property> @@ -282,8 +282,8 @@ <object class="GtkToggleToolButton" id="fontdialog"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem6">Character Formatting</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_fontdialog.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_fontdialog.png</property> </object> <packing> <property name="expand">False</property> @@ -300,19 +300,19 @@ <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="previewDrawingarea"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> </object> </child> @@ -327,23 +327,23 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkButton" id="downButton"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> <property name="valign">start</property> <property name="image">image2</property> <property name="always-show-image">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -354,37 +354,37 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">end</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkButton" id="removeButton"> <property name="label" translatable="yes" context="conditionwin|removeButton">-</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="addButton"> <property name="label" translatable="yes" context="conditionwin|addButton">+</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> <property name="halign">end</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> </object> diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 6c25687ef774..08b27296514f 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2594,7 +2594,6 @@ public: void SetInLinkUpdate(bool bSet); // TableLink or AreaLink bool IsInLinkUpdate() const; // including DdeLink - SC_DLLPUBLIC SfxItemPool* GetEditTextObjectPool() const; SC_DLLPUBLIC SfxItemPool* GetEditEnginePool() const; SC_DLLPUBLIC ScFieldEditEngine& GetEditEngine(); SC_DLLPUBLIC ScNoteEditEngine& GetNoteEngine(); diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index 368690019913..b580a811d4da 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -178,8 +178,7 @@ private: public: ScFieldEditEngine( - ScDocument* pDoc, SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = nullptr, - bool bDeleteEnginePool = false); + ScDocument* pDoc, SfxItemPool* pEnginePool, bool bDeleteEnginePool = false); void SetExecuteURL(bool bSet) { bExecuteURL = bSet; } @@ -195,8 +194,7 @@ private: public: ScTabEditEngine( ScDocument& rDoc ); // Default ScTabEditEngine(const ScPatternAttr& rPattern, - SfxItemPool *pEngineItemPool, ScDocument& rDoc, - SfxItemPool* pTextObjectPool = nullptr ); + SfxItemPool *pEngineItemPool, ScDocument& rDoc ); }; struct ScHeaderFieldData @@ -232,7 +230,7 @@ class ScNoteEditEngine final : public ScEditEngineDefaulter { public: - ScNoteEditEngine( SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool ); + ScNoteEditEngine( SfxItemPool* pEnginePool ); }; diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index 87faca864992..673b66d36994 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -298,7 +298,7 @@ class ScSimpleEditSourceHelper std::unique_ptr<ScSimpleEditSource> pOriginalSource; public: - ScSimpleEditSourceHelper(); + ScSimpleEditSourceHelper(SfxItemPool* pEditEnginePool); ~ScSimpleEditSourceHelper(); ScSimpleEditSource* GetOriginalSource() const { return pOriginalSource.get(); } @@ -308,7 +308,7 @@ public: class ScEditEngineTextObj final : public ScSimpleEditSourceHelper, public SvxUnoText { public: - ScEditEngineTextObj(); + ScEditEngineTextObj(SfxItemPool* pEditEngineItemPool); virtual ~ScEditEngineTextObj() noexcept override; void SetText( const EditTextObject& rTextObject ); diff --git a/sc/qa/uitest/calc_tests8/tdf125051.py b/sc/qa/uitest/calc_tests8/tdf125051.py index abf9836e97f9..d923a3ff7580 100644 --- a/sc/qa/uitest/calc_tests8/tdf125051.py +++ b/sc/qa/uitest/calc_tests8/tdf125051.py @@ -16,7 +16,18 @@ from libreoffice.uno.propertyvalue import mkPropertyValues # Bug 125051 - EDITING: CRASH when start SpellCheck class tdf125051(UITestCase): + def hasExtension(self, identifier): + m = self.xContext.getByName("/singletons/com.sun.star.deployment.ExtensionManager") + # Only check bundled extensions for now; it doesn't seem useful to check user and shared ones in UITests + p = (i for i in m.getDeployedExtensions("bundled", None, None) if i.getIdentifier().Value == identifier) + return any(r.IsPresent and not r.Value.IsAmbiguous and r.Value.Value for r in (i.isRegistered(None, None) for i in p)) + def test_tdf125051_crash_spelling_dialog(self): + # Check if English spellchecker is installed and active + if not self.hasExtension("org.openoffice.en.hunspell.dictionaries"): + print("Skipping test_tdf125051_crash_spelling_dialog: English spellckecker is unavailable") + return # can't test without English spell checker + with self.ui_test.create_doc_in_start_center("calc") as document: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/calc_tests9/tdf133629.py b/sc/qa/uitest/calc_tests9/tdf133629.py index 8b28fcb991fd..65ac53c83b4b 100644 --- a/sc/qa/uitest/calc_tests9/tdf133629.py +++ b/sc/qa/uitest/calc_tests9/tdf133629.py @@ -30,7 +30,8 @@ class tdf133629(UITestCase): select_pos(xTabs, "5") xPresets = xDialog.getChild("presets") - xPresets.executeAction("CHOOSE", mkPropertyValues({"POS": "4"})) + element4 = xPresets.getChild("3") + element4.executeAction("SELECT", mkPropertyValues({})) # Change width xLineWidth = xDialog.getChild("linewidthmf") diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods index c5156957acde..fa17e53c03cc 100644 --- a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods +++ b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.spreadsheet"> - <office:meta><meta:creation-date>2024-01-16T18:30:06.278000000</meta:creation-date><meta:editing-duration>PT3H3M8S</meta:editing-duration><meta:editing-cycles>58</meta:editing-cycles><meta:generator>LibreOfficeDev/25.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/a379e033425053885724b163147892f21830bca0</meta:generator><dc:date>2024-11-03T18:27:19.548583300</dc:date><meta:document-statistic meta:table-count="2" meta:cell-count="305" meta:object-count="0"/></office:meta> + <office:meta><meta:creation-date>2024-01-16T18:30:06.278000000</meta:creation-date><meta:editing-duration>PT3H22M31S</meta:editing-duration><meta:editing-cycles>63</meta:editing-cycles><meta:generator>LibreOfficeDev/26.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/f6b6eff1b754de1a9f5f6a79b7aad53604c87cf5</meta:generator><dc:date>2025-07-17T17:30:05.339473200</dc:date><meta:document-statistic meta:table-count="2" meta:cell-count="337" meta:object-count="0"/></office:meta> <office:settings> <config:config-item-set config:name="ooo:view-settings"> <config:config-item config:name="VisibleAreaTop" config:type="int">0</config:config-item> <config:config-item config:name="VisibleAreaLeft" config:type="int">0</config:config-item> - <config:config-item config:name="VisibleAreaWidth" config:type="int">15882</config:config-item> - <config:config-item config:name="VisibleAreaHeight" config:type="int">5013</config:config-item> + <config:config-item config:name="VisibleAreaWidth" config:type="int">54095</config:config-item> + <config:config-item config:name="VisibleAreaHeight" config:type="int">19417</config:config-item> <config:config-item-map-indexed config:name="Views"> <config:config-item-map-entry> <config:config-item config:name="ViewId" config:type="string">view1</config:config-item> @@ -31,7 +31,7 @@ </config:config-item-map-entry> <config:config-item-map-entry config:name="Sheet2"> <config:config-item config:name="CursorPositionX" config:type="int">3</config:config-item> - <config:config-item config:name="CursorPositionY" config:type="int">37</config:config-item> + <config:config-item config:name="CursorPositionY" config:type="int">43</config:config-item> <config:config-item config:name="ActiveSplitRange" config:type="short">2</config:config-item> <config:config-item config:name="PositionLeft" config:type="int">0</config:config-item> <config:config-item config:name="PositionRight" config:type="int">0</config:config-item> @@ -59,7 +59,7 @@ <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item> <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item> <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item> - <config:config-item config:name="FormulaBarHeight" config:type="short">1</config:config-item> + <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item> <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item> <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item> <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item> @@ -71,6 +71,7 @@ <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item> <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item> <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item> + <config:config-item config:name="FormulaBarHeight" config:type="short">1</config:config-item> <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item> <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item> <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item> @@ -79,34 +80,15 @@ </config:config-item-map-indexed> </config:config-item-set> <config:config-item-set config:name="ooo:configuration-settings"> - <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item> - <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item> + <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item> + <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item> + <config:config-item config:name="AutoCalculate" config:type="boolean">true</config:config-item> + <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item> + <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item> <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item> - <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item> - <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item> - <config:config-item config:name="PrinterSetup" config:type="base64Binary">bBb+/01pY3Jvc29mdCBQcmludCB0byBQREYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATWljcm9zb2Z0IFByaW50IFRvIFBERgAAAAAAAAAAAAAWAAEAPhUAAAAAAAAEAAhSAAAEdAAAM1ROVwAAAAAKAE0AaQBjAHIAbwBzAG8AZgB0ACAAUAByAGkAbgB0ACAAdABvACAAUABEAEYAAAAAAAAAAAAAAAAAAAAAAAAAAAABBAMG3ABYFAMtAQABAAkAmgs0CGQAAQAPAFgCAgABAFgCAwABAEEANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAIAAAABAAAA/////0dJUzQAAAAAAAAAAAAAAABESU5VIgDQACwDLBHiXo1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAABkAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAFNNVEoAAAAAEADAAHsAMAA4ADQARgAwADEARgBBAC0ARQA2ADMANAAtADQARAA3ADcALQA4ADMARQBFAC0AMAA3ADQAOAAxADcAQwAwADMANQA4ADEAfQAAAFJFU0RMTABVbmlyZXNETEwAUGFwZXJTaXplAEE0AE9yaWVudGF0aW9uAFBPUlRSQUlUAFJlc29sdXRpb24AUmVzT3B0aW9uMQBDb2xvck1vZGUAQ29sb3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwRAABWNERNAQAAAAAAAACcCnAiHAAAAOwAAAADAAAA+gFPCDTmd02D7gdIF8A1gdAAAABMAAAAAwAAAAAIAAAAAAAAAAAAAAMAAAAACAAAKgAAAAAIAAADAAAAQAAAAFYAAAAAEAAARABvAGMAdQBtAGUAbgB0AFUAcwBlAHIAUABhAHMAcwB3AG8AcgBkAAAARABvAGMAdQBtAGUAbgB0AE8AdwBuAGUAcgBQAGEAcwBzAHcAbwByAGQAAABEAG8AYwB1AG0AZQBuAHQAQwByAHkAcAB0AFMAZQBjAHUAcgBpAHQAeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAENPTVBBVF9EVVBMRVhfTU9ERRMARHVwbGV4TW9kZTo6VW5rbm93bgwAUFJJTlRFUl9OQU1FFgBNaWNyb3NvZnQgUHJpbnQgdG8gUERGCwBEUklWRVJfTkFNRRYATWljcm9zb2Z0IFByaW50IFRvIFBERg==</config:config-item> - <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item> - <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item> - <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item> - <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item> - <config:config-item config:name="LinkUpdateMode" config:type="short">3</config:config-item> - <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item> + <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item> <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item> - <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item> - <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item> - <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item> - <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item> - <config:config-item config:name="RasterResolutionX" config:type="int">1270</config:config-item> - <config:config-item config:name="RasterResolutionY" config:type="int">1270</config:config-item> - <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item> - <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item> - <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item> - <config:config-item config:name="AutoCalculate" config:type="boolean">true</config:config-item> - <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item> - <config:config-item config:name="PrinterName" config:type="string">Microsoft Print to PDF</config:config-item> - <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item> - <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item> - <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item> + <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item> <config:config-item-map-indexed config:name="ForbiddenCharacters"> <config:config-item-map-entry> <config:config-item config:name="Language" config:type="string">de</config:config-item> @@ -123,16 +105,35 @@ <config:config-item config:name="EndLine" config:type="string"/> </config:config-item-map-entry> </config:config-item-map-indexed> - <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item> - <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item> - <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item> - <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item> - <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item> + <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item> + <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item> + <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item> + <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item> <config:config-item config:name="IsDocumentShared" config:type="boolean">false</config:config-item> - <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item> - <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item> - <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item> + <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item> + <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item> + <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item> + <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item> + <config:config-item config:name="LinkUpdateMode" config:type="short">3</config:config-item> + <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item> + <config:config-item config:name="PrinterName" config:type="string">Microsoft Print to PDF</config:config-item> + <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item> + <config:config-item config:name="PrinterSetup" config:type="base64Binary">bBb+/01pY3Jvc29mdCBQcmludCB0byBQREYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATWljcm9zb2Z0IFByaW50IFRvIFBERgAAAAAAAAAAAAAWAAEAPhUAAAAAAAAEAAhSAAAEdAAAM1ROVwAAAAAKAE0AaQBjAHIAbwBzAG8AZgB0ACAAUAByAGkAbgB0ACAAdABvACAAUABEAEYAAAAAAAAAAAAAAAAAAAAAAAAAAAABBAMG3ABYFAMtAQABAAkAmgs0CGQAAQAPAFgCAgABAFgCAwABAEEANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAIAAAABAAAA/////0dJUzQAAAAAAAAAAAAAAABESU5VIgDQACwDLBHiXo1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAABkAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAFNNVEoAAAAAEADAAHsAMAA4ADQARgAwADEARgBBAC0ARQA2ADMANAAtADQARAA3ADcALQA4ADMARQBFAC0AMAA3ADQAOAAxADcAQwAwADMANQA4ADEAfQAAAFJFU0RMTABVbmlyZXNETEwAUGFwZXJTaXplAEE0AE9yaWVudGF0aW9uAFBPUlRSQUlUAFJlc29sdXRpb24AUmVzT3B0aW9uMQBDb2xvck1vZGUAQ29sb3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwRAABWNERNAQAAAAAAAACcCnAiHAAAAOwAAAADAAAA+gFPCDTmd02D7gdIF8A1gdAAAABMAAAAAwAAAAAIAAAAAAAAAAAAAAMAAAAACAAAKgAAAAAIAAADAAAAQAAAAFYAAAAAEAAARABvAGMAdQBtAGUAbgB0AFUAcwBlAHIAUABhAHMAcwB3AG8AcgBkAAAARABvAGMAdQBtAGUAbgB0AE8AdwBuAGUAcgBQAGEAcwBzAHcAbwByAGQAAABEAG8AYwB1AG0AZQBuAHQAQwByAHkAcAB0AFMAZQBjAHUAcgBpAHQAeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAENPTVBBVF9EVVBMRVhfTU9ERRMARHVwbGV4TW9kZTo6VW5rbm93bgwAUFJJTlRFUl9OQU1FFgBNaWNyb3NvZnQgUHJpbnQgdG8gUERGCwBEUklWRVJfTkFNRRYATWljcm9zb2Z0IFByaW50IFRvIFBERg==</config:config-item> + <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item> + <config:config-item config:name="RasterResolutionX" config:type="int">1270</config:config-item> + <config:config-item config:name="RasterResolutionY" config:type="int">1270</config:config-item> + <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item> + <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item> + <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item> + <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item> + <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item> + <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item> + <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item> + <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item> + <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item> + <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item> <config:config-item config:name="SyntaxStringRef" config:type="short">7</config:config-item> + <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item> <config:config-item-map-named config:name="ScriptConfiguration"> <config:config-item-map-entry config:name="Sheet1"> <config:config-item config:name="CodeName" config:type="string">Sheet1</config:config-item> @@ -145,9 +146,7 @@ </office:settings> <office:scripts> <office:script script:language="ooo:Basic"> - <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"> - <ooo:library-embedded ooo:name="Standard"/> - </ooo:libraries> + <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/> </office:script> </office:scripts> <office:font-face-decls> @@ -3006,21 +3005,21 @@ <number:boolean-style style:name="N99"> <number:boolean/> </number:boolean-style> - <style:style style:name="ce17" style:family="table-cell" style:parent-style-name="Default"> + <style:style style:name="ce9" style:family="table-cell" style:parent-style-name="Default"> <style:table-cell-properties fo:wrap-option="wrap"/> <style:text-properties fo:font-size="20pt" fo:font-weight="bold" style:font-size-asian="20pt" style:font-weight-asian="bold" style:font-size-complex="20pt" style:font-weight-complex="bold"/> </style:style> - <style:style style:name="ce18" style:family="table-cell" style:parent-style-name="Default"> + <style:style style:name="ce11" style:family="table-cell" style:parent-style-name="Default"> <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/> <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/> <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/> </style:style> - <style:style style:name="ce19" style:family="table-cell" style:parent-style-name="Default"> + <style:style style:name="ce12" style:family="table-cell" style:parent-style-name="Default"> <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/> <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/> <style:text-properties fo:font-size="12pt" fo:font-weight="bold" style:font-size-asian="12pt" style:font-weight-asian="bold" style:font-size-complex="12pt" style:font-weight-complex="bold"/> </style:style> - <style:style style:name="ce20" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99"> + <style:style style:name="ce14" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99"> <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/> <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/> <style:map style:condition="cell-content()=""" style:apply-style-name="Default" style:base-cell-address="Sheet1.B3"/> @@ -3032,7 +3031,7 @@ <style:map style:condition="cell-content()=1" style:apply-style-name="true" style:base-cell-address="Sheet1.B3"/> <style:map style:condition="cell-content()=0" style:apply-style-name="false" style:base-cell-address="Sheet1.B3"/> </style:style> - <style:style style:name="ce22" style:family="table-cell" style:parent-style-name="Default"> + <style:style style:name="ce16" style:family="table-cell" style:parent-style-name="Default"> <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/> <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/> <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/> @@ -3040,12 +3039,12 @@ <style:map style:condition="cell-content()=1" style:apply-style-name="true" style:base-cell-address="Sheet1.B3"/> <style:map style:condition="cell-content()=0" style:apply-style-name="false" style:base-cell-address="Sheet1.B3"/> </style:style> - <style:style style:name="ce23" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99"> + <style:style style:name="ce21" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99"> <style:map style:condition="cell-content()=""" style:apply-style-name="Default" style:base-cell-address="Sheet1.B3"/> <style:map style:condition="cell-content()=1" style:apply-style-name="true" style:base-cell-address="Sheet1.B3"/> <style:map style:condition="cell-content()=0" style:apply-style-name="false" style:base-cell-address="Sheet1.B3"/> </style:style> - <style:style style:name="ce24" style:family="table-cell" style:parent-style-name="Default"> + <style:style style:name="ce25" style:family="table-cell" style:parent-style-name="Default"> <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/> <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/> </style:style> @@ -3105,7 +3104,7 @@ <text:p><text:sheet-name>???</text:sheet-name><text:s/>(<text:title>???</text:title>)</text:p> </style:region-left> <style:region-right> - <text:p><text:date style:data-style-name="N2" text:date-value="2024-11-03">0000.00.00</text:date>, <text:time style:data-style-name="N2" text:time-value="18:24:50.951358300">00:00:00</text:time></text:p> + <text:p><text:date style:data-style-name="N2" text:date-value="2025-07-17">0000.00.00</text:date>, <text:time style:data-style-name="N2" text:time-value="17:26:18.652955100">00:00:00</text:time></text:p> </style:region-right> </style:header> <style:header-left style:display="false"/> @@ -3125,7 +3124,7 @@ <table:table-column table:style-name="co2" table:default-cell-style-name="ce5"/> <table:table-column table:style-name="co3" table:default-cell-style-name="Default"/> <table:table-row table:style-name="ro1"> - <table:table-cell table:style-name="ce17" office:value-type="string" calcext:value-type="string"> + <table:table-cell table:style-name="ce9" office:value-type="string" calcext:value-type="string"> <text:p>XMATCH Function</text:p> </table:table-cell> <table:table-cell table:style-name="Default"/> @@ -3137,10 +3136,10 @@ <table:table-cell/> </table:table-row> <table:table-row table:style-name="ro3"> - <table:table-cell table:style-name="ce18" office:value-type="string" calcext:value-type="string"> + <table:table-cell table:style-name="ce11" office:value-type="string" calcext:value-type="string"> <text:p>Result</text:p> </table:table-cell> - <table:table-cell table:style-name="ce20" table:formula="of:=AND([.B8:.B95])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <table:table-cell table:style-name="ce14" table:formula="of:=AND([.B8:.B95])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> <text:p>IGAZ</text:p> </table:table-cell> <table:table-cell/> @@ -3149,13 +3148,13 @@ <table:table-cell table:number-columns-repeated="3"/> </table:table-row> <table:table-row table:style-name="ro4"> - <table:table-cell table:style-name="ce19" office:value-type="string" calcext:value-type="string"> + <table:table-cell table:style-name="ce12" office:value-type="string" calcext:value-type="string"> <text:p>Sheet</text:p> </table:table-cell> - <table:table-cell table:style-name="ce22" office:value-type="string" calcext:value-type="string"> + <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string"> <text:p>Result</text:p> </table:table-cell> - <table:table-cell table:style-name="ce19" office:value-type="string" calcext:value-type="string"> + <table:table-cell table:style-name="ce12" office:value-type="string" calcext:value-type="string"> <text:p>Description</text:p> </table:table-cell> </table:table-row> @@ -3163,16 +3162,16 @@ <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> <text:p>2</text:p> </table:table-cell> - <table:table-cell table:style-name="ce20" table:formula="of:=AND([Sheet2.C2:.C202])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <table:table-cell table:style-name="ce14" table:formula="of:=AND([Sheet2.C2:.C202])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> <text:p>IGAZ</text:p> </table:table-cell> - <table:table-cell table:style-name="ce24" office:value-type="string" calcext:value-type="string"> + <table:table-cell table:style-name="ce25" office:value-type="string" calcext:value-type="string"> <text:p>Simple XMATCH formulas with local references and values</text:p> </table:table-cell> </table:table-row> <table:table-row table:style-name="ro2" table:number-rows-repeated="20"> <table:table-cell/> - <table:table-cell table:style-name="ce23"/> + <table:table-cell table:style-name="ce21"/> <table:table-cell/> </table:table-row> <table:table-row table:style-name="ro2" table:number-rows-repeated="21"> @@ -4264,10 +4263,123 @@ </table:table-cell> <table:table-cell table:number-columns-repeated="16"/> </table:table-row> - <table:table-row table:style-name="ro2" table:number-rows-repeated="6"> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F38:.$I38]);0;-1)" office:value-type="float" office:value="4" calcext:value-type="float"> + <text:p>4</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="4" calcext:value-type="float"> + <text:p>4</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce10" table:formula="of:=[.A38]=[.B38]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>IGAZ</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=FORMULA([.A38])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F38:$I38);0;-1)" calcext:value-type="string"> + <text:p>=XMATCH(1;ISNUMBER($F38:$I38);0;-1)</text:p> + </table:table-cell> + <table:table-cell/> + <table:table-cell office:value-type="float" office:value="1" calcext:value-type="float"> + <text:p>1</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float"> + <text:p>3</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="4" calcext:value-type="float"> + <text:p>4</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="11"/> + </table:table-row> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F39:.$I39]);0;-1)" office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce10" table:formula="of:=[.A39]=[.B39]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>IGAZ</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=FORMULA([.A39])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F39:$I39);0;-1)" calcext:value-type="string"> + <text:p>=XMATCH(1;ISNUMBER($F39:$I39);0;-1)</text:p> + </table:table-cell> + <table:table-cell/> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float"> + <text:p>3</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="13"/> + </table:table-row> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F40:.$I40]);0;-1)" office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce10" table:formula="of:=[.A40]=[.B40]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>IGAZ</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=FORMULA([.A40])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F40:$I40);0;-1)" calcext:value-type="string"> + <text:p>=XMATCH(1;ISNUMBER($F40:$I40);0;-1)</text:p> + </table:table-cell> <table:table-cell table:number-columns-repeated="2"/> - <table:table-cell table:style-name="ce10"/> - <table:table-cell table:number-columns-repeated="17"/> + <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float"> + <text:p>3</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="13"/> + </table:table-row> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F41:.$I41]);0;-1)" office:value-type="float" office:value="1" calcext:value-type="float"> + <text:p>1</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="1" calcext:value-type="float"> + <text:p>1</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce10" table:formula="of:=[.A41]=[.B41]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>IGAZ</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=FORMULA([.A41])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F41:$I41);0;-1)" calcext:value-type="string"> + <text:p>=XMATCH(1;ISNUMBER($F41:$I41);0;-1)</text:p> + </table:table-cell> + <table:table-cell/> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="14"/> + </table:table-row> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F42:.$I42]);0;-1)" office:value-type="string" office:string-value="" calcext:value-type="error"> + <text:p>#N/A</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error"> + <text:p>#N/A</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce10" table:formula="of:=ISERROR([.B42])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>IGAZ</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=FORMULA([.A42])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F42:$I42);0;-1)" calcext:value-type="string"> + <text:p>=XMATCH(1;ISNUMBER($F42:$I42);0;-1)</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="16"/> + </table:table-row> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F43:.$I43]);0;-1)" office:value-type="string" office:string-value="" calcext:value-type="error"> + <text:p>#N/A</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error"> + <text:p>#N/A</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce10" table:formula="of:=ISERROR([.B43])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>IGAZ</text:p> + </table:table-cell> + <table:table-cell table:formula="of:=FORMULA([.A43])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F43:$I43);0;-1)" calcext:value-type="string"> + <text:p>=XMATCH(1;ISNUMBER($F43:$I43);0;-1)</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="16"/> </table:table-row> <table:table-row table:style-name="ro2"> <table:table-cell table:number-columns-repeated="2"/> diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index e4966adc2f4a..6e3f2c2f8deb 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -1404,6 +1404,7 @@ static Bitmap getTile(ScModelObj* pModelObj, int nTilePosX, int nTilePosY, tools { size_t nCanvasSize = 1024; size_t nTileSize = 256; + // BGRA format data std::vector<unsigned char> aPixmap(nCanvasSize * nCanvasSize * 4, 0); ScopedVclPtrInstance<VirtualDevice> xDevice(DeviceFormat::WITHOUT_ALPHA); xDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi index cf840a07be43..03c12d686240 100644 --- a/sc/sdi/drawsh.sdi +++ b/sc/sdi/drawsh.sdi @@ -212,6 +212,7 @@ interface TableDraw SID_FONTWORK_KERN_CHARACTER_PAIRS [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ] SID_FONTWORK_CHARACTER_SPACING_DIALOG [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ] + SID_INSERT_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] SID_EDIT_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] SID_REMOVE_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi index a4df9af69108..5302b5bf1b63 100644 --- a/sc/sdi/drtxtob.sdi +++ b/sc/sdi/drtxtob.sdi @@ -116,6 +116,7 @@ interface TableDrawText SID_HYPERLINK_SETLINK [ ExecMethod = Execute; ] SID_HYPERLINK_GETLINK [ StateMethod = GetState; ] SID_OPEN_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] + SID_INSERT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] SID_EDIT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = GetState; ] SID_REMOVE_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi index 5dd18e81f3a4..aee93910dce5 100644 --- a/sc/sdi/editsh.sdi +++ b/sc/sdi/editsh.sdi @@ -74,6 +74,7 @@ interface TableText SID_HYPERLINK_SETLINK [ ExecMethod = Execute; ] SID_HYPERLINK_GETLINK [ StateMethod = GetState; ] + SID_INSERT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] SID_EDIT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = GetState; ] SID_REMOVE_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ] diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index c3bf713ad2f4..cb88956f7ec6 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1210,7 +1210,7 @@ public: // test for attributes if (!mpEngine) { - mpEngine.reset(new ScFieldEditEngine(&mrDoc, mrDoc.GetEditTextObjectPool())); + mpEngine.reset(new ScFieldEditEngine(&mrDoc, mrDoc.GetEditEnginePool())); // EEControlBits::ONLINESPELLING if there are errors already mpEngine->SetControlWord(mpEngine->GetControlWord() | EEControlBits::ONLINESPELLING); mrDoc.ApplyAsianEditSettings(*mpEngine); diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 6c685d2061bb..a56bb6bbcb59 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2394,7 +2394,7 @@ void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, std: void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const EditTextObject& rEditText ) { - if (GetDoc().GetEditTextObjectPool() == rEditText.GetPool()) + if (GetDoc().GetEditEnginePool() == rEditText.GetPool()) { SetEditText(rBlockPos, nRow, rEditText.Clone()); return; @@ -2410,7 +2410,7 @@ void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, cons void ScColumn::SetEditText( SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool ) { - if (pEditPool && GetDoc().GetEditTextObjectPool() == pEditPool) + if (pEditPool && GetDoc().GetEditEnginePool() == pEditPool) { SetEditText(nRow, rEditText.Clone()); return; diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 87a236dff2a6..dba7aaa821a7 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -486,11 +486,6 @@ SvNumberFormatter* ScDocument::GetFormatTable() const return mxPoolHelper->GetFormTable(); } -SfxItemPool* ScDocument::GetEditTextObjectPool() const -{ - return mxPoolHelper->GetEditTextObjectPool(); -} - SfxItemPool* ScDocument::GetEditEnginePool() const { return mxPoolHelper->GetEditEnginePool(); @@ -500,7 +495,7 @@ ScFieldEditEngine& ScDocument::GetEditEngine() { if ( !mpEditEngine ) { - mpEditEngine.reset( new ScFieldEditEngine(this, GetEditEnginePool(), GetEditTextObjectPool()) ); + mpEditEngine.reset( new ScFieldEditEngine(this, GetEditEnginePool()) ); mpEditEngine->SetUpdateLayout( false ); mpEditEngine->EnableUndo( false ); mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM)); @@ -514,7 +509,7 @@ ScNoteEditEngine& ScDocument::GetNoteEngine() if ( !mpNoteEngine ) { ScMutationGuard aGuard(*this, ScMutationGuardFlags::CORE); - mpNoteEngine.reset( new ScNoteEditEngine( GetEditEnginePool(), GetEditTextObjectPool() ) ); + mpNoteEngine.reset( new ScNoteEditEngine( GetEditEnginePool() ) ); mpNoteEngine->SetUpdateLayout( false ); mpNoteEngine->EnableUndo( false ); mpNoteEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM)); @@ -1211,7 +1206,7 @@ std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine() if (!pCacheFieldEditEngine) { pNewEditEngine.reset( new ScFieldEditEngine( - this, GetEditEnginePool(), GetEditTextObjectPool(), false) ); + this, GetEditEnginePool(), false) ); } else { diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 1208ed0f3cd3..8d4d70eb4437 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -1241,7 +1241,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, Transliteratio ( nType == TransliterationFlags::SENTENCE_CASE || nType == TransliterationFlags::TITLE_CASE))) { if (!pEngine) - pEngine.reset(new ScFieldEditEngine(this, GetEditEnginePool(), GetEditTextObjectPool())); + pEngine.reset(new ScFieldEditEngine(this, GetEditEnginePool())); // defaults from cell attributes must be set so right language is used const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab ); diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index d41f21e86d71..88103e4ed20a 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -317,14 +317,14 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) : rHitOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); // set FontHeight pool defaults without changing static SdrEngineDefaults - SfxItemPool* pOutlinerPool = rOutliner.GetEditTextObjectPool(); + SfxItemPool* pOutlinerPool = rOutliner.GetEditEnginePool(); if ( pOutlinerPool ) { m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt } - SfxItemPool* pHitOutlinerPool = rHitOutliner.GetEditTextObjectPool(); + SfxItemPool* pHitOutlinerPool = rHitOutliner.GetEditEnginePool(); if ( pHitOutlinerPool ) { pHitOutlinerPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx index 829c3f69e27d..21384dac1683 100644 --- a/sc/source/core/data/poolhelp.cxx +++ b/sc/source/core/data/poolhelp.cxx @@ -35,23 +35,12 @@ ScPoolHelper::ScPoolHelper( ScDocument& rSourceDoc ) ScPoolHelper::~ScPoolHelper() { - mpEditTextObjectPool.clear(); mpEditEnginePool.clear(); pFormTable.reset(); mxStylePool.clear(); pDocPool.clear(); } -SfxItemPool* ScPoolHelper::GetEditTextObjectPool() const -{ - if ( !mpEditTextObjectPool ) - { - mpEditTextObjectPool = EditEngine::CreatePool(); - mpEditTextObjectPool->SetDefaultMetric( MapUnit::Map100thMM ); - } - return mpEditTextObjectPool.get(); -} - SfxItemPool* ScPoolHelper::GetEditEnginePool() const { if ( !mpEditEnginePool ) diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 2dde31f721ef..bc7225d4e06d 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -263,7 +263,7 @@ void ScStyleSheetPool::CreateStandardStyles() const OUString aHelpFile;//which text??? SfxItemSet* pSet = nullptr; SfxItemSet* pHFSet = nullptr; - ScEditEngineDefaulter aEdEngine( EditEngine::CreatePool().get(), true ); + ScEditEngineDefaulter aEdEngine( pDoc->GetEditEnginePool(), true ); aEdEngine.SetUpdateLayout( false ); std::unique_ptr<EditTextObject> pEmptyTxtObj = aEdEngine.CreateTextObject(); std::unique_ptr<EditTextObject> pTxtObj; diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index d667824394e8..7fdc1d116943 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -161,7 +161,6 @@ void setSuffixCell( } EditEngine aEngine(rDoc.GetEditEnginePool()); - aEngine.SetEditTextObjectPool(rDoc.GetEditTextObjectPool()); SfxItemSet aAttr = aEngine.GetEmptyItemSet(); aAttr.Put( SvxEscapementItem( SvxEscapement::Superscript, EE_CHAR_ESCAPEMENT)); diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx index f8f3777a8bd2..32ac4031fb4d 100644 --- a/sc/source/core/inc/poolhelp.hxx +++ b/sc/source/core/inc/poolhelp.hxx @@ -39,7 +39,6 @@ private: rtl::Reference<ScDocumentPool> pDocPool; rtl::Reference< ScStyleSheetPool > mxStylePool; mutable std::unique_ptr<SvNumberFormatter> pFormTable; - mutable rtl::Reference<SfxItemPool> mpEditTextObjectPool; // EditTextObjectPool mutable rtl::Reference<SfxItemPool> mpEditEnginePool; // EditEnginePool public: @@ -53,7 +52,6 @@ public: ScDocumentPool* GetDocPool() const { return pDocPool.get(); } ScStyleSheetPool* GetStylePool() const { return mxStylePool.get(); } SvNumberFormatter* GetFormTable() const; - SfxItemPool* GetEditTextObjectPool() const; SfxItemPool* GetEditEnginePool() const; void SetFormTableOpt(const ScDocOptions& rOpt); diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 7dbbea06cb6e..89a4622f8f41 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -732,17 +732,14 @@ void ScEditEngineDefaulter::RemoveParaAttribs() ScTabEditEngine::ScTabEditEngine( ScDocument& rDoc ) : ScFieldEditEngine( &rDoc, rDoc.GetEditEnginePool() ) { - SetEditTextObjectPool( rDoc.GetEditTextObjectPool() ); const ScPatternAttr& rScPatternAttr(rDoc.getCellAttributeHelper().getDefaultCellAttribute()); Init(rScPatternAttr); } ScTabEditEngine::ScTabEditEngine( const ScPatternAttr& rPattern, - SfxItemPool* pEngineItemPool, ScDocument& rDoc, SfxItemPool* pTextObjectPool ) - : ScFieldEditEngine( &rDoc, pEngineItemPool, pTextObjectPool ) + SfxItemPool* pEngineItemPool, ScDocument& rDoc ) + : ScFieldEditEngine( &rDoc, pEngineItemPool ) { - if ( pTextObjectPool ) - SetEditTextObjectPool( pTextObjectPool ); Init( rPattern ); } @@ -887,12 +884,10 @@ OUString ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField, ScFieldEditEngine::ScFieldEditEngine( ScDocument* pDoc, SfxItemPool* pEnginePoolP, - SfxItemPool* pTextObjectPool, bool bDeleteEnginePoolP) : + bool bDeleteEnginePoolP) : ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ), mpDoc(pDoc), bExecuteURL(true) { - if ( pTextObjectPool ) - SetEditTextObjectPool( pTextObjectPool ); SetControlWord( EEControlBits(GetControlWord() | EEControlBits::MARKFIELDS) & ~EEControlBits::RTFSTYLESHEETS ); } @@ -922,12 +917,9 @@ bool ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField ) return false; } -ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP, - SfxItemPool* pTextObjectPool ) : +ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP ) : ScEditEngineDefaulter( pEnginePoolP, false/*bDeleteEnginePoolP*/ ) { - if ( pTextObjectPool ) - SetEditTextObjectPool( pTextObjectPool ); SetControlWord( EEControlBits(GetControlWord() | EEControlBits::MARKFIELDS) & ~EEControlBits::RTFSTYLESHEETS ); } diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index effa02dcbd81..3a73e0e83e9e 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -12778,11 +12778,11 @@ bool ScInterpreter::SearchMatrixForValue( VectorSearchArguments& vsa, const ScQu case wildcard : // simple serial search for equality mode (source data doesn't // need to be sorted). - for ( SCSIZE i = nMatCount - 1; i > 0; i-- ) + for ( SCSIZE i = nMatCount; i > 0; i-- ) { - if (lcl_CompareMatrix2Query(i, aMatAcc, rParam, rEntry, bMatchWholeCell) == 0) + if (lcl_CompareMatrix2Query(i - 1, aMatAcc, rParam, rEntry, bMatchWholeCell) == 0) { - vsa.nHitIndex = i + 1; // found ! + vsa.nHitIndex = i; // found ! break; } } diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index 00f23be6e292..d11d68d18987 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -1223,35 +1223,34 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm ) } } - { // export <extLst> - if (rModel.mxExtensionList) - { - // put <extLst>, it has no attributes - rStrm.GetCurrentStream()->startElement(XML_extLst); - - // export uri attribute of <ext> element - for (auto& uriValue : rModel.mxExtensionList->vExtension) - { - // export <ext> with uri attribute. - rStrm.GetCurrentStream()->startElement(XML_ext, XML_uri, uriValue); + // export <extLst> + if (rModel.mxExtensionList) + { + // put <extLst>, it has no attributes + rStrm.GetCurrentStream()->startElement(XML_extLst); - /* - TODO: export child elements of <ext>. We should export "any element in any namespace", which seems challenging. + // export uri attribute of <ext> element + for (auto& uriValue : rModel.mxExtensionList->vExtension) + { + // export <ext> with uri attribute. + rStrm.GetCurrentStream()->startElement(XML_ext, XML_uri, uriValue); - <extLst> - <ext> - (Any element in any namespace) - </ext> - </extLst> - */ + /* + TODO: export child elements of <ext>. We should export "any element in any namespace", which seems challenging. - // put </ext> - rStrm.GetCurrentStream()->endElement(XML_ext); - } + <extLst> + <ext> + (Any element in any namespace) + </ext> + </extLst> + */ - // put </extLst> - rStrm.GetCurrentStream()->endElement(XML_extLst); + // put </ext> + rStrm.GetCurrentStream()->endElement(XML_ext); } + + // put </extLst> + rStrm.GetCurrentStream()->endElement(XML_extLst); } // put </connection> diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 71089d10ec8f..7dea69cc1384 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -368,7 +368,6 @@ ScEditEngineDefaulter& XclRoot::GetEditEngine() const mrData.mxEditEngine = std::make_shared<ScEditEngineDefaulter>( GetDoc().GetEditEnginePool() ); ScEditEngineDefaulter& rEE = *mrData.mxEditEngine; rEE.SetRefMapMode(MapMode(MapUnit::Map100thMM)); - rEE.SetEditTextObjectPool( GetDoc().GetEditTextObjectPool() ); rEE.SetUpdateLayout( false ); rEE.EnableUndo( false ); rEE.SetControlWord( rEE.GetControlWord() & ~EEControlBits::ALLOWBIGOBJS ); diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx index 0546c46d772a..e5108e3def84 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -38,7 +38,7 @@ static ErrCode generate_Opcodes(LotusContext &rContext, SvStream& aStream, ScfStreamProgressBar& aPrgrsBar) { - OPCODE_FKT *pOps = nullptr; + const OPCODE_FKT *pOps = nullptr; int nOps = 0; ErrCode nErr = ERRCODE_NONE; diff --git a/sc/source/filter/lotus/lotfilter.hxx b/sc/source/filter/lotus/lotfilter.hxx index 596b9a9de742..81c443d2af81 100644 --- a/sc/source/filter/lotus/lotfilter.hxx +++ b/sc/source/filter/lotus/lotfilter.hxx @@ -35,8 +35,8 @@ class FormCache; struct LotusContext { static const sal_uInt16 nBOF = 0x0000; - static OPCODE_FKT pOpFkt[ FKT_LIMIT ]; - static OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx; table of possible Opcodes + static const OPCODE_FKT pOpFkt[ FKT_LIMIT ]; + static const OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx; table of possible Opcodes WKTYP eTyp; // type of file being processed bool bEOF; // shows end of file diff --git a/sc/source/filter/lotus/optab.cxx b/sc/source/filter/lotus/optab.cxx index b4cbaff91a9d..6d356492c2a6 100644 --- a/sc/source/filter/lotus/optab.cxx +++ b/sc/source/filter/lotus/optab.cxx @@ -22,7 +22,7 @@ #include "lotfilter.hxx" // edit function char *X( char * ) -OPCODE_FKT LotusContext::pOpFkt[ FKT_LIMIT ] = +const OPCODE_FKT LotusContext::pOpFkt[ FKT_LIMIT ] = { // Code OP_BOF, // 0 OP_EOF, // 1 @@ -127,7 +127,7 @@ OPCODE_FKT LotusContext::pOpFkt[ FKT_LIMIT ] = OP_HiddenCols, // 100 }; -OPCODE_FKT LotusContext::pOpFkt123[ FKT_LIMIT123 ] = +const OPCODE_FKT LotusContext::pOpFkt123[ FKT_LIMIT123 ] = { // Code OP_BOF123, // 0 OP_EOF123, // 1 diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx index b90f1fc5eb52..920f64dd6149 100644 --- a/sc/source/filter/oox/sheetdatacontext.cxx +++ b/sc/source/filter/oox/sheetdatacontext.cxx @@ -322,22 +322,24 @@ void SheetDataContext::importRow( const AttributeList& rAttribs ) bool SheetDataContext::importCell( const AttributeList& rAttribs ) { - bool bValid = true; + bool bValid = false; std::string_view p = rAttribs.getView(XML_r); - if (p.empty()) + if (!p.empty()) + { + bValid = mrAddressConv.convertToCellAddress(maCellData.maCellAddr, OUString::fromUtf8(p), + mnSheet, true); + if (bValid) + mnCol = maCellData.maCellAddr.Col(); + } + + if (!bValid) { ++mnCol; ScAddress aAddress( mnCol, mnRow, mnSheet ); bValid = mrAddressConv.checkCellAddress( aAddress, true ); maCellData.maCellAddr = aAddress; } - else - { - bValid = mrAddressConv.convertToCellAddress(maCellData.maCellAddr, OUString::fromUtf8(p), - mnSheet, true); - mnCol = maCellData.maCellAddr.Col(); - } if( bValid ) { diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index b99fa5f4b089..a8b534fe9032 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -606,7 +606,6 @@ void WorkbookGlobals::initialize() ScDocument& rDoc = getScDocument(); mxEditEngine.reset( new ScEditEngineDefaulter( rDoc.GetEditEnginePool() ) ); mxEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM)); - mxEditEngine->SetEditTextObjectPool( rDoc.GetEditTextObjectPool() ); mxEditEngine->SetUpdateLayout( false ); mxEditEngine->EnableUndo( false ); mxEditEngine->SetControlWord( mxEditEngine->GetControlWord() & ~EEControlBits::ALLOWBIGOBJS ); diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx index 0783c27a147e..241474359f44 100644 --- a/sc/source/filter/oox/worksheetbuffer.cxx +++ b/sc/source/filter/oox/worksheetbuffer.cxx @@ -243,7 +243,7 @@ void WorksheetBuffer::finalizeImport( sal_Int16 nActiveSheet ) if ( aSheetInfo->mnCalcSheet == nActiveSheet) rDoc.SetVisible( aSheetInfo->mnCalcSheet, true ); else - rDoc.SetVisible( aSheetInfo->mnCalcSheet, aSheetInfo->mnState == XML_visible ); + rDoc.SetVisible( aSheetInfo->mnCalcSheet, aSheetInfo->mnState != XML_hidden && aSheetInfo->mnState != XML_veryHidden); } } diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index eb58054289f4..107f316c0496 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -65,7 +65,7 @@ ScEEImport::ScEEImport( ScDocument& rDoc, const ScRange& rRange ) : { const ScPatternAttr* pPattern = mrDoc.GetPattern( maRange.aStart.Col(), maRange.aStart.Row(), maRange.aStart.Tab() ); - mpEngine.reset( new ScTabEditEngine(*pPattern, mrDoc.GetEditTextObjectPool(), mrDoc, mrDoc.GetEditTextObjectPool()) ); + mpEngine.reset( new ScTabEditEngine(*pPattern, mrDoc.GetEditEnginePool(), mrDoc) ); mpEngine->SetUpdateLayout( false ); mpEngine->EnableUndo( false ); } diff --git a/sc/source/filter/rtf/expbase.cxx b/sc/source/filter/rtf/expbase.cxx index e33d547cf448..c1dec52d3897 100644 --- a/sc/source/filter/rtf/expbase.cxx +++ b/sc/source/filter/rtf/expbase.cxx @@ -68,7 +68,7 @@ bool ScExportBase::IsEmptyTable( SCTAB nTab ) const ScFieldEditEngine& ScExportBase::GetEditEngine() const { if ( !pEditEngine ) - const_cast<ScExportBase*>(this)->pEditEngine.reset( new ScFieldEditEngine(pDoc, pDoc->GetEditTextObjectPool()) ); + const_cast<ScExportBase*>(this)->pEditEngine.reset( new ScFieldEditEngine(pDoc, pDoc->GetEditEnginePool()) ); return *pEditEngine; } diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 36374e96509d..9f15084a466e 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -295,7 +295,7 @@ void ScChangeTrackingExportHelper::WriteEditCell(const ScCellValue& rCell) if (rCell.getEditText() && !sString.isEmpty()) { if (!pEditTextObj) - pEditTextObj = new ScEditEngineTextObj(); + pEditTextObj = new ScEditEngineTextObj(m_rDoc.GetEditEnginePool()); pEditTextObj->SetText(*rCell.getEditText()); rExport.GetTextParagraphExport()->exportText(pEditTextObj, false, false); } @@ -598,7 +598,7 @@ void ScChangeTrackingExportHelper::CollectCellAutoStyles(const ScCellValue& rCel return; if (!pEditTextObj) - pEditTextObj = new ScEditEngineTextObj(); + pEditTextObj = new ScEditEngineTextObj(m_rDoc.GetEditEnginePool()); pEditTextObj->SetText(*rCell.getEditText()); rExport.GetTextParagraphExport()->collectTextAutoStyles(pEditTextObj, false, false); diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index 5089bea2ca6b..7310a5a83097 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -474,7 +474,7 @@ private: else { mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, XML_NUMBER); - mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, rItem.maString.getString()); + mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, OUString::number(rItem.mfVal)); } mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, getOperatorXML(rEntry, eSearchType)); diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index 2cbc2a499807..3984abca5f2c 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -828,8 +828,7 @@ void ScXMLChangeCellContext::CreateTextPContext(bool bIsNewParagraph) if (!pDoc) return; - mpEditTextObj = new ScEditEngineTextObj(); - mpEditTextObj->GetEditEngine()->SetEditTextObjectPool(pDoc->GetEditTextObjectPool()); + mpEditTextObj = new ScEditEngineTextObj(pDoc->GetEditEnginePool()); uno::Reference<text::XTextCursor> xTextCursor(mpEditTextObj->createTextCursor()); if (bIsNewParagraph) { diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 0bf76547bead..ffe0b364338d 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -5421,8 +5421,8 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass ) } CollectUserDefinedNamespaces(pDoc->GetPool(), ATTR_USERDEF); - CollectUserDefinedNamespaces(pDoc->GetEditTextObjectPool(), EE_PARA_XMLATTRIBS); - CollectUserDefinedNamespaces(pDoc->GetEditTextObjectPool(), EE_CHAR_XMLATTRIBS); + CollectUserDefinedNamespaces(pDoc->GetEditEnginePool(), EE_PARA_XMLATTRIBS); + CollectUserDefinedNamespaces(pDoc->GetEditEnginePool(), EE_CHAR_XMLATTRIBS); ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); if (pDrawLayer) { diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx index 69120ed68e12..6a76475e0732 100644 --- a/sc/source/filter/xml/xmlfonte.cxx +++ b/sc/source/filter/xml/xmlfonte.cxx @@ -85,7 +85,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScDocument* pDoc, ScXML const SfxItemPool* pItemPool(pDoc->GetPool()); AddFontItems(aWhichIds, 3, pItemPool, true); - const SfxItemPool* pEditPool(pDoc->GetEditTextObjectPool()); + const SfxItemPool* pEditPool(pDoc->GetEditEnginePool()); AddFontItems(aEditWhichIds, 3, pEditPool, false); std::unique_ptr<SfxStyleSheetIterator> pItr = pDoc->GetStyleSheetPool()->CreateIterator(SfxStyleFamily::Page); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 2cc965549aaf..4fe9904f6db0 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1642,7 +1642,6 @@ ScEditEngineDefaulter* ScXMLImport::GetEditEngine() { mpEditEngine.reset(new ScEditEngineDefaulter(mpDoc->GetEditEnginePool())); mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM)); - mpEditEngine->SetEditTextObjectPool(mpDoc->GetEditTextObjectPool()); mpEditEngine->SetUpdateLayout(false); mpEditEngine->EnableUndo(false); mpEditEngine->SetControlWord(mpEditEngine->GetControlWord() & ~EEControlBits::ALLOWBIGOBJS); diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index db1fb175a3ec..240505559943 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -817,7 +817,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder() if (!mpEditEngine) { rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool(); - mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true); + mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool.get(), true); mbEditEngineCreated = true; mpEditEngine->EnableUndo( false ); mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM)); @@ -1020,7 +1020,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() else { rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool(); - pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) ); + pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), true) ); } pEditEngine->EnableUndo( false ); if (pDocShell) @@ -1247,7 +1247,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() else { rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool(); - mpEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) ); + mpEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), true) ); } mpEditEngine->EnableUndo( false ); if (mpDocSh) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index af3de62fbaaf..c564832b8956 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -926,7 +926,7 @@ void ScInputHandler::ImplCreateEditEngine() // we cannot create a properly initialised EditEngine until we have a document assert( pActiveViewSh ); ScDocument& rDoc = pActiveViewSh->GetViewData().GetDocShell().GetDocument(); - mpEditEngine = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool(), rDoc.GetEditTextObjectPool()); + mpEditEngine = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool()); mpEditEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( mpEditEngine->GetWordDelimiters() ) ); UpdateRefDevice(); // also sets MapMode mpEditEngine->SetPaperSize( Size( 1000000, 1000000 ) ); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 18b18836c746..645e73eb7531 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1536,10 +1536,10 @@ void ScTextWnd::InitEditEngine() { pDocSh = &mpViewShell->GetViewData().GetDocShell(); ScDocument& rDoc = mpViewShell->GetViewData().GetDocument(); - pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool(), rDoc.GetEditTextObjectPool()); + pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool()); } else - pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), nullptr, true); + pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), true); pNew->SetExecuteURL( false ); m_xEditEngine = std::move(pNew); @@ -2106,10 +2106,10 @@ void ScTextWnd::MakeDialogEditView() if ( pViewSh ) { ScDocument& rDoc = pViewSh->GetViewData().GetDocument(); - pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool(), rDoc.GetEditTextObjectPool()); + pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool()); } else - pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), nullptr, true); + pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), true); pNew->SetExecuteURL( false ); m_xEditEngine = std::move(pNew); diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 053ecc02c93d..7430232e57c4 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -317,7 +317,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt const ScPatternAttr* pPattern = m_pDoc->GetPattern( nCol, nRow, nTab ); if (pPattern) { - ScTabEditEngine aEngine(*pPattern, m_pDoc->GetEditTextObjectPool(), *m_pDoc); + ScTabEditEngine aEngine(*pPattern, m_pDoc->GetEditEnginePool(), *m_pDoc); ScRefCellValue aCell(*m_pDoc, aPos); if (aCell.getType() == CELLTYPE_EDIT) { diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index 34931979499a..bc4e4ffcf55f 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -137,31 +137,31 @@ DeactivateRC ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP ) return DeactivateRC::LeavePage; } -IMPL_LINK(ScTabPageProtection, ProtectClickHdl, weld::Toggleable&, rBox, void) +IMPL_LINK_NOARG(ScTabPageProtection, ProtectClickHdl, weld::Toggleable&, void) { - aProtectState.ButtonToggled(rBox); - ButtonClick(rBox); + aProtectState.CheckButtonToggled(*m_xBtnProtect); + ButtonClick(*m_xBtnProtect); } -IMPL_LINK(ScTabPageProtection, HideCellClickHdl, weld::Toggleable&, rBox, void) +IMPL_LINK_NOARG(ScTabPageProtection, HideCellClickHdl, weld::Toggleable&, void) { - aHideCellState.ButtonToggled(rBox); - ButtonClick(rBox); + aHideCellState.CheckButtonToggled(*m_xBtnHideCell); + ButtonClick(*m_xBtnHideCell); } -IMPL_LINK(ScTabPageProtection, HideFormulaClickHdl, weld::Toggleable&, rBox, void) +IMPL_LINK_NOARG(ScTabPageProtection, HideFormulaClickHdl, weld::Toggleable&, void) { - aHideFormulaState.ButtonToggled(rBox); - ButtonClick(rBox); + aHideFormulaState.CheckButtonToggled(*m_xBtnHideFormula); + ButtonClick(*m_xBtnHideFormula); } -IMPL_LINK(ScTabPageProtection, HidePrintClickHdl, weld::Toggleable&, rBox, void) +IMPL_LINK_NOARG(ScTabPageProtection, HidePrintClickHdl, weld::Toggleable&, void) { - aHidePrintState.ButtonToggled(rBox); - ButtonClick(rBox); + aHidePrintState.CheckButtonToggled(*m_xBtnHidePrint); + ButtonClick(*m_xBtnHidePrint); } -void ScTabPageProtection::ButtonClick(const weld::Toggleable& rBox) +void ScTabPageProtection::ButtonClick(const weld::CheckButton& rBox) { TriState eState = rBox.get_state(); if (eState == TRISTATE_INDET) diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx index 19ebe49859d2..acdd7ef4a408 100644 --- a/sc/source/ui/dataprovider/xmldataprovider.cxx +++ b/sc/source/ui/dataprovider/xmldataprovider.cxx @@ -103,10 +103,9 @@ void XMLDataProvider::Import() mpDoc.reset(new ScDocument(SCDOCMODE_CLIP)); mpDoc->ResetClip(mpDocument, SCTAB(0)); - mxXMLFetchThread = new XMLFetchThread(*mpDoc, mrDataSource.getURL(), - mrDataSource.getXMLImportParam(), mrDataSource.getID(), - std::bind(&XMLDataProvider::ImportFinished, this), - std::vector(mrDataSource.getDataTransformation())); + mxXMLFetchThread = new XMLFetchThread( + *mpDoc, mrDataSource.getURL(), mrDataSource.getXMLImportParam(), mrDataSource.getID(), + [this]() { this->ImportFinished(); }, std::vector(mrDataSource.getDataTransformation())); mxXMLFetchThread->launch(); if (mbDeterministic) diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index babab2abb4a6..63d2026195b2 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -785,7 +785,7 @@ ErrCodeMsg ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncod bHasMemo, eCharSet ); // also needed for exception catch SCROW nDocRow = 0; - ScFieldEditEngine aEditEngine(m_pDocument.get(), m_pDocument->GetEditTextObjectPool()); + ScFieldEditEngine aEditEngine(m_pDocument.get(), m_pDocument->GetEditEnginePool()); OUString aString; try diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index e466ba00b4f7..e10c8b61afe8 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -286,6 +286,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) ExecuteTextAttrDlg( rReq ); break; + case SID_INSERT_HYPERLINK: case SID_EDIT_HYPERLINK: if ( pSingleSelectedObj ) rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG ); diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 4bf32a50815d..aa707cfd191a 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -224,6 +224,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions { // no hyperlink options for a selected group rSet.DisableItem( SID_EDIT_HYPERLINK ); + rSet.DisableItem( SID_INSERT_HYPERLINK ); rSet.DisableItem( SID_REMOVE_HYPERLINK ); rSet.DisableItem( SID_OPEN_HYPERLINK ); rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION ); @@ -240,6 +241,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions rSet.DisableItem( SID_REMOVE_HYPERLINK ); rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION ); } + else + { + rSet.DisableItem( SID_INSERT_HYPERLINK ); + } SdrLayerID nLayerID = pObj->GetLayer(); if ( nLayerID != SC_LAYER_INTERN ) bCanRename = true; // #i51351# anything except internal objects can be renamed @@ -305,6 +310,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions rSet.DisableItem( SID_ORIGINALSIZE ); rSet.DisableItem( SID_FITCELLSIZE ); rSet.DisableItem( SID_ATTR_TRANSFORM ); + rSet.DisableItem( SID_INSERT_HYPERLINK ); } if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN ) diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 3e1ecfabcc70..fa40da9828c6 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -299,6 +299,10 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) } break; + case SID_INSERT_HYPERLINK: + mrViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute(SID_HYPERLINK_DIALOG); + break; + case SID_EDIT_HYPERLINK: { // Ensure the field is selected first @@ -403,6 +407,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) } if (rSet.GetItemState(SID_OPEN_HYPERLINK) != SfxItemState::UNKNOWN + || rSet.GetItemState(SID_INSERT_HYPERLINK) != SfxItemState::UNKNOWN || rSet.GetItemState(SID_EDIT_HYPERLINK) != SfxItemState::UNKNOWN || rSet.GetItemState(SID_COPY_HYPERLINK_LOCATION) != SfxItemState::UNKNOWN || rSet.GetItemState(SID_REMOVE_HYPERLINK) != SfxItemState::UNKNOWN) @@ -415,6 +420,10 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION ); rSet.DisableItem( SID_REMOVE_HYPERLINK ); } + else + { + rSet.DisableItem( SID_INSERT_HYPERLINK ); + } } if( rSet.GetItemState( SID_TRANSLITERATE_HALFWIDTH ) != SfxItemState::UNKNOWN ) diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index 22527d3addc7..f65782c3bfc8 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -54,6 +54,7 @@ class ScPageBreakData; class FmFormView; class ScFieldEditEngine; class SdrPaintWindow; +class ScDrawStringsVars; #define SC_SCENARIO_HSPACE 60 #define SC_SCENARIO_VSPACE 50 @@ -312,6 +313,20 @@ private: // and the single call to end of constructor to be sure this always happens void SetCellRotations(); + /// inner loop of LayoutStrings + void LayoutStringsImpl(bool bPixelToLogic, RowInfo* pThisRowInfo, SCCOL nX, SCROW nY, SCSIZE nArrY, + std::optional<SCCOL>& oLastEmptyCellX, + SCCOL nLastContentCol, + std::vector<std::unique_ptr<ScPatternAttr> >& aAltPatterns, + const ScPatternAttr*& pOldPattern, + const SfxItemSet*& pOldCondSet, + SvtScriptType& nOldScript, + ScDrawStringsVars& aVars, + bool& bProgress, tools::Long nPosX, tools::Long nPosY, bool bTaggedPDF, + bool& bReopenRowTag, vcl::PDFExtOutDevData* pPDF, + tools::Long nLayoutSign, + KernArray& aDX); + public: /** diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx index 4a613f344b12..f7f70673a047 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -61,7 +61,7 @@ private: DECL_LINK(HideCellClickHdl, weld::Toggleable&, void); DECL_LINK(HideFormulaClickHdl, weld::Toggleable&, void); DECL_LINK(HidePrintClickHdl, weld::Toggleable&, void); - void ButtonClick(const weld::Toggleable& rBox); + void ButtonClick(const weld::CheckButton& rBox); void UpdateButtons(); }; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 1da1020a005a..742245975dd2 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -421,6 +421,8 @@ public: void FinishProtectTable(); void ExecProtectTable( SfxRequest& rReq ); + void ExecGoToTab( SfxRequest& rReq, SfxBindings& rBindings ); + using ScTabView::ShowCursor; bool IsActive() const { return bIsActive; } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 60d2bbc51bbc..e0ce8a80f45f 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -2145,7 +2145,6 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr OUString aStr = aCell.getString(rDoc); EditEngine aEngine( rDoc.GetEditEnginePool() ); - aEngine.SetEditTextObjectPool(rDoc.GetEditTextObjectPool()); /* EE_CHAR_ESCAPEMENT seems to be set on the cell _only_ when * there are no other attribs for the cell. diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 8fd8c0813ad5..038342ca4160 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -683,11 +683,11 @@ uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getEnd() UNO3_GETIMPLEMENTATION2_IMPL(ScDrawTextCursor, SvxUnoTextCursor); -ScSimpleEditSourceHelper::ScSimpleEditSourceHelper() +ScSimpleEditSourceHelper::ScSimpleEditSourceHelper(SfxItemPool* pEditEnginePool) { - rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool(); - pEnginePool->SetDefaultMetric( MapUnit::Map100thMM ); - pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) ); // TRUE: become owner of pool +// rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool(); +// pEnginePool->SetDefaultMetric( MapUnit::Map100thMM ); + pEditEngine.reset( new ScFieldEditEngine(nullptr, pEditEnginePool, false) ); // TRUE: become owner of pool pForwarder.reset( new SvxEditEngineForwarder( *pEditEngine ) ); pOriginalSource.reset( new ScSimpleEditSource( pForwarder.get() ) ); } @@ -701,7 +701,8 @@ ScSimpleEditSourceHelper::~ScSimpleEditSourceHelper() pEditEngine.reset(); } -ScEditEngineTextObj::ScEditEngineTextObj() : +ScEditEngineTextObj::ScEditEngineTextObj(SfxItemPool* pEditEnginePool) : + ScSimpleEditSourceHelper(pEditEnginePool), SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertySet(), uno::Reference<text::XText>() ) { } @@ -772,7 +773,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() else { rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool(); - pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) ); + pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), true) ); } // currently, GetPortions doesn't work if UpdateMode is sal_False, // this will be fixed (in EditEngine) by src600 diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index f15ee1903f12..75080dce163e 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -639,6 +639,12 @@ void ScEditShell::Execute( SfxRequest& rReq ) } } break; + case SID_INSERT_HYPERLINK: + { + rViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute( + SID_HYPERLINK_DIALOG); + } + break; case SID_EDIT_HYPERLINK: { // Ensure the field is selected first @@ -823,6 +829,16 @@ void ScEditShell::GetState( SfxItemSet& rSet ) } break; + case SID_INSERT_HYPERLINK: + { + // Disable insert hyperlink if no text is selected or cursor is at a URL field + ESelection aSel( pActiveView->GetSelection() ); + if (!aSel.HasRange() || URLFieldHelper::IsCursorAtURLField(*pEditView, + /*AlsoCheckBeforeCursor=*/true)) + rSet.DisableItem (nWhich); + } + break; + case SID_EDIT_HYPERLINK: case SID_COPY_HYPERLINK_LOCATION: case SID_REMOVE_HYPERLINK: diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 2c1ab215aa2c..8b5122e2c365 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5789,7 +5789,7 @@ std::shared_ptr<ScFieldEditEngine> createEditEngine( ScDocShell& rDocSh, const S { ScDocument& rDoc = rDocSh.GetDocument(); - auto pEngine = std::make_shared<ScFieldEditEngine>(&rDoc, rDoc.GetEditTextObjectPool()); + auto pEngine = std::make_shared<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool()); ScSizeDeviceProvider aProv(rDocSh); pEngine->SetRefDevice(aProv.GetDevice()); pEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM)); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 6fbdeb8cb021..b7b32e2c63a1 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -819,32 +819,30 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI OutputDevice* pContentDev = &rDevice; // device for document content, used by overlay manager SdrPaintWindow* pTargetPaintWindow = nullptr; // #i74769# work with SdrPaintWindow directly + // init redraw + if (pCurTabViewShell) { - // init redraw - if (pCurTabViewShell) + MapMode aCurrentMapMode(pContentDev->GetMapMode()); + pContentDev->SetMapMode(aDrawMode); + SdrView* pDrawView = pCurTabViewShell->GetScDrawView(); + + if(pDrawView) { - MapMode aCurrentMapMode(pContentDev->GetMapMode()); - pContentDev->SetMapMode(aDrawMode); - SdrView* pDrawView = pCurTabViewShell->GetScDrawView(); + // #i74769# Use new BeginDrawLayers() interface + vcl::Region aDrawingRegion(aDrawingRectLogic); + pTargetPaintWindow = pDrawView->BeginDrawLayers(pContentDev, aDrawingRegion); + OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)"); - if(pDrawView) + if (!bIsTiledRendering) { - // #i74769# Use new BeginDrawLayers() interface - vcl::Region aDrawingRegion(aDrawingRectLogic); - pTargetPaintWindow = pDrawView->BeginDrawLayers(pContentDev, aDrawingRegion); - OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)"); - - if (!bIsTiledRendering) - { - // #i74769# get target device from SdrPaintWindow, this may be the prerender - // device now, too. - pContentDev = &(pTargetPaintWindow->GetTargetOutputDevice()); - aOutputData.SetContentDevice(pContentDev); - } + // #i74769# get target device from SdrPaintWindow, this may be the prerender + // device now, too. + pContentDev = &(pTargetPaintWindow->GetTargetOutputDevice()); + aOutputData.SetContentDevice(pContentDev); } - - pContentDev->SetMapMode(aCurrentMapMode); } + + pContentDev->SetMapMode(aCurrentMapMode); } // app-background / document edge (area) (Pixel) @@ -1059,44 +1057,42 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI } } + // end redraw + if (pCurTabViewShell) { - // end redraw - if (pCurTabViewShell) + MapMode aCurrentMapMode(pContentDev->GetMapMode()); + pContentDev->SetMapMode(aDrawMode); + + if (bIsTiledRendering) { - MapMode aCurrentMapMode(pContentDev->GetMapMode()); - pContentDev->SetMapMode(aDrawMode); + Point aOrigin = aOriginalMode.GetOrigin(); + if (bLayoutRTL) + aOrigin.setX(-aOrigin.getX() + + o3tl::toTwips(aOutputData.nScrX + aOutputData.GetScrW(), o3tl::Length::px)); + else + aOrigin.AdjustX(o3tl::toTwips(aOutputData.nScrX, o3tl::Length::px)); - if (bIsTiledRendering) - { - Point aOrigin = aOriginalMode.GetOrigin(); - if (bLayoutRTL) - aOrigin.setX(-aOrigin.getX() - + o3tl::toTwips(aOutputData.nScrX + aOutputData.GetScrW(), o3tl::Length::px)); - else - aOrigin.AdjustX(o3tl::toTwips(aOutputData.nScrX, o3tl::Length::px)); - - aOrigin.AdjustY(o3tl::toTwips(aOutputData.nScrY, o3tl::Length::px)); - aOrigin = o3tl::convert(aOrigin, o3tl::Length::twip, o3tl::Length::mm100); - // keep into account the zoom factor - aOrigin = aOrigin.scale( - aDrawMode.GetScaleX().GetDenominator(), aDrawMode.GetScaleX().GetNumerator(), - aDrawMode.GetScaleY().GetDenominator(), aDrawMode.GetScaleY().GetNumerator()); - - MapMode aNew = rDevice.GetMapMode(); - aNew.SetOrigin(aOrigin); - rDevice.SetMapMode(aNew); - } + aOrigin.AdjustY(o3tl::toTwips(aOutputData.nScrY, o3tl::Length::px)); + aOrigin = o3tl::convert(aOrigin, o3tl::Length::twip, o3tl::Length::mm100); + // keep into account the zoom factor + aOrigin = aOrigin.scale( + aDrawMode.GetScaleX().GetDenominator(), aDrawMode.GetScaleX().GetNumerator(), + aDrawMode.GetScaleY().GetDenominator(), aDrawMode.GetScaleY().GetNumerator()); - SdrView* pDrawView = pCurTabViewShell->GetScDrawView(); + MapMode aNew = rDevice.GetMapMode(); + aNew.SetOrigin(aOrigin); + rDevice.SetMapMode(aNew); + } - if(pDrawView) - { - // #i74769# work with SdrPaintWindow directly - pDrawView->EndDrawLayers(*pTargetPaintWindow, true); - } + SdrView* pDrawView = pCurTabViewShell->GetScDrawView(); - pContentDev->SetMapMode(aCurrentMapMode); + if(pDrawView) + { + // #i74769# work with SdrPaintWindow directly + pDrawView->EndDrawLayers(*pTargetPaintWindow, true); } + + pContentDev->SetMapMode(aCurrentMapMode); } // in place editing - lok case diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 3427fc2296c4..50068f4d3cb9 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1538,11 +1538,6 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic) --nLoopStartX; // start before nX1 for rest of long text to the left // variables for GetOutputArea - OutputAreaParam aAreaParam; - bool bCellIsValue = false; - tools::Long nNeededWidth = 0; - const ScPatternAttr* pPattern = nullptr; - const SfxItemSet* pCondSet = nullptr; const ScPatternAttr* pOldPattern = nullptr; const SfxItemSet* pOldCondSet = nullptr; SvtScriptType nOldScript = SvtScriptType::NONE; @@ -1566,693 +1561,717 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic) std::optional<SCCOL> oLastEmptyCellX; for (SCCOL nX=nLoopStartX; nX<=nX2; nX++) { - bool bMergeEmpty = false; - const ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX); - bool bEmpty = nX < nX1 || pThisRowInfo->basicCellInfo(nX).bEmptyCellText; - - SCCOL nCellX = nX; // position where the cell really starts - SCROW nCellY = nY; - bool bDoCell = false; - bool bUseEditEngine = false; + LayoutStringsImpl(bPixelToLogic, pThisRowInfo, nX, nY, nArrY, oLastEmptyCellX, nLastContentCol, + aAltPatterns, pOldPattern, pOldCondSet, nOldScript, aVars, + bProgress, nPosX, nPosY, bTaggedPDF, bReopenRowTag, pPDF, nLayoutSign, aDX); + nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign; + } + } + nPosY += pRowInfo[nArrY].nHeight; + } + if (bTaggedPDF) + pPDF->EndStructureElement(); // Table - // Part of a merged cell? + if ( bProgress ) + ScProgress::DeleteInterpretProgress(); +} - bool bOverlapped = (pInfo->bHOverlapped || pInfo->bVOverlapped); - if ( bOverlapped ) - { - bEmpty = true; +/// inner loop of LayoutStrings +void ScOutputData::LayoutStringsImpl(bool const bPixelToLogic, RowInfo* const pThisRowInfo, + SCCOL const nX, SCROW const nY, SCSIZE const nArrY, + std::optional<SCCOL>& oLastEmptyCellX, + SCCOL const nLastContentCol, + std::vector<std::unique_ptr<ScPatternAttr> >& aAltPatterns, + const ScPatternAttr*& pOldPattern, + const SfxItemSet*& pOldCondSet, + SvtScriptType& nOldScript, + ScDrawStringsVars& aVars, + bool& bProgress, tools::Long const nPosX, tools::Long const nPosY, + bool const bTaggedPDF, bool& bReopenRowTag, vcl::PDFExtOutDevData* const pPDF, + tools::Long const nLayoutSign, KernArray& aDX) +{ + const ScPatternAttr* pPattern = nullptr; + const SfxItemSet* pCondSet = nullptr; + bool bCellIsValue = false; + tools::Long nNeededWidth = 0; + OutputAreaParam aAreaParam; + bool bMergeEmpty = false; + const ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX); + bool bEmpty = nX < nX1 || pThisRowInfo->basicCellInfo(nX).bEmptyCellText; - SCCOL nOverX; // start of the merged cells - SCROW nOverY; - bool bVisChanged = !pRowInfo[nArrY-1].bChanged; - if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged )) - { - nCellX = nOverX; - nCellY = nOverY; - bDoCell = true; - } - else - bMergeEmpty = true; - } + SCCOL nCellX = nX; // position where the cell really starts + SCROW nCellY = nY; + bool bDoCell = false; + bool bUseEditEngine = false; - // Rest of a long text further to the left? + // Part of a merged cell? - if ( bEmpty && !bMergeEmpty && nX < nX1 && !bOverlapped ) - { - if (!oLastEmptyCellX) - { - SCCOL nTempX=nX1; - while (nTempX > 0 && IsEmptyCellText( pThisRowInfo, nTempX, nY )) - --nTempX; - oLastEmptyCellX = nTempX; - } + bool bOverlapped = (pInfo->bHOverlapped || pInfo->bVOverlapped); + if ( bOverlapped ) + { + bEmpty = true; - if ( *oLastEmptyCellX < nX1 && - !IsEmptyCellText( pThisRowInfo, *oLastEmptyCellX, nY ) && - !mpDoc->HasAttrib( *oLastEmptyCellX,nY,nTab, nX1,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) - { - nCellX = *oLastEmptyCellX; - bDoCell = true; - } - } + SCCOL nOverX; // start of the merged cells + SCROW nOverY; + bool bVisChanged = !pRowInfo[nArrY-1].bChanged; + if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged )) + { + nCellX = nOverX; + nCellY = nOverY; + bDoCell = true; + } + else + bMergeEmpty = true; + } - // Rest of a long text further to the right? + // Rest of a long text further to the left? - if ( bEmpty && !bMergeEmpty && nX == nX2 && !bOverlapped ) - { - // don't have to look further than nLastContentCol + if ( bEmpty && !bMergeEmpty && nX < nX1 && !bOverlapped ) + { + if (!oLastEmptyCellX) + { + SCCOL nTempX=nX1; + while (nTempX > 0 && IsEmptyCellText( pThisRowInfo, nTempX, nY )) + --nTempX; + oLastEmptyCellX = nTempX; + } - SCCOL nTempX=nX; - while (nTempX < nLastContentCol && IsEmptyCellText( pThisRowInfo, nTempX, nY )) - ++nTempX; + if ( *oLastEmptyCellX < nX1 && + !IsEmptyCellText( pThisRowInfo, *oLastEmptyCellX, nY ) && + !mpDoc->HasAttrib( *oLastEmptyCellX,nY,nTab, nX1,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) + { + nCellX = *oLastEmptyCellX; + bDoCell = true; + } + } - if ( nTempX > nX && - !IsEmptyCellText( pThisRowInfo, nTempX, nY ) && - !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) - { - nCellX = nTempX; - bDoCell = true; - } - } + // Rest of a long text further to the right? - // normal visible cell + if ( bEmpty && !bMergeEmpty && nX == nX2 && !bOverlapped ) + { + // don't have to look further than nLastContentCol - if (!bEmpty) - bDoCell = true; + SCCOL nTempX=nX; + while (nTempX < nLastContentCol && IsEmptyCellText( pThisRowInfo, nTempX, nY )) + ++nTempX; - // don't output the cell that's being edited + if ( nTempX > nX && + !IsEmptyCellText( pThisRowInfo, nTempX, nY ) && + !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) + { + nCellX = nTempX; + bDoCell = true; + } + } - if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow ) - bDoCell = false; + // normal visible cell - // skip text in cell if data bar/icon set is set and only value selected - if ( bDoCell ) - { - if(pInfo->pDataBar && !pInfo->pDataBar->mbShowValue) - bDoCell = false; - if(pInfo->pIconSet && !pInfo->pIconSet->mbShowValue) - bDoCell = false; - } + if (!bEmpty) + bDoCell = true; - // output the cell text + // don't output the cell that's being edited - ScRefCellValue aCell; - if (bDoCell) - { - if ( nCellY == nY && nCellX == nX && nCellX >= nX1 && nCellX <= nX2 ) - aCell = pThisRowInfo->cellInfo(nCellX).maCell; - else - GetVisibleCell( nCellX, nCellY, nTab, aCell ); // get from document - if (aCell.isEmpty()) - bDoCell = false; - else if (aCell.getType() == CELLTYPE_EDIT) - bUseEditEngine = true; - } + if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow ) + bDoCell = false; - // Check if this cell is mis-spelled. - if (bDoCell && !bUseEditEngine && aCell.getType() == CELLTYPE_STRING) - { - if (mpSpellCheckCxt && mpSpellCheckCxt->isMisspelled(nCellX, nCellY)) - bUseEditEngine = true; - } + // skip text in cell if data bar/icon set is set and only value selected + if ( bDoCell ) + { + if(pInfo->pDataBar && !pInfo->pDataBar->mbShowValue) + bDoCell = false; + if(pInfo->pIconSet && !pInfo->pIconSet->mbShowValue) + bDoCell = false; + } - if (bDoCell && !bUseEditEngine) - { - if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) - { - ScCellInfo& rCellInfo = pThisRowInfo->cellInfo(nCellX); - pPattern = rCellInfo.pPatternAttr; - pCondSet = rCellInfo.pConditionSet; + // output the cell text - if ( !pPattern ) - { - // #i68085# pattern from cell info for hidden columns is null, - // test for null is quicker than using column flags - pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab ); - pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab ); - } - } - else // get from document - { - pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab ); - pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab ); - } - if ( mpDoc->GetPreviewFont() || mpDoc->GetPreviewCellStyle() ) - { - aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern)); - ScPatternAttr* pAltPattern = aAltPatterns.back().get(); - if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, nTab ) ) - { - pAltPattern->SetStyleSheet(pPreviewStyle); - } - else if ( SfxItemSet* pFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, nTab ) ) - { - if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_FONT ) ) - pAltPattern->GetItemSet().Put( *pItem ); - if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CJK_FONT ) ) - pAltPattern->GetItemSet().Put( *pItem ); - if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CTL_FONT ) ) - pAltPattern->GetItemSet().Put( *pItem ); - } - pPattern = pAltPattern; - } + ScRefCellValue aCell; + if (bDoCell) + { + if ( nCellY == nY && nCellX == nX && nCellX >= nX1 && nCellX <= nX2 ) + aCell = pThisRowInfo->cellInfo(nCellX).maCell; + else + GetVisibleCell( nCellX, nCellY, nTab, aCell ); // get from document + if (aCell.isEmpty()) + bDoCell = false; + else if (aCell.getType() == CELLTYPE_EDIT) + bUseEditEngine = true; + } - if (aCell.hasNumeric() && - pPattern->GetItem(ATTR_LINEBREAK, pCondSet).GetValue()) - { - // Disable line break when the cell content is numeric. - aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern)); - ScPatternAttr* pAltPattern = aAltPatterns.back().get(); - ScLineBreakCell aLineBreak(false); - pAltPattern->GetItemSet().Put(aLineBreak); - pPattern = pAltPattern; - } + // Check if this cell is mis-spelled. + if (bDoCell && !bUseEditEngine && aCell.getType() == CELLTYPE_STRING) + { + if (mpSpellCheckCxt && mpSpellCheckCxt->isMisspelled(nCellX, nCellY)) + bUseEditEngine = true; + } - SvtScriptType nScript = mpDoc->GetCellScriptType( - ScAddress(nCellX, nCellY, nTab), - pPattern->GetNumberFormat(mpDoc->GetFormatTable(), pCondSet)); + if (bDoCell && !bUseEditEngine) + { + if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) + { + ScCellInfo& rCellInfo = pThisRowInfo->cellInfo(nCellX); + pPattern = rCellInfo.pPatternAttr; + pCondSet = rCellInfo.pConditionSet; - if (nScript == SvtScriptType::NONE) - nScript = ScGlobal::GetDefaultScriptType(); + if ( !pPattern ) + { + // #i68085# pattern from cell info for hidden columns is null, + // test for null is quicker than using column flags + pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab ); + pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab ); + } + } + else // get from document + { + pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab ); + pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab ); + } + if ( mpDoc->GetPreviewFont() || mpDoc->GetPreviewCellStyle() ) + { + aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern)); + ScPatternAttr* pAltPattern = aAltPatterns.back().get(); + if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, nTab ) ) + { + pAltPattern->SetStyleSheet(pPreviewStyle); + } + else if ( SfxItemSet* pFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, nTab ) ) + { + if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_FONT ) ) + pAltPattern->GetItemSet().Put( *pItem ); + if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CJK_FONT ) ) + pAltPattern->GetItemSet().Put( *pItem ); + if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CTL_FONT ) ) + pAltPattern->GetItemSet().Put( *pItem ); + } + pPattern = pAltPattern; + } - if ( !ScPatternAttr::areSame(pPattern, pOldPattern) || pCondSet != pOldCondSet || - nScript != nOldScript || mbSyntaxMode ) - { - if ( StringDiffer(pOldPattern,pPattern) || - pCondSet != pOldCondSet || nScript != nOldScript || mbSyntaxMode ) - { - aVars.SetPattern(pPattern, pCondSet, aCell, nScript); - } - else - aVars.SetPatternSimple( pPattern, pCondSet ); - pOldPattern = pPattern; - pOldCondSet = pCondSet; - nOldScript = nScript; - } + if (aCell.hasNumeric() && + pPattern->GetItem(ATTR_LINEBREAK, pCondSet).GetValue()) + { + // Disable line break when the cell content is numeric. + aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern)); + ScPatternAttr* pAltPattern = aAltPatterns.back().get(); + ScLineBreakCell aLineBreak(false); + pAltPattern->GetItemSet().Put(aLineBreak); + pPattern = pAltPattern; + } - // use edit engine for rotated, stacked or mixed-script text - if ( aVars.GetOrient() == SvxCellOrientation::Stacked || - aVars.IsRotated() || IsAmbiguousScript(nScript) ) - bUseEditEngine = true; - } - if (bDoCell && !bUseEditEngine) - { - bool bFormulaCell = (aCell.getType() == CELLTYPE_FORMULA); - if ( bFormulaCell ) - lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.getFormula()); - if ( aVars.SetText(aCell) ) - pOldPattern = nullptr; - bUseEditEngine = aVars.HasEditCharacters() || (bFormulaCell && aCell.getFormula()->IsMultilineResult()); - } - tools::Long nTotalMargin = 0; - SvxCellHorJustify eOutHorJust = SvxCellHorJustify::Standard; - if (bDoCell && !bUseEditEngine) - { - CellType eCellType = aCell.getType(); - bCellIsValue = ( eCellType == CELLTYPE_VALUE ); - if ( eCellType == CELLTYPE_FORMULA ) - { - ScFormulaCell* pFCell = aCell.getFormula(); - bCellIsValue = pFCell->IsRunning() || pFCell->IsValue(); - } + SvtScriptType nScript = mpDoc->GetCellScriptType( + ScAddress(nCellX, nCellY, nTab), + pPattern->GetNumberFormat(mpDoc->GetFormatTable(), pCondSet)); - const bool bNumberFormatIsText = lcl_isNumberFormatText( mpDoc, nCellX, nCellY, nTab ); - eOutHorJust = getAlignmentFromContext( aVars.GetHorJust(), bCellIsValue, aVars.GetString(), - *pPattern, pCondSet, mpDoc, nTab, bNumberFormatIsText ); + if (nScript == SvtScriptType::NONE) + nScript = ScGlobal::GetDefaultScriptType(); - bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SvxCellHorJustify::Block ); - // #i111387# #o11817313# tdf#121040 disable automatic line breaks for all number formats - // Must be synchronized with ScColumn::GetNeededSize() - SvNumberFormatter* pFormatter = mpDoc->GetFormatTable(); - if (bBreak && bCellIsValue && (pFormatter->GetType(aVars.GetResultValueFormat()) == SvNumFormatType::NUMBER)) - bBreak = false; + if ( !ScPatternAttr::areSame(pPattern, pOldPattern) || pCondSet != pOldCondSet || + nScript != nOldScript || mbSyntaxMode ) + { + if ( StringDiffer(pOldPattern,pPattern) || + pCondSet != pOldCondSet || nScript != nOldScript || mbSyntaxMode ) + { + aVars.SetPattern(pPattern, pCondSet, aCell, nScript); + } + else + aVars.SetPatternSimple( pPattern, pCondSet ); + pOldPattern = pPattern; + pOldCondSet = pCondSet; + nOldScript = nScript; + } - bool bRepeat = aVars.IsRepeat() && !bBreak; - bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat; + // use edit engine for rotated, stacked or mixed-script text + if ( aVars.GetOrient() == SvxCellOrientation::Stacked || + aVars.IsRotated() || IsAmbiguousScript(nScript) ) + bUseEditEngine = true; + } + if (bDoCell && !bUseEditEngine) + { + bool bFormulaCell = (aCell.getType() == CELLTYPE_FORMULA); + if ( bFormulaCell ) + lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.getFormula()); + if ( aVars.SetText(aCell) ) + pOldPattern = nullptr; + bUseEditEngine = aVars.HasEditCharacters() || (bFormulaCell && aCell.getFormula()->IsMultilineResult()); + } + tools::Long nTotalMargin = 0; + SvxCellHorJustify eOutHorJust = SvxCellHorJustify::Standard; + if (bDoCell && !bUseEditEngine) + { + CellType eCellType = aCell.getType(); + bCellIsValue = ( eCellType == CELLTYPE_VALUE ); + if ( eCellType == CELLTYPE_FORMULA ) + { + ScFormulaCell* pFCell = aCell.getFormula(); + bCellIsValue = pFCell->IsRunning() || pFCell->IsValue(); + } - nTotalMargin = - static_cast<tools::Long>(aVars.GetLeftTotal() * mnPPTX) + - static_cast<tools::Long>(aVars.GetMargin()->GetRightMargin() * mnPPTX); + const bool bNumberFormatIsText = lcl_isNumberFormatText( mpDoc, nCellX, nCellY, nTab ); + eOutHorJust = getAlignmentFromContext( aVars.GetHorJust(), bCellIsValue, aVars.GetString(), + *pPattern, pCondSet, mpDoc, nTab, bNumberFormatIsText ); - nNeededWidth = aVars.GetTextSize().Width() + nTotalMargin; + bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SvxCellHorJustify::Block ); + // #i111387# #o11817313# tdf#121040 disable automatic line breaks for all number formats + // Must be synchronized with ScColumn::GetNeededSize() + SvNumberFormatter* pFormatter = mpDoc->GetFormatTable(); + if (bBreak && bCellIsValue && (pFormatter->GetType(aVars.GetResultValueFormat()) == SvNumFormatType::NUMBER)) + bBreak = false; - // GetOutputArea gives justified rectangles - GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth, - *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust), - bCellIsValue || bRepeat || bShrink, bBreak, false, - aAreaParam ); + bool bRepeat = aVars.IsRepeat() && !bBreak; + bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat; - aVars.RepeatToFill( aAreaParam.mnColWidth - nTotalMargin ); - if ( bShrink ) - { - if ( aVars.GetOrient() != SvxCellOrientation::Standard ) - { - // Only horizontal scaling is handled here. - // DrawEdit is used to vertically scale 90 deg rotated text. - bUseEditEngine = true; - } - else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal - { - tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin; - tools::Long nScaleSize = aVars.GetTextSize().Width(); // without margin + nTotalMargin = + static_cast<tools::Long>(aVars.GetLeftTotal() * mnPPTX) + + static_cast<tools::Long>(aVars.GetMargin()->GetRightMargin() * mnPPTX); - if ( nAvailable > 0 && nScaleSize > 0 ) // 0 if the text is empty (formulas, number formats) - { - tools::Long nScale = ( nAvailable * 100 ) / nScaleSize; + nNeededWidth = aVars.GetTextSize().Width() + nTotalMargin; - aVars.SetShrinkScale( nScale, nOldScript ); - tools::Long nNewSize = aVars.GetTextSize().Width(); + // GetOutputArea gives justified rectangles + GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth, + *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust), + bCellIsValue || bRepeat || bShrink, bBreak, false, + aAreaParam ); - sal_uInt16 nShrinkAgain = 0; - while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX ) - { - // If the text is still too large, reduce the scale again by 10%, until it fits, - // at most 7 times (it's less than 50% of the calculated scale then). + aVars.RepeatToFill( aAreaParam.mnColWidth - nTotalMargin ); + if ( bShrink ) + { + if ( aVars.GetOrient() != SvxCellOrientation::Standard ) + { + // Only horizontal scaling is handled here. + // DrawEdit is used to vertically scale 90 deg rotated text. + bUseEditEngine = true; + } + else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal + { + tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin; + tools::Long nScaleSize = aVars.GetTextSize().Width(); // without margin - nScale = ( nScale * 9 ) / 10; - aVars.SetShrinkScale( nScale, nOldScript ); - nNewSize = aVars.GetTextSize().Width(); - ++nShrinkAgain; - } - // If even at half the size the font still isn't rendered smaller, - // fall back to normal clipping (showing ### for numbers). - if ( nNewSize <= nAvailable ) - { - // Reset relevant parameters. - aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false; - aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0; - } + if ( nAvailable > 0 && nScaleSize > 0 ) // 0 if the text is empty (formulas, number formats) + { + tools::Long nScale = ( nAvailable * 100 ) / nScaleSize; - pOldPattern = nullptr; - } - } - } + aVars.SetShrinkScale( nScale, nOldScript ); + tools::Long nNewSize = aVars.GetTextSize().Width(); - if ( bRepeat && !aAreaParam.mbLeftClip && !aAreaParam.mbRightClip ) + sal_uInt16 nShrinkAgain = 0; + while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX ) { - tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin; - tools::Long nRepeatSize = aVars.GetTextSize().Width(); // without margin - // When formatting for the printer, the text sizes don't always add up. - // Round down (too few repetitions) rather than exceeding the cell size then: - if ( pFmtDevice != mpRefDevice ) - ++nRepeatSize; - if ( nRepeatSize > 0 ) - { - tools::Long nRepeatCount = nAvailable / nRepeatSize; - if ( nRepeatCount > 1 ) - { - OUString aCellStr = aVars.GetString(); - OUStringBuffer aRepeated(aCellStr); - for ( tools::Long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ ) - aRepeated.append(aCellStr); - aVars.SetAutoText( aRepeated.makeStringAndClear() ); - } - } - } + // If the text is still too large, reduce the scale again by 10%, until it fits, + // at most 7 times (it's less than 50% of the calculated scale then). - // use edit engine if automatic line breaks are needed - if ( bBreak ) - { - if ( aVars.GetOrient() == SvxCellOrientation::Standard ) - bUseEditEngine = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ); - else - { - tools::Long nHeight = aVars.GetTextSize().Height() + - static_cast<tools::Long>(aVars.GetMargin()->GetTopMargin()*mnPPTY) + - static_cast<tools::Long>(aVars.GetMargin()->GetBottomMargin()*mnPPTY); - bUseEditEngine = ( nHeight > aAreaParam.maClipRect.GetHeight() ); - } + nScale = ( nScale * 9 ) / 10; + aVars.SetShrinkScale( nScale, nOldScript ); + nNewSize = aVars.GetTextSize().Width(); + ++nShrinkAgain; } - if (!bUseEditEngine) + // If even at half the size the font still isn't rendered smaller, + // fall back to normal clipping (showing ### for numbers). + if ( nNewSize <= nAvailable ) { - bUseEditEngine = - aVars.GetHorJust() == SvxCellHorJustify::Block && - aVars.GetHorJustMethod() == SvxCellJustifyMethod::Distribute; + // Reset relevant parameters. + aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false; + aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0; } - } - if (bUseEditEngine) - { - // mark the cell in ScCellInfo to be drawn in DrawEdit: - // Cells to the left are marked directly, cells to the - // right are handled by the flag for nX2 - SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2; - pThisRowInfo->basicCellInfo(nMarkX).bEditEngine = true; - bDoCell = false; // don't draw here - - // Mark the tagged "TD" structure element to be drawn in DrawEdit - if (bTaggedPDF) - { - if (bReopenRowTag) - ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow, nY); - else - { - sal_Int32 nId = pPDF->EnsureStructureElement(nullptr); - pPDF->InitStructureElement(nId, vcl::pdf::StructElement::TableRow, - u"TR"_ustr); - pPDF->BeginStructureElement(nId); - pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId); - bReopenRowTag = true; - } - - pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData, - u"TD"_ustr); - sal_Int32 nId = pPDF->GetCurrentStructureElement(); - pPDF->GetScPDFState()->m_TableDataMap[{ nY, nX }] = nId; - - pPDF->EndStructureElement(); // TableData - pPDF->EndStructureElement(); // TableRow - } + pOldPattern = nullptr; } - if ( bDoCell ) + } + } + + if ( bRepeat && !aAreaParam.mbLeftClip && !aAreaParam.mbRightClip ) + { + tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin; + tools::Long nRepeatSize = aVars.GetTextSize().Width(); // without margin + // When formatting for the printer, the text sizes don't always add up. + // Round down (too few repetitions) rather than exceeding the cell size then: + if ( pFmtDevice != mpRefDevice ) + ++nRepeatSize; + if ( nRepeatSize > 0 ) + { + tools::Long nRepeatCount = nAvailable / nRepeatSize; + if ( nRepeatCount > 1 ) { - if ( bCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) ) - { - bool bHasHashText = false; - if (mbShowFormulas) - { - aVars.SetHashText(); - bHasHashText = true; - } - else - // Adjust the decimals to fit the available column width. - bHasHashText = aVars.SetTextToWidthOrHash( aCell, aAreaParam.mnColWidth - nTotalMargin ); + OUString aCellStr = aVars.GetString(); + OUStringBuffer aRepeated(aCellStr); + for ( tools::Long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ ) + aRepeated.append(aCellStr); + aVars.SetAutoText( aRepeated.makeStringAndClear() ); + } + } + } - if ( bHasHashText ) - { - tools::Long nMarkPixel = SC_CLIPMARK_SIZE * mnPPTX; + // use edit engine if automatic line breaks are needed + if ( bBreak ) + { + if ( aVars.GetOrient() == SvxCellOrientation::Standard ) + bUseEditEngine = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ); + else + { + tools::Long nHeight = aVars.GetTextSize().Height() + + static_cast<tools::Long>(aVars.GetMargin()->GetTopMargin()*mnPPTY) + + static_cast<tools::Long>(aVars.GetMargin()->GetBottomMargin()*mnPPTY); + bUseEditEngine = ( nHeight > aAreaParam.maClipRect.GetHeight() ); + } + } + if (!bUseEditEngine) + { + bUseEditEngine = + aVars.GetHorJust() == SvxCellHorJustify::Block && + aVars.GetHorJustMethod() == SvxCellJustifyMethod::Distribute; + } + } + if (bUseEditEngine) + { + // mark the cell in ScCellInfo to be drawn in DrawEdit: + // Cells to the left are marked directly, cells to the + // right are handled by the flag for nX2 + SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2; + pThisRowInfo->basicCellInfo(nMarkX).bEditEngine = true; + bDoCell = false; // don't draw here - if ( eOutHorJust == SvxCellHorJustify::Left ) - { - if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) - pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right; - bAnyClipped = true; - aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) ); - } - else if ( eOutHorJust == SvxCellHorJustify::Right ) - { - if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) - pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left; - bAnyClipped = true; - aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign); - } - else - { - if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) - { - pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right; - pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left; - } - bAnyClipped = true; - aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) ); - aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign); - } - } + // Mark the tagged "TD" structure element to be drawn in DrawEdit + if (bTaggedPDF) + { + if (bReopenRowTag) + ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow, nY); + else + { + sal_Int32 nId = pPDF->EnsureStructureElement(nullptr); + pPDF->InitStructureElement(nId, vcl::pdf::StructElement::TableRow, + u"TR"_ustr); + pPDF->BeginStructureElement(nId); + pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId); + bReopenRowTag = true; + } - nNeededWidth = aVars.GetTextSize().Width() + - static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) + - static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX ); - if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() ) - { - // Cell value is no longer clipped. Reset relevant parameters. - aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false; - aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0; - } - } + pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData, + u"TD"_ustr); - tools::Long nJustPosX = aAreaParam.maAlignRect.Left(); // "justified" - effect of alignment will be added - tools::Long nJustPosY = aAreaParam.maAlignRect.Top(); - tools::Long nAvailWidth = aAreaParam.maAlignRect.GetWidth(); - tools::Long nOutHeight = aAreaParam.maAlignRect.GetHeight(); + sal_Int32 nId = pPDF->GetCurrentStructureElement(); + pPDF->GetScPDFState()->m_TableDataMap[{ nY, nX }] = nId; - bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW ); - // Take adjusted values of aAreaParam.mbLeftClip and aAreaParam.mbRightClip - bool bVClip = AdjustAreaParamClipRect(aAreaParam); - bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip; + pPDF->EndStructureElement(); // TableData + pPDF->EndStructureElement(); // TableRow + } + } + if ( bDoCell ) + { + if ( bCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) ) + { + bool bHasHashText = false; + if (mbShowFormulas) + { + aVars.SetHashText(); + bHasHashText = true; + } + else + // Adjust the decimals to fit the available column width. + bHasHashText = aVars.SetTextToWidthOrHash( aCell, aAreaParam.mnColWidth - nTotalMargin ); - // check horizontal space + if ( bHasHashText ) + { + tools::Long nMarkPixel = SC_CLIPMARK_SIZE * mnPPTX; - if ( !bOutside ) + if ( eOutHorJust == SvxCellHorJustify::Left ) + { + if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) + pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right; + bAnyClipped = true; + aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) ); + } + else if ( eOutHorJust == SvxCellHorJustify::Right ) + { + if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) + pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left; + bAnyClipped = true; + aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign); + } + else + { + if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 ) { - bool bRightAdjusted = false; // to correct text width calculation later - switch (eOutHorJust) - { - case SvxCellHorJustify::Left: - nJustPosX += static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ); - break; - case SvxCellHorJustify::Right: - nJustPosX += nAvailWidth - aVars.GetTextSize().Width() - - static_cast<tools::Long>( aVars.GetRightTotal() * mnPPTX ); - bRightAdjusted = true; - break; - case SvxCellHorJustify::Center: - nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() + - static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) - - static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX ) ) / 2; - break; - default: - { - // added to avoid warnings - } - } + pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right; + pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left; + } + bAnyClipped = true; + aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) ); + aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign); + } + } - tools::Long nTestClipHeight = aVars.GetTextSize().Height(); - switch (aVars.GetVerJust()) - { - case SvxCellVerJustify::Top: - case SvxCellVerJustify::Block: - { - tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY ); - nJustPosY += nTop; - nTestClipHeight += nTop; - } - break; - case SvxCellVerJustify::Bottom: - { - tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY ); - nJustPosY += nOutHeight - aVars.GetTextSize().Height() - nBot; - nTestClipHeight += nBot; - } - break; - case SvxCellVerJustify::Center: - { - tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY ); - tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY ); - nJustPosY += ( nOutHeight + nTop - - aVars.GetTextSize().Height() - nBot ) / 2; - nTestClipHeight += std::abs( nTop - nBot ); - } - break; - default: - { - // added to avoid warnings - } - } + nNeededWidth = aVars.GetTextSize().Width() + + static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) + + static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX ); + if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() ) + { + // Cell value is no longer clipped. Reset relevant parameters. + aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false; + aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0; + } + } - if ( nTestClipHeight > nOutHeight ) - { - // no vertical clipping when printing cells with optimal height, - // except when font size is from conditional formatting. - if ( eType != OUTTYPE_PRINTER || - ( mpDoc->GetRowFlags( nCellY, nTab ) & CRFlags::ManualSize ) || - ( aVars.HasCondHeight() ) ) - bVClip = true; - } + tools::Long nJustPosX = aAreaParam.maAlignRect.Left(); // "justified" - effect of alignment will be added + tools::Long nJustPosY = aAreaParam.maAlignRect.Top(); + tools::Long nAvailWidth = aAreaParam.maAlignRect.GetWidth(); + tools::Long nOutHeight = aAreaParam.maAlignRect.GetHeight(); - if ( bHClip || bVClip ) - { - // only clip the affected dimension so that not all right-aligned - // columns are cut off when performing a non-proportional resize - if (!bHClip) - { - aAreaParam.maClipRect.SetLeft( nScrX ); - aAreaParam.maClipRect.SetRight( nScrX+nScrW ); - } - if (!bVClip) - { - aAreaParam.maClipRect.SetTop( nScrY ); - aAreaParam.maClipRect.SetBottom( nScrY+nScrH ); - } + bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW ); + // Take adjusted values of aAreaParam.mbLeftClip and aAreaParam.mbRightClip + bool bVClip = AdjustAreaParamClipRect(aAreaParam); + bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip; - // aClipRect is not used after SetClipRegion/IntersectClipRegion, - // so it can be modified here - if (bPixelToLogic) - aAreaParam.maClipRect = mpRefDevice->PixelToLogic( aAreaParam.maClipRect ); + // check horizontal space - if (bMetaFile) - { - mpDev->Push(); - mpDev->IntersectClipRegion( aAreaParam.maClipRect ); - } - else - mpDev->SetClipRegion( vcl::Region( aAreaParam.maClipRect ) ); - } + if ( !bOutside ) + { + bool bRightAdjusted = false; // to correct text width calculation later + switch (eOutHorJust) + { + case SvxCellHorJustify::Left: + nJustPosX += static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ); + break; + case SvxCellHorJustify::Right: + nJustPosX += nAvailWidth - aVars.GetTextSize().Width() - + static_cast<tools::Long>( aVars.GetRightTotal() * mnPPTX ); + bRightAdjusted = true; + break; + case SvxCellHorJustify::Center: + nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() + + static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) - + static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX ) ) / 2; + break; + default: + { + // added to avoid warnings + } + } - Point aURLStart( nJustPosX, nJustPosY ); // copy before modifying for orientation + tools::Long nTestClipHeight = aVars.GetTextSize().Height(); + switch (aVars.GetVerJust()) + { + case SvxCellVerJustify::Top: + case SvxCellVerJustify::Block: + { + tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY ); + nJustPosY += nTop; + nTestClipHeight += nTop; + } + break; + case SvxCellVerJustify::Bottom: + { + tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY ); + nJustPosY += nOutHeight - aVars.GetTextSize().Height() - nBot; + nTestClipHeight += nBot; + } + break; + case SvxCellVerJustify::Center: + { + tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY ); + tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY ); + nJustPosY += ( nOutHeight + nTop - + aVars.GetTextSize().Height() - nBot ) / 2; + nTestClipHeight += std::abs( nTop - nBot ); + } + break; + default: + { + // added to avoid warnings + } + } - switch (aVars.GetOrient()) - { - case SvxCellOrientation::Standard: - nJustPosY += aVars.GetAscent(); - break; - case SvxCellOrientation::TopBottom: - nJustPosX += aVars.GetTextSize().Width() - aVars.GetAscent(); - break; - case SvxCellOrientation::BottomUp: - nJustPosY += aVars.GetTextSize().Height(); - nJustPosX += aVars.GetAscent(); - break; - default: - { - // added to avoid warnings - } - } + if ( nTestClipHeight > nOutHeight ) + { + // no vertical clipping when printing cells with optimal height, + // except when font size is from conditional formatting. + if ( eType != OUTTYPE_PRINTER || + ( mpDoc->GetRowFlags( nCellY, nTab ) & CRFlags::ManualSize ) || + ( aVars.HasCondHeight() ) ) + bVClip = true; + } - // When clipping, the visible part is now completely defined by the alignment, - // there's no more special handling to show the right part of RTL text. + if ( bHClip || bVClip ) + { + // only clip the affected dimension so that not all right-aligned + // columns are cut off when performing a non-proportional resize + if (!bHClip) + { + aAreaParam.maClipRect.SetLeft( nScrX ); + aAreaParam.maClipRect.SetRight( nScrX+nScrW ); + } + if (!bVClip) + { + aAreaParam.maClipRect.SetTop( nScrY ); + aAreaParam.maClipRect.SetBottom( nScrY+nScrH ); + } - Point aDrawTextPos( nJustPosX, nJustPosY ); - if ( bPixelToLogic ) - { - // undo text width adjustment in pixels - if (bRightAdjusted) - aDrawTextPos.AdjustX(aVars.GetTextSize().Width() ); + // aClipRect is not used after SetClipRegion/IntersectClipRegion, + // so it can be modified here + if (bPixelToLogic) + aAreaParam.maClipRect = mpRefDevice->PixelToLogic( aAreaParam.maClipRect ); - aDrawTextPos = mpRefDevice->PixelToLogic( aDrawTextPos ); + if (bMetaFile) + { + mpDev->Push(); + mpDev->IntersectClipRegion( aAreaParam.maClipRect ); + } + else + mpDev->SetClipRegion( vcl::Region( aAreaParam.maClipRect ) ); + } - // redo text width adjustment in logic units - if (bRightAdjusted) - aDrawTextPos.AdjustX( -(aVars.GetOriginalWidth()) ); - } + Point aURLStart( nJustPosX, nJustPosY ); // copy before modifying for orientation - // in Metafiles always use DrawTextArray to ensure that positions are - // recorded (for non-proportional resize): + switch (aVars.GetOrient()) + { + case SvxCellOrientation::Standard: + nJustPosY += aVars.GetAscent(); + break; + case SvxCellOrientation::TopBottom: + nJustPosX += aVars.GetTextSize().Width() - aVars.GetAscent(); + break; + case SvxCellOrientation::BottomUp: + nJustPosY += aVars.GetTextSize().Height(); + nJustPosX += aVars.GetAscent(); + break; + default: + { + // added to avoid warnings + } + } - const OUString& aString = aVars.GetString(); - if (!aString.isEmpty()) - { - if (bTaggedPDF) - { - if (bReopenRowTag) - ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow, - nY); - else - { - sal_Int32 nId = pPDF->EnsureStructureElement(nullptr); - pPDF->InitStructureElement( - nId, vcl::pdf::StructElement::TableRow, u"TR"_ustr); - pPDF->BeginStructureElement(nId); - pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId); - bReopenRowTag = true; - } + // When clipping, the visible part is now completely defined by the alignment, + // there's no more special handling to show the right part of RTL text. - pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData, - u"TD"_ustr); - pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::Paragraph, - u"P"_ustr); - } + Point aDrawTextPos( nJustPosX, nJustPosY ); + if ( bPixelToLogic ) + { + // undo text width adjustment in pixels + if (bRightAdjusted) + aDrawTextPos.AdjustX(aVars.GetTextSize().Width() ); - // If the string is clipped, make it shorter for - // better performance since drawing by HarfBuzz is - // quite expensive especially for long string. + aDrawTextPos = mpRefDevice->PixelToLogic( aDrawTextPos ); - OUString aShort = aString; + // redo text width adjustment in logic units + if (bRightAdjusted) + aDrawTextPos.AdjustX( -(aVars.GetOriginalWidth()) ); + } - // But never fiddle with numeric values. - // (Which was the cause of tdf#86024). - // The General automatic format output takes - // care of this, or fixed width numbers either fit - // or display as ###. - if (!bCellIsValue) - { - double fVisibleRatio = 1.0; - double fTextWidth = aVars.GetTextSize().Width(); - sal_Int32 nTextLen = aString.getLength(); - if (eOutHorJust == SvxCellHorJustify::Left && aAreaParam.mnRightClipLength > 0) - { - fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth; - if (0.0 < fVisibleRatio && fVisibleRatio < 1.0) - { - // Only show the left-end segment. - sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1; - aShort = aShort.copy(0, nShortLen); - } - } - else if (eOutHorJust == SvxCellHorJustify::Right && aAreaParam.mnLeftClipLength > 0) - { - fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth; - if (0.0 < fVisibleRatio && fVisibleRatio < 1.0) - { - // Only show the right-end segment. - sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1; - aShort = aShort.copy(nTextLen-nShortLen); - - // Adjust the text position after shortening of the string. - double fShortWidth = aVars.GetFmtTextWidth(aShort); - double fOffset = fTextWidth - fShortWidth; - aDrawTextPos.Move(fOffset, 0); - } - } - } + // in Metafiles always use DrawTextArray to ensure that positions are + // recorded (for non-proportional resize): - if (bMetaFile || pFmtDevice != mpDev || aZoomX != aZoomY) - { - size_t nLen = aShort.getLength(); - if (aDX.size() < nLen) - aDX.resize(nLen, 0); + const OUString& aString = aVars.GetString(); + if (!aString.isEmpty()) + { + if (bTaggedPDF) + { + if (bReopenRowTag) + ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow, + nY); + else + { + sal_Int32 nId = pPDF->EnsureStructureElement(nullptr); + pPDF->InitStructureElement( + nId, vcl::pdf::StructElement::TableRow, u"TR"_ustr); + pPDF->BeginStructureElement(nId); + pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId); + bReopenRowTag = true; + } - pFmtDevice->GetTextArray(aShort, &aDX); + pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData, + u"TD"_ustr); + pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::Paragraph, + u"P"_ustr); + } - if ( !mpRefDevice->GetConnectMetaFile() || - mpRefDevice->GetOutDevType() == OUTDEV_PRINTER ) - { - double fMul = GetStretch(); - for (size_t i = 0; i < nLen; ++i) - aDX[i] /= fMul; - } + // If the string is clipped, make it shorter for + // better performance since drawing by HarfBuzz is + // quite expensive especially for long string. - mpDev->DrawTextArray(aDrawTextPos, aShort, aDX, {}, 0, nLen); - } - else - { - mpDev->DrawText(aDrawTextPos, aShort, 0, -1, nullptr, nullptr, - aVars.GetLayoutGlyphs(aShort)); - } - if (bTaggedPDF) - { - pPDF->EndStructureElement(); // Paragraph - pPDF->EndStructureElement(); // TableData - pPDF->EndStructureElement(); // TableRow - } - } + OUString aShort = aString; - if ( bHClip || bVClip ) + // But never fiddle with numeric values. + // (Which was the cause of tdf#86024). + // The General automatic format output takes + // care of this, or fixed width numbers either fit + // or display as ###. + if (!bCellIsValue) + { + double fVisibleRatio = 1.0; + double fTextWidth = aVars.GetTextSize().Width(); + sal_Int32 nTextLen = aString.getLength(); + if (eOutHorJust == SvxCellHorJustify::Left && aAreaParam.mnRightClipLength > 0) + { + fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth; + if (0.0 < fVisibleRatio && fVisibleRatio < 1.0) { - if (bMetaFile) - mpDev->Pop(); - else - mpDev->SetClipRegion(); + // Only show the left-end segment. + sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1; + aShort = aShort.copy(0, nShortLen); } - - // PDF: whole-cell hyperlink from formula? - bool bHasURL = pPDF && aCell.getType() == CELLTYPE_FORMULA && aCell.getFormula()->IsHyperLinkCell(); - if (bHasURL) + } + else if (eOutHorJust == SvxCellHorJustify::Right && aAreaParam.mnLeftClipLength > 0) + { + fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth; + if (0.0 < fVisibleRatio && fVisibleRatio < 1.0) { - tools::Rectangle aURLRect( aURLStart, aVars.GetTextSize() ); - lcl_DoHyperlinkResult(mpDev, aURLRect, aCell); + // Only show the right-end segment. + sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1; + aShort = aShort.copy(nTextLen-nShortLen); + + // Adjust the text position after shortening of the string. + double fShortWidth = aVars.GetFmtTextWidth(aShort); + double fOffset = fTextWidth - fShortWidth; + aDrawTextPos.Move(fOffset, 0); } } } - nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign; + + if (bMetaFile || pFmtDevice != mpDev || aZoomX != aZoomY) + { + size_t nLen = aShort.getLength(); + if (aDX.size() < nLen) + aDX.resize(nLen, 0); + + pFmtDevice->GetTextArray(aShort, &aDX); + + if ( !mpRefDevice->GetConnectMetaFile() || + mpRefDevice->GetOutDevType() == OUTDEV_PRINTER ) + { + double fMul = GetStretch(); + for (size_t i = 0; i < nLen; ++i) + aDX[i] /= fMul; + } + + mpDev->DrawTextArray(aDrawTextPos, aShort, aDX, {}, 0, nLen); + } + else + { + mpDev->DrawText(aDrawTextPos, aShort, 0, -1, nullptr, nullptr, + aVars.GetLayoutGlyphs(aShort)); + } + if (bTaggedPDF) + { + pPDF->EndStructureElement(); // Paragraph + pPDF->EndStructureElement(); // TableData + pPDF->EndStructureElement(); // TableRow + } + } + + if ( bHClip || bVClip ) + { + if (bMetaFile) + mpDev->Pop(); + else + mpDev->SetClipRegion(); + } + + // PDF: whole-cell hyperlink from formula? + bool bHasURL = pPDF && aCell.getType() == CELLTYPE_FORMULA && aCell.getFormula()->IsHyperLinkCell(); + if (bHasURL) + { + tools::Rectangle aURLRect( aURLStart, aVars.GetTextSize() ); + lcl_DoHyperlinkResult(mpDev, aURLRect, aCell); } } - nPosY += pRowInfo[nArrY].nHeight; } - if (bTaggedPDF) - pPDF->EndStructureElement(); // Table - - if ( bProgress ) - ScProgress::DeleteInterpretProgress(); } void ScOutputData::SetRefDevice( OutputDevice* pRDev ) diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 6b87175c7987..edb894a29432 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -126,7 +126,7 @@ bool ScConversionEngineBase::FindNextConversionCell() if (!bSimpleString || eCellType == CELLTYPE_EDIT) { std::unique_ptr<EditTextObject> pEditObj(CreateTextObject()); - mrDoc.SetEditText(aPos, *pEditObj, GetEditTextObjectPool()); + mrDoc.SetEditText(aPos, *pEditObj, GetItemPool()); } else { diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 4509f7dc31a8..fb9622a45725 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2308,7 +2308,10 @@ drawinglayer::primitive2d::Primitive2DContainer ScTextEditOverlayObject::createO // use no transformations. The result will be in logic coordinates // based on aEditRectangle and the EditEngine setup, see // ScViewData::SetEditEngine - TextHierarchyBreakup aBreakup; + drawinglayer::geometry::ViewInformation2D aViewInformation2D; + // TextEditOverlay is only possible in EditView, activate it + aViewInformation2D.setEditViewActive(true); + TextHierarchyBreakup aBreakup(aViewInformation2D); pEditView->getEditEngine().StripPortions(aBreakup); aRetval = aBreakup.getTextPortionPrimitives(); diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 5a4fd2fc700a..c75bd174ac19 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -171,6 +171,77 @@ namespace } } +void ScTabViewShell::ExecGoToTab( SfxRequest& rReq, SfxBindings& rBindings ) +{ + SCTAB nTab; + ScViewData& rViewData = GetViewData(); + ScDocument& rDoc = rViewData.GetDocument(); + SCTAB nTabCount = rDoc.GetTableCount(); + const SfxItemSet* pReqArgs = rReq.GetArgs(); + sal_uInt16 nSlot = rReq.GetSlot(); + + if ( pReqArgs ) // command from Navigator with nTab + { + // sheet for basic is one-based + nTab = static_cast<const SfxUInt16Item&>(pReqArgs->Get(nSlot)).GetValue() - 1; + if ( nTab < nTabCount ) + { + SetTabNo( nTab ); + rBindings.Update( nSlot ); + + if( ! rReq.IsAPI() ) + rReq.Done(); + } + } + else // command from Menu: ask for nTab + { + auto xRequest = std::make_shared<SfxRequest>(rReq); + rReq.Ignore(); + + ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); + + VclPtr<AbstractScGoToTabDlg> pDlg(pFact->CreateScGoToTabDlg(GetFrameWeld())); + pDlg->SetDescription( + ScResId( STR_DLG_SELECTTABLE_TITLE ), + ScResId( STR_DLG_SELECTTABLE_MASK ), + ScResId( STR_DLG_SELECTTABLE_LBNAME ), + GetStaticInterface()->GetSlot(SID_CURRENTTAB)->GetCommand(), HID_GOTOTABLEMASK, HID_GOTOTABLE ); + + // fill all table names and select current tab + OUString aTabName; + for( nTab = 0; nTab < nTabCount; ++nTab ) + { + if( rDoc.IsVisible( nTab ) ) + { + rDoc.GetName( nTab, aTabName ); + pDlg->Insert( aTabName, rViewData.GetTabNo() == nTab ); + } + } + + pDlg->StartExecuteAsync([this, nTab, nTabCount, pDlg, + xRequest=std::move(xRequest)](sal_Int32 response) { + if( response == RET_OK ) + { + auto nTab2 = nTab; + if( !GetViewData().GetDocument().GetTable( pDlg->GetSelectedEntry(), nTab2 ) ) + nTab2 = nTabCount; + if ( nTab2 < nTabCount ) + { + SetTabNo( nTab2 ); + + if ( !xRequest->IsAPI() ) + xRequest->Done(); + } + } + else + { + xRequest->Ignore(); + } + pDlg->disposeOnce(); + }); + } +} + void ScTabViewShell::FinishProtectTable() { TabChanged(); @@ -638,56 +709,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_CURRENTTAB: { - SCTAB nTab; - ScViewData& rViewData = GetViewData(); - ScDocument& rDoc = rViewData.GetDocument(); - SCTAB nTabCount = rDoc.GetTableCount(); - if ( pReqArgs ) // command from Navigator with nTab - { - // sheet for basic is one-based - nTab = static_cast<const SfxUInt16Item&>(pReqArgs->Get(nSlot)).GetValue() - 1; - } - else // command from Menu: ask for nTab - { - ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - - ScopedVclPtr<AbstractScGoToTabDlg> pDlg(pFact->CreateScGoToTabDlg(GetFrameWeld())); - pDlg->SetDescription( - ScResId( STR_DLG_SELECTTABLE_TITLE ), - ScResId( STR_DLG_SELECTTABLE_MASK ), - ScResId( STR_DLG_SELECTTABLE_LBNAME ), - GetStaticInterface()->GetSlot(SID_CURRENTTAB)->GetCommand(), HID_GOTOTABLEMASK, HID_GOTOTABLE ); - - // fill all table names and select current tab - OUString aTabName; - for( nTab = 0; nTab < nTabCount; ++nTab ) - { - if( rDoc.IsVisible( nTab ) ) - { - rDoc.GetName( nTab, aTabName ); - pDlg->Insert( aTabName, rViewData.GetTabNo() == nTab ); - } - } - - if( pDlg->Execute() == RET_OK ) - { - if( !rDoc.GetTable( pDlg->GetSelectedEntry(), nTab ) ) - nTab = nTabCount; - pDlg.disposeAndClear(); - } - else - { - rReq.Ignore(); - } - } - if ( nTab < nTabCount ) - { - SetTabNo( nTab ); - rBindings.Update( nSlot ); - - if( ! rReq.IsAPI() ) - rReq.Done(); - } + ExecGoToTab( rReq, rBindings ); //! otherwise an error ? } break; diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 36b62e31d599..3e2f1b2d3489 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -940,7 +940,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat else if ( pData ) { // A copy of pData will be stored. - pInsDoc->SetEditText(aPos, *pData, rDoc.GetEditTextObjectPool()); + pInsDoc->SetEditText(aPos, *pData, rDoc.GetEditEnginePool()); } else pInsDoc->SetString( nCol, nRow, nTab, aNewStr ); diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index a917f534dfd2..4a64af774613 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -358,7 +358,6 @@ void ScViewFunc::DoThesaurus() uno::Reference<linguistic2::XSpellChecker1> xSpeller = LinguMgr::GetSpellChecker(); pThesaurusEngine.reset(new ScEditEngineDefaulter(rDoc.GetEditEnginePool())); - pThesaurusEngine->SetEditTextObjectPool( rDoc.GetEditTextObjectPool() ); pThesaurusEngine->SetRefDevice(GetViewData().GetActiveWin()->GetOutDev()); pThesaurusEngine->SetSpeller(xSpeller); MakeEditView(*pThesaurusEngine, nCol, nRow); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 8c0b2c58e188..89d80ac4b7b1 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -899,7 +899,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, for (const auto& rTab : rMark) { ScAddress aPos(nCol, nRow, rTab); - rDoc.SetEditText(aPos, rData, rDoc.GetEditTextObjectPool()); + rDoc.SetEditText(aPos, rData, rDoc.GetEditEnginePool()); } if ( bRecord ) diff --git a/sc/uiconfig/scalc/popupmenu/celledit.xml b/sc/uiconfig/scalc/popupmenu/celledit.xml index 12bac415d953..36aad7336769 100644 --- a/sc/uiconfig/scalc/popupmenu/celledit.xml +++ b/sc/uiconfig/scalc/popupmenu/celledit.xml @@ -24,6 +24,7 @@ </menu:menupopup> </menu:menu> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sc/uiconfig/scalc/popupmenu/draw.xml b/sc/uiconfig/scalc/popupmenu/draw.xml index 41167edf00fd..5e56bfe3713a 100644 --- a/sc/uiconfig/scalc/popupmenu/draw.xml +++ b/sc/uiconfig/scalc/popupmenu/draw.xml @@ -58,6 +58,7 @@ <menu:menuitem menu:id=".uno:RenameObject"/> <menu:menuitem menu:id=".uno:ObjectTitleDescription"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sc/uiconfig/scalc/popupmenu/drawtext.xml b/sc/uiconfig/scalc/popupmenu/drawtext.xml index d8cdc15e603e..7034a07e4f52 100644 --- a/sc/uiconfig/scalc/popupmenu/drawtext.xml +++ b/sc/uiconfig/scalc/popupmenu/drawtext.xml @@ -23,6 +23,7 @@ <menu:menuitem menu:id=".uno:FontDialog"/> <menu:menuitem menu:id=".uno:ParagraphDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sc/uiconfig/scalc/popupmenu/graphic.xml b/sc/uiconfig/scalc/popupmenu/graphic.xml index 10f813f1e702..9d5abcc348b3 100644 --- a/sc/uiconfig/scalc/popupmenu/graphic.xml +++ b/sc/uiconfig/scalc/popupmenu/graphic.xml @@ -67,6 +67,7 @@ <menu:menuitem menu:id=".uno:RenameObject"/> <menu:menuitem menu:id=".uno:ObjectTitleDescription"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sc/uiconfig/scalc/popupmenu/media.xml b/sc/uiconfig/scalc/popupmenu/media.xml index d5453747eb68..3a1864c340fb 100644 --- a/sc/uiconfig/scalc/popupmenu/media.xml +++ b/sc/uiconfig/scalc/popupmenu/media.xml @@ -42,6 +42,7 @@ <menu:menuitem menu:id=".uno:RenameObject"/> <menu:menuitem menu:id=".uno:ObjectTitleDescription"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 2aee9b626abc..7af2d314744c 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -1598,6 +1598,11 @@ interface DrawView ExecMethod = FuTemporary ; StateMethod = GetAttrState ; ] + SID_INSERT_HYPERLINK // ole : no, status : ? + [ + ExecMethod = FuTemporary ; + StateMethod = GetAttrState ; + ] SID_RULER_PAGE_POS // ole : no, status : ? [ ExecMethod = ExecRuler ; diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 86ac8c19f4de..8500c0a71ef3 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2430,7 +2430,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO SfxItemPool* pPool(static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()).GetDrawOutliner().GetEmptyItemSet().GetPool()); pOutl = new ::Outliner( pPool, OutlinerMode::OutlineObject ); pOutl->SetRefDevice(SdModule::get()->GetVirtualRefDevice()); - pOutl->SetEditTextObjectPool(pPool); + pOutl->SetEditEnginePool(pPool); pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(getSdrModelFromSdrPage().GetStyleSheetPool())); pOutl->EnableUndo(false); pOutl->SetUpdateLayout( false ); diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index ffefc3e884d3..d68097546da5 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -185,7 +185,6 @@ SdOutliner::SdOutliner( SdDrawDocument& rDoc, OutlinerMode nMode ) mbPrepareSpellingPending(true) { SetStyleSheetPool(static_cast<SfxStyleSheetPool*>( mrDrawDocument.GetStyleSheetPool() )); - SetEditTextObjectPool( &rDoc.GetItemPool() ); SetCalcFieldValueHdl(LINK(SdModule::get(), SdModule, CalcFieldValueHdl)); SetForbiddenCharsTable( rDoc.GetForbiddenCharsTable() ); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 29319c3406ba..b89609a05510 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2859,6 +2859,15 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } break; + case SID_INSERT_HYPERLINK : + { + GetViewFrame()->GetDispatcher()->Execute( SID_HYPERLINK_DIALOG ); + + Cancel(); + rReq.Done (); + } + break; + case SID_OPEN_HYPERLINK: { OutlinerView* pOutView = mpDrawView->GetTextEditOutlinerView(); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 902c9d5e431f..1590032dfaed 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1491,23 +1491,21 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) bool bDisableEditHyperlink = ShouldDisableEditHyperlink(); //highlight selected custom shape + if(HasCurrentFunction()) { - if(HasCurrentFunction()) - { - rtl::Reference< FuPoor > xFunc( GetCurrentFunction() ); - FuConstructCustomShape* pShapeFunc = dynamic_cast< FuConstructCustomShape* >( xFunc.get() ); + rtl::Reference< FuPoor > xFunc( GetCurrentFunction() ); + FuConstructCustomShape* pShapeFunc = dynamic_cast< FuConstructCustomShape* >( xFunc.get() ); - static const sal_uInt16 nCSTbArray[] = { SID_DRAWTBX_CS_BASIC, SID_DRAWTBX_CS_SYMBOL, - SID_DRAWTBX_CS_ARROW, SID_DRAWTBX_CS_FLOWCHART, - SID_DRAWTBX_CS_CALLOUT, SID_DRAWTBX_CS_STAR }; + static const sal_uInt16 nCSTbArray[] = { SID_DRAWTBX_CS_BASIC, SID_DRAWTBX_CS_SYMBOL, + SID_DRAWTBX_CS_ARROW, SID_DRAWTBX_CS_FLOWCHART, + SID_DRAWTBX_CS_CALLOUT, SID_DRAWTBX_CS_STAR }; - const sal_uInt16 nCurrentSId = GetCurrentFunction()->GetSlotID(); - for (sal_uInt16 i : nCSTbArray) - { - rSet.ClearItem( i ); // Why is this necessary? - rSet.Put( SfxStringItem( i, nCurrentSId == i && pShapeFunc - ? pShapeFunc->GetShapeType() : OUString() ) ); - } + const sal_uInt16 nCurrentSId = GetCurrentFunction()->GetSlotID(); + for (sal_uInt16 i : nCSTbArray) + { + rSet.ClearItem( i ); // Why is this necessary? + rSet.Put( SfxStringItem( i, nCurrentSId == i && pShapeFunc + ? pShapeFunc->GetShapeType() : OUString() ) ); } } diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 02b929aad44f..54893d0fdcc2 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -538,6 +538,18 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } break; + case SID_INSERT_HYPERLINK: + { + // Disable when no text selected or when cursor is at URL field + if (!HasSelection(true) + || URLFieldHelper::IsCursorAtURLField(mpDrawView->GetTextEditOutlinerView(), + /*AlsoCheckBeforeCursor=*/true)) + { + rSet.DisableItem(nWhich); + } + } + break; + case SID_STYLE_WATERCAN: { std::unique_ptr<SfxUInt16Item> pFamilyItem; diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 934a4e475d21..1cfa0f16bc5f 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -211,10 +211,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) ::tools::Long nVal1 = aAttrSet.Get( SDRATTR_EDGELINE1DELTA ).GetValue(); ::tools::Long nVal2 = aAttrSet.Get( SDRATTR_EDGELINE2DELTA ).GetValue(); ::tools::Long nVal3 = aAttrSet.Get( SDRATTR_EDGELINE3DELTA ).GetValue(); - { - if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 ) - bDisable = false; - } + if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 ) + bDisable = false; } if( bDisable ) rSet.DisableItem( SID_CONNECTION_NEW_ROUTING ); diff --git a/sd/uiconfig/sdraw/popupmenu/drawtext.xml b/sd/uiconfig/sdraw/popupmenu/drawtext.xml index 3cb30bc3f5b2..d233708d06a6 100644 --- a/sd/uiconfig/sdraw/popupmenu/drawtext.xml +++ b/sd/uiconfig/sdraw/popupmenu/drawtext.xml @@ -18,6 +18,7 @@ <menu:menuitem menu:id=".uno:ParagraphDialog"/> <menu:menuitem menu:id=".uno:OutlineBullet"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sd/uiconfig/sdraw/popupmenu/table.xml b/sd/uiconfig/sdraw/popupmenu/table.xml index 7ada41804675..8abd39bbcd56 100644 --- a/sd/uiconfig/sdraw/popupmenu/table.xml +++ b/sd/uiconfig/sdraw/popupmenu/table.xml @@ -49,6 +49,7 @@ <menu:menuitem menu:id=".uno:FontDialog"/> <menu:menuitem menu:id=".uno:ParagraphDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sd/uiconfig/simpress/popupmenu/drawtext.xml b/sd/uiconfig/simpress/popupmenu/drawtext.xml index d0b1a95280bb..43d359ea98ee 100644 --- a/sd/uiconfig/simpress/popupmenu/drawtext.xml +++ b/sd/uiconfig/simpress/popupmenu/drawtext.xml @@ -18,6 +18,7 @@ <menu:menuitem menu:id=".uno:ParagraphDialog"/> <menu:menuitem menu:id=".uno:OutlineBullet"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sd/uiconfig/simpress/popupmenu/table.xml b/sd/uiconfig/simpress/popupmenu/table.xml index 7ada41804675..8abd39bbcd56 100644 --- a/sd/uiconfig/simpress/popupmenu/table.xml +++ b/sd/uiconfig/simpress/popupmenu/table.xml @@ -49,6 +49,7 @@ <menu:menuitem menu:id=".uno:FontDialog"/> <menu:menuitem menu:id=".uno:ParagraphDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sd/uiconfig/simpress/ui/interactiondialog.ui b/sd/uiconfig/simpress/ui/interactiondialog.ui index eb49c79fe437..8375c1fc9509 100644 --- a/sd/uiconfig/simpress/ui/interactiondialog.ui +++ b/sd/uiconfig/simpress/ui/interactiondialog.ui @@ -1,50 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sd"> <requires lib="gtk+" version="3.20"/> <object class="GtkDialog" id="InteractionDialog"> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="title" translatable="yes" context="interactiondialog|InteractionDialog">Interaction</property> <property name="modal">True</property> - <property name="default_width">0</property> - <property name="default_height">0</property> - <property name="type_hint">dialog</property> - <child> - <placeholder/> - </child> + <property name="default-width">0</property> + <property name="default-height">0</property> + <property name="type-hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> - <child> - <object class="GtkBox" id="content"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -57,8 +39,8 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -71,8 +53,8 @@ <object class="GtkButton" id="help"> <property name="label" translatable="yes" context="stock">_Help</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -86,7 +68,22 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="content"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> diff --git a/sd/uiconfig/simpress/ui/interactionpage.ui b/sd/uiconfig/simpress/ui/interactionpage.ui index ef6fd0b656ff..6f4fed71d28c 100644 --- a/sd/uiconfig/simpress/ui/interactionpage.ui +++ b/sd/uiconfig/simpress/ui/interactionpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sd"> <requires lib="gtk+" version="3.20"/> <object class="GtkTreeStore" id="liststore1"> @@ -30,49 +30,49 @@ <column type="gchararray"/> </columns> </object> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="InteractionPage"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="row_spacing">12</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> + <property name="row-spacing">12</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="interactionpage|label2">Action at mouse click:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">listbox</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">listbox</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkComboBoxText" id="listbox"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child internal-child="accessible"> <object class="AtkObject" id="listbox-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="interactionpage|extended_tip|listbox">Specifies the action that will run when you click the selected object during a slide show.</property> @@ -80,51 +80,51 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="fttree"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="interactionpage|fttree">Target:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">box3</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">box3</property> <property name="xalign">0</property> <property name="yalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkBox" id="box3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <child> <object class="GtkScrolledWindow"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="tree"> - <property name="width_request">-1</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="no_show_all">True</property> + <property name="width-request">-1</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore1</property> - <property name="headers_visible">False</property> - <property name="search_column">1</property> - <property name="enable_tree_lines">True</property> + <property name="headers-visible">False</property> + <property name="search-column">1</property> + <property name="enable-tree-lines">True</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="Macro Library List-selection1"/> </child> @@ -161,23 +161,23 @@ </child> <child> <object class="GtkScrolledWindow"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="treedoc"> - <property name="width_request">-1</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="no_show_all">True</property> + <property name="width-request">-1</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore2</property> - <property name="headers_visible">False</property> - <property name="search_column">1</property> - <property name="enable_tree_lines">True</property> + <property name="headers-visible">False</property> + <property name="search-column">1</property> + <property name="enable-tree-lines">True</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="Macro Library List-selection11"/> </child> @@ -215,21 +215,21 @@ <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="oleaction"> - <property name="width_request">-1</property> + <property name="width-request">-1</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore3</property> - <property name="headers_visible">False</property> - <property name="search_column">1</property> + <property name="headers-visible">False</property> + <property name="search-column">1</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="Macro Library List-selection111"/> </child> @@ -255,8 +255,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -264,7 +264,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="interactionpage|label1">Interaction</property> <attributes> <attribute name="weight" value="bold"/> @@ -273,39 +273,39 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="frame"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> <object class="GtkButton" id="browse"> <property name="label" translatable="yes" context="interactionpage|browse">_Browse...</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="use-underline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="browse-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="interactionpage|extended_tip|browse">Locate the file you want to open.</property> @@ -321,10 +321,10 @@ <child> <object class="GtkButton" id="find"> <property name="label" translatable="yes" context="interactionpage|find">_Find</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="no_show_all">True</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="no-show-all">True</property> + <property name="use-underline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="find-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="interactionpage|extended_tip|find">Searches for the specified slide or object.</property> @@ -339,22 +339,22 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="orientation">vertical</property> <child> <object class="GtkEntry" id="sound"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="sound-atkobject"> @@ -371,10 +371,10 @@ </child> <child> <object class="GtkEntry" id="bookmark"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="bookmark-atkobject"> @@ -390,10 +390,10 @@ </child> <child> <object class="GtkEntry" id="document"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="document-atkobject"> @@ -409,10 +409,10 @@ </child> <child> <object class="GtkEntry" id="program"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="program-atkobject"> @@ -428,10 +428,10 @@ </child> <child> <object class="GtkEntry" id="macro"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="macro-atkobject"> @@ -447,8 +447,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -456,7 +456,7 @@ <child type="label"> <object class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -464,8 +464,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child internal-child="accessible"> diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx index b037d746f5a5..f09817851886 100644 --- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx +++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx @@ -1275,6 +1275,9 @@ void ObjectInspectorTreeHandler::appendServices(uno::Reference<uno::XInterface> return; auto xServiceInfo = uno::Reference<lang::XServiceInfo>(xInterface, uno::UNO_QUERY); + if (!xServiceInfo) + return; + const uno::Sequence<OUString> aServiceNames(xServiceInfo->getSupportedServiceNames()); for (auto const& aServiceName : aServiceNames) { diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 4a1c6cc07256..87d23df72e40 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -4245,58 +4245,56 @@ bool SfxMedium::SignDocumentContentUsingCertificate( throw uno::RuntimeException(); } + if (xMetaInf.is()) { - if (xMetaInf.is()) - { - // ODF. - uno::Reference< io::XStream > xStream; - if (GetFilter() && GetFilter()->IsOwnFormat()) - xStream.set(xMetaInf->openStreamElement(xSigner->getDocumentContentSignatureDefaultStreamName(), embed::ElementModes::READWRITE), uno::UNO_SET_THROW); - - bool bSuccess = xModelSigner->SignModelWithCertificate( - xModel, rSigningContext, GetZipStorageToSign_Impl(), xStream); + // ODF. + uno::Reference< io::XStream > xStream; + if (GetFilter() && GetFilter()->IsOwnFormat()) + xStream.set(xMetaInf->openStreamElement(xSigner->getDocumentContentSignatureDefaultStreamName(), embed::ElementModes::READWRITE), uno::UNO_SET_THROW); - if (bSuccess) - { - uno::Reference< embed::XTransactedObject > xTransact( xMetaInf, uno::UNO_QUERY_THROW ); - xTransact->commit(); - xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW ); - xTransact->commit(); + bool bSuccess = xModelSigner->SignModelWithCertificate( + xModel, rSigningContext, GetZipStorageToSign_Impl(), xStream); - // the temporary file has been written, commit it to the original file - Commit(); - bChanges = true; - } - } - else if (xWriteableZipStor.is()) + if (bSuccess) { - // OOXML. - uno::Reference<io::XStream> xStream; + uno::Reference< embed::XTransactedObject > xTransact( xMetaInf, uno::UNO_QUERY_THROW ); + xTransact->commit(); + xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW ); + xTransact->commit(); - // We need read-write to be able to add the signature relation. - bool bSuccess = xModelSigner->SignModelWithCertificate( - xModel, rSigningContext, GetZipStorageToSign_Impl(/*bReadOnly=*/false), xStream); + // the temporary file has been written, commit it to the original file + Commit(); + bChanges = true; + } + } + else if (xWriteableZipStor.is()) + { + // OOXML. + uno::Reference<io::XStream> xStream; - if (bSuccess) - { - uno::Reference<embed::XTransactedObject> xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW); - xTransact->commit(); + // We need read-write to be able to add the signature relation. + bool bSuccess = xModelSigner->SignModelWithCertificate( + xModel, rSigningContext, GetZipStorageToSign_Impl(/*bReadOnly=*/false), xStream); - // the temporary file has been written, commit it to the original file - Commit(); - bChanges = true; - } - } - else + if (bSuccess) { - // Something not ZIP based: e.g. PDF. - std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(GetName(), StreamMode::READ | StreamMode::WRITE)); - uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream)); - if (xModelSigner->SignModelWithCertificate( - xModel, rSigningContext, uno::Reference<embed::XStorage>(), xStream)) - bChanges = true; + uno::Reference<embed::XTransactedObject> xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW); + xTransact->commit(); + + // the temporary file has been written, commit it to the original file + Commit(); + bChanges = true; } } + else + { + // Something not ZIP based: e.g. PDF. + std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(GetName(), StreamMode::READ | StreamMode::WRITE)); + uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream)); + if (xModelSigner->SignModelWithCertificate( + xModel, rSigningContext, uno::Reference<embed::XStorage>(), xStream)) + bChanges = true; + } } catch ( const uno::Exception& ) { diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index e9a32dc0a22d..291c4e435d9c 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -93,12 +93,12 @@ bool operator> (const util::DateTime& i_rLeft, const util::DateTime& i_rRight) } std::shared_ptr<GDIMetaFile> -SfxObjectShell::GetPreviewMetaFile( bool bFullContent ) const +SfxObjectShell::GetPreviewMetaFile( bool bFullContent, bool bOutputForScreen ) const { auto xFile = std::make_shared<GDIMetaFile>(); ScopedVclPtrInstance< VirtualDevice > pDevice; pDevice->EnableOutput( false ); - if(!CreatePreview_Impl(bFullContent, pDevice, xFile.get())) + if(!CreatePreview_Impl(bFullContent, bOutputForScreen, pDevice, xFile.get())) return std::shared_ptr<GDIMetaFile>(); return xFile; } @@ -108,7 +108,7 @@ BitmapEx SfxObjectShell::GetPreviewBitmap() const SfxCloseVetoLock lock(this); ScopedVclPtrInstance< VirtualDevice > pDevice(DeviceFormat::WITH_ALPHA); pDevice->SetAntialiasing(AntialiasingFlags::Enable | pDevice->GetAntialiasing()); - if(!CreatePreview_Impl(/*bFullContent*/false, pDevice, nullptr)) + if(!CreatePreview_Impl(/*bFullContent*/false, false, pDevice, nullptr)) return BitmapEx(); Size size = pDevice->GetOutputSizePixel(); BitmapEx aBitmap = pDevice->GetBitmapEx( Point(), size); @@ -120,7 +120,7 @@ BitmapEx SfxObjectShell::GetPreviewBitmap() const return aBitmap; } -bool SfxObjectShell::CreatePreview_Impl( bool bFullContent, VirtualDevice* pDevice, GDIMetaFile* pFile) const +bool SfxObjectShell::CreatePreview_Impl( bool bFullContent, bool bOutputForScreen, VirtualDevice* pDevice, GDIMetaFile* pFile) const { // DoDraw can only be called when no printing is done, otherwise // the printer may be turned off @@ -196,7 +196,7 @@ bool SfxObjectShell::CreatePreview_Impl( bool bFullContent, VirtualDevice* pDevi pDevice->SetDigitLanguage( eLang ); - const_cast<SfxObjectShell*>(this)->DoDraw( pDevice, Point(0,0), aTmpSize, JobSetup(), nAspect ); + const_cast<SfxObjectShell*>(this)->DoDraw( pDevice, Point(0,0), aTmpSize, JobSetup(), nAspect, bOutputForScreen ); if(pFile) pFile->Stop(); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 9a32cc1e8458..7c04c31d4c70 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -287,8 +287,8 @@ void SfxTemplateManagerDlg::setTemplateViewMode(TemplateViewMode eViewMode) { if(eViewMode == TemplateViewMode::eThumbnailView && mViewMode != TemplateViewMode::eThumbnailView) { - mxThumbnailViewButton->set_state(TRISTATE_TRUE); - mxListViewButton->set_state(TRISTATE_FALSE); + mxThumbnailViewButton->set_active(true); + mxListViewButton->set_active(false); mxLocalView->ThumbnailView::GrabFocus(); mViewMode = eViewMode; mxLocalView->setTemplateViewMode(eViewMode); @@ -296,8 +296,8 @@ void SfxTemplateManagerDlg::setTemplateViewMode(TemplateViewMode eViewMode) } if(eViewMode == TemplateViewMode::eListView && mViewMode != TemplateViewMode::eListView) { - mxListViewButton->set_state(TRISTATE_TRUE); - mxThumbnailViewButton->set_state(TRISTATE_FALSE); + mxListViewButton->set_active(true); + mxThumbnailViewButton->set_active(false); mxLocalView->ListView::grab_focus(); mViewMode = eViewMode; mxLocalView->setTemplateViewMode(eViewMode); diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 6cbab26df590..bb2ed57b1587 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -2976,6 +2976,7 @@ desktop/source/app/crashreport.cxx desktop/source/app/desktopcontext.hxx desktop/source/app/dispatchwatcher.cxx desktop/source/app/dispatchwatcher.hxx +desktop/source/app/initjsunoscripting.cxx desktop/source/app/langselect.cxx desktop/source/app/lockfile2.cxx desktop/source/app/officeipcthread.cxx diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk index 328216d2c259..b00c9c504bd0 100644 --- a/solenv/gbuild/UITest.mk +++ b/solenv/gbuild/UITest.mk @@ -62,7 +62,7 @@ else $(call gb_Trace_StartRange,$*,UIT) $(call gb_Helper_abbreviate_dirs,\ rm -rf $(dir $(call gb_UITest_get_target,$*)) && \ - mkdir -p $(dir $(call gb_UITest_get_target,$*))/user/user && \ + mkdir -p $(dir $(call gb_UITest_get_target,$*))user/user && \ cp $(if $(filter-out MACOSX,$(OS)),-T) $(if $(gb_UITest_use_config),$(gb_UITest_use_config),$(SRCDIR)/qadevOOo/qa/registrymodifications.xcu) $(dir $(call gb_UITest_get_target,$*))/user/user/registrymodifications.xcu && \ $(if $(gb_UITest__interactive),, \ rm -fr $@.core && mkdir -p $(dir $(call gb_UITest_get_target,$*))user/ && mkdir $@.core && cd $@.core && ) \ @@ -71,7 +71,7 @@ else $(if $(G_SLICE),G_SLICE=$(G_SLICE)) \ $(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \ $(DEFS) \ - $(if $(filter WNT,$(OS)),SAL_LOG_FILE="$(dir $(call gb_UITest_get_target,$*))/soffice.out.log") \ + $(if $(filter WNT,$(OS)),SAL_LOG_FILE="$(dir $(call gb_UITest_get_target,$*))soffice.out.log") \ TEST_LIB=$(call gb_Library_get_target,test) \ UNOTEST_LIB=$(call gb_Library_get_target,unotest) \ URE_BOOTSTRAP=vnd.sun.star.pathname:$(call gb_Helper_get_rcfile,$(INSTROOT)/$(LIBO_ETC_FOLDER)/fundamental) \ @@ -94,8 +94,8 @@ else RET=$$?; \ $(call gb_CppunitTest_postprocess,$(gb_UITest_EXECUTABLE_GDB),$@.core,$$RET) >> $@.log 2>&1;) \ $(if $(filter WNT,$(OS)), \ - printf '%s: <<<\n' $(dir $(call gb_UITest_get_target,$*))/soffice.out.log; \ - cat $(dir $(call gb_UITest_get_target,$*))/soffice.out.log; \ + printf '%s: <<<\n' $(dir $(call gb_UITest_get_target,$*))soffice.out.log; \ + cat $(dir $(call gb_UITest_get_target,$*))soffice.out.log; \ printf ' >>>\n\n';) \ cat $@.log; $(gb_UITest_UNITTESTFAILED) UI $*)))) $(call gb_Trace_EndRange,$*,UIT) diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk index 00163603e34e..fccc834039d7 100644 --- a/solenv/gbuild/extensions/pre_MergedLibsList.mk +++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk @@ -163,7 +163,7 @@ gb_MERGE_LIBRARY_LIST += \ msforms \ $(call gb_Helper_optional,DBCONNECTIVITY,mysql_jdbc) \ $(call gb_Helper_optional,MARIADBC,$(call gb_Helper_optional,DBCONNECTIVITY,mysqlc)) \ - OGLTrans \ + $(if $(ENABLE_OPENGL_TRANSITIONS),OGLTrans) \ odbc \ pdffilter \ $(if $(BUILD_POSTGRESQL_SDBC),postgresql-sdbc) \ diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 1c568dc89b42..35ee6916ffa1 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -261,7 +261,7 @@ namespace svt IMPL_LINK_NOARG(CheckBoxControl, OnToggle, weld::Toggleable&, void) { - m_aModeState.ButtonToggled(*m_xBox); + m_aModeState.CheckButtonToggled(*m_xBox); m_aToggleLink.Call(*m_xBox); CallModifyHdls(); } diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx index ddb0a4075d3d..bff0ab884cff 100644 --- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -72,6 +72,9 @@ namespace drawinglayer::primitive2d bool mbContainsPageCountField : 1; bool mbContainsOtherFields : 1; + // tdf#167511 also need to react for EditViewActive to correctly show HighContrast + bool mbEditViewActive : 1; + protected: // support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments static Primitive2DReference encapsulateWithTextHierarchyBlockPrimitive2D(Primitive2DContainer&& aCandidate); diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index dba7ddef043a..b36d57c17c83 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -9712,6 +9712,23 @@ SfxVoidItem OpenHyperlinkOnCursor SID_OPEN_HYPERLINK GroupId = SfxGroupId::Edit; ] +SfxVoidItem InsertHyperlink SID_INSERT_HYPERLINK +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Insert; +] + SfxVoidItem EditHyperlink SID_EDIT_HYPERLINK (SfxInt32Item PositionX FN_PARAM_1, SfxInt32Item PositionY FN_PARAM_2) [ diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 8d6b983b7c08..33a0ed99bd8e 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -190,9 +190,6 @@ OUString SAL_CALL SvxRectCtlAccessibleContext::getAccessibleName() return msName; } -/** Return empty reference to indicate that the relation set is not - supported. -*/ Reference< XAccessibleRelationSet > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleRelationSet() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -472,9 +469,6 @@ OUString SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleName() return msName; } -/** Return empty reference to indicate that the relation set is not - supported. -*/ Reference<XAccessibleRelationSet> SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleRelationSet() { rtl::Reference<utl::AccessibleRelationSetHelper> pRelationSetHelper = new utl::AccessibleRelationSetHelper; diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index ee21c5474bd5..bf9185304367 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -22,7 +22,6 @@ #include <sfx2/dispatch.hxx> #include <sfx2/module.hxx> #include <sfx2/viewfrm.hxx> -#include <svl/eitem.hxx> #include <svl/intitem.hxx> #include <svl/itempool.hxx> #include <svx/colorbox.hxx> @@ -42,9 +41,7 @@ #include <svx/svxids.hrc> #include <svx/strings.hrc> -#include <editeng/colritem.hxx> #include <osl/diagnose.h> -#include <svx/e3ditem.hxx> #include <svl/whiter.hxx> #include <svtools/unitconv.hxx> @@ -114,15 +111,15 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p , m_xBtnNormalsObj(m_xBuilder->weld_toggle_button(u"objspecific"_ustr)) , m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button(u"flat"_ustr)) , m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button(u"spherical"_ustr)) - , m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button(u"invertnormals"_ustr)) - , m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button(u"doublesidedillum"_ustr)) - , m_xBtnDoubleSided(m_xBuilder->weld_toggle_button(u"doublesided"_ustr)) + , m_xBtnNormalsInvert(new TriStateToggleButton(m_xBuilder->weld_toggle_button(u"invertnormals"_ustr))) + , m_xBtnTwoSidedLighting(new TriStateToggleButton(m_xBuilder->weld_toggle_button(u"doublesidedillum"_ustr))) + , m_xBtnDoubleSided(new TriStateToggleButton(m_xBuilder->weld_toggle_button(u"doublesided"_ustr))) , m_xFLRepresentation(m_xBuilder->weld_container(u"shadingframe"_ustr)) , m_xLbShademode(m_xBuilder->weld_combo_box(u"mode"_ustr)) , m_xFLShadow(m_xBuilder->weld_container(u"shadowframe"_ustr)) - , m_xBtnShadow3d(m_xBuilder->weld_toggle_button(u"shadow"_ustr)) + , m_xBtnShadow3d(new TriStateToggleButton(m_xBuilder->weld_toggle_button(u"shadow"_ustr))) , m_xFtSlant(m_xBuilder->weld_label(u"slantft"_ustr)) , m_xMtrSlant(m_xBuilder->weld_metric_spin_button(u"slant"_ustr, FieldUnit::DEGREE)) @@ -162,7 +159,7 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p , m_xBtnTexObjectY(m_xBuilder->weld_toggle_button(u"texobjy"_ustr)) , m_xBtnTexParallelY(m_xBuilder->weld_toggle_button(u"texparallely"_ustr)) , m_xBtnTexCircleY(m_xBuilder->weld_toggle_button(u"texcircley"_ustr)) - , m_xBtnTexFilter(m_xBuilder->weld_toggle_button(u"texfilter"_ustr)) + , m_xBtnTexFilter(new TriStateToggleButton(m_xBuilder->weld_toggle_button(u"texfilter"_ustr))) , m_xFLMaterial(m_xBuilder->weld_container(u"materialframe"_ustr)) , m_xLbMatFavorites(m_xBuilder->weld_combo_box(u"favorites"_ustr)) @@ -189,7 +186,7 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p , m_xBtnConvertTo3D(m_xBuilder->weld_button(u"to3d"_ustr)) , m_xBtnLatheObject(m_xBuilder->weld_button(u"tolathe"_ustr)) - , m_xBtnPerspective(m_xBuilder->weld_toggle_button(u"perspective"_ustr)) + , m_xBtnPerspective(new TriStateToggleButton(m_xBuilder->weld_toggle_button(u"perspective"_ustr))) , bUpdate(false) , eViewType(ViewType3D::Geo) @@ -460,6 +457,84 @@ void Svx3DWin::Reset() m_xCtlLightPreview->CheckSelection(); } +void Svx3DWin::UpdateLight(const SfxItemSet& rAttrs, TypedWhichId<SvxColorItem> nWhichLightColor, + ColorListBox& rColorListBox, TypedWhichId<SfxBoolItem> nWhichLightOn, + LightButton& rLightButton, + TypedWhichId<SvxB3DVectorItem> nWhichLightDirection) +{ + // Color + SfxItemState eState = rAttrs.GetItemState(nWhichLightColor); + if (eState != SfxItemState::INVALID) + { + Color aColor = rAttrs.Get(nWhichLightColor).GetValue(); + if (aColor != rColorListBox.GetSelectEntryColor()) + { + LBSelectColor(rColorListBox, aColor); + bUpdate = true; + } + } + else + { + if (!rColorListBox.IsNoSelection()) + { + rColorListBox.SetNoSelection(); + bUpdate = true; + } + } + // on/off + eState = rAttrs.GetItemState(nWhichLightOn); + if (eState != SfxItemState::INVALID) + { + bool bOn = rAttrs.Get(nWhichLightOn).GetValue(); + if (bOn != rLightButton.isLightOn()) + { + rLightButton.switchLightOn(bOn); + bUpdate = true; + } + if (rLightButton.is_indeterminate()) + rLightButton.set_active(rLightButton.get_active()); + } + else + { + if (!rLightButton.is_indeterminate()) + { + rLightButton.set_indeterminate(); + bUpdate = true; + } + } + // direction + eState = rAttrs.GetItemState(nWhichLightDirection); + if (eState != SfxItemState::INVALID) + { + bUpdate = true; + } +} + +void Svx3DWin::UpdateToggleButton(const SfxItemSet& rAttrs, TypedWhichId<SfxBoolItem> nWhich, + TriStateToggleButton& rButton) +{ + SfxItemState eState = rAttrs.GetItemState(nWhich); + if (eState != SfxItemState::INVALID) + { + bool bValue = rAttrs.Get(nWhich).GetValue(); + if (bValue != rButton.get_active()) + { + rButton.set_active(bValue); + bUpdate = true; + } + else if (rButton.is_indeterminate()) + rButton.set_active(bValue); + } + else + { + if (!rButton.is_indeterminate()) + { + rButton.set_indeterminate(); + bUpdate = true; + } + } +} + void Svx3DWin::Update( SfxItemSet const & rAttrs ) { // remember 2d attributes @@ -654,26 +729,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Double walled / Double sided - eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED); - if( eState != SfxItemState::INVALID ) - { - bool bValue = rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED).GetValue(); - if( bValue != m_xBtnDoubleSided->get_active() ) - { - m_xBtnDoubleSided->set_active( bValue ); - bUpdate = true; - } - else if( m_xBtnDoubleSided->get_state() == TRISTATE_INDET ) - m_xBtnDoubleSided->set_active( bValue ); - } - else - { - if( m_xBtnDoubleSided->get_state() != TRISTATE_INDET ) - { - m_xBtnDoubleSided->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } + UpdateToggleButton(rAttrs, SDRATTR_3DOBJ_DOUBLE_SIDED, *m_xBtnDoubleSided); // Edge rounding if( m_xMtrPercentDiagonal->get_sensitive() ) @@ -778,48 +834,10 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Normal inverted - eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT); - if( eState != SfxItemState::INVALID ) - { - bool bValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT).GetValue(); - if( bValue != m_xBtnNormalsInvert->get_active() ) - { - m_xBtnNormalsInvert->set_active( bValue ); - bUpdate = true; - } - else if( m_xBtnNormalsInvert->get_state() == TRISTATE_INDET ) - m_xBtnNormalsInvert->set_active( bValue ); - } - else - { - if( m_xBtnNormalsInvert->get_state() != TRISTATE_INDET ) - { - m_xBtnNormalsInvert->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } + UpdateToggleButton(rAttrs, SDRATTR_3DOBJ_NORMALS_INVERT, *m_xBtnNormalsInvert); // 2-sided lighting - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING); - if( eState != SfxItemState::INVALID ) - { - bool bValue = rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue(); - if( bValue != m_xBtnTwoSidedLighting->get_active() ) - { - m_xBtnTwoSidedLighting->set_active( bValue ); - bUpdate = true; - } - else if( m_xBtnTwoSidedLighting->get_state() == TRISTATE_INDET ) - m_xBtnTwoSidedLighting->set_active( bValue ); - } - else - { - if( m_xBtnTwoSidedLighting->get_state() != TRISTATE_INDET ) - { - m_xBtnTwoSidedLighting->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } + UpdateToggleButton(rAttrs, SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, *m_xBtnTwoSidedLighting); // Representation // Shademode @@ -854,14 +872,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) m_xMtrSlant->set_sensitive( bValue ); bUpdate = true; } - else if( m_xBtnShadow3d->get_state() == TRISTATE_INDET ) + else if (m_xBtnShadow3d->is_indeterminate()) m_xBtnShadow3d->set_active( bValue ); } else { - if( m_xBtnShadow3d->get_state() != TRISTATE_INDET ) + if (!m_xBtnShadow3d->is_indeterminate()) { - m_xBtnShadow3d->set_state( TRISTATE_INDET ); + m_xBtnShadow3d->set_indeterminate(); bUpdate = true; } } @@ -936,399 +954,40 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) // Lighting Color aColor; - // Light 1 (Color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue(); - ColorListBox* pLb = m_xLbLight1.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight1->IsNoSelection()) - { - m_xLbLight1->SetNoSelection(); - bUpdate = true; - } - } - // Light 1 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue(); - if (bOn != m_xBtnLight1->isLightOn()) - { - m_xBtnLight1->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight1->get_state() == TRISTATE_INDET ) - m_xBtnLight1->set_active( m_xBtnLight1->get_active() ); - } - else - { - if( m_xBtnLight1->get_state() != TRISTATE_INDET ) - { - m_xBtnLight1->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 1 (direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_1); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - //Light 2 (color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue(); - ColorListBox* pLb = m_xLbLight2.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight2->IsNoSelection()) - { - m_xLbLight2->SetNoSelection(); - bUpdate = true; - } - } - // Light 2 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue(); - if (bOn != m_xBtnLight2->isLightOn()) - { - m_xBtnLight2->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight2->get_state() == TRISTATE_INDET ) - m_xBtnLight2->set_active( m_xBtnLight2->get_active() ); - } - else - { - if( m_xBtnLight2->get_state() != TRISTATE_INDET ) - { - m_xBtnLight2->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - //Light 2 (Direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_2); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - - //Light 3 (color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue(); - ColorListBox* pLb = m_xLbLight3.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight3->IsNoSelection()) - { - m_xLbLight3->SetNoSelection(); - bUpdate = true; - } - } - // Light 3 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue(); - if (bOn != m_xBtnLight3->isLightOn()) - { - m_xBtnLight3->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight3->get_state() == TRISTATE_INDET ) - m_xBtnLight3->set_active( m_xBtnLight3->get_active() ); - } - else - { - if( m_xBtnLight3->get_state() != TRISTATE_INDET ) - { - m_xBtnLight3->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 3 (Direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_3); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - - // Light 4 (Color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue(); - ColorListBox* pLb = m_xLbLight4.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight4->IsNoSelection()) - { - m_xLbLight4->SetNoSelection(); - bUpdate = true; - } - } - // Light 4 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue(); - if (bOn != m_xBtnLight4->isLightOn()) - { - m_xBtnLight4->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight4->get_state() == TRISTATE_INDET ) - m_xBtnLight4->set_active( m_xBtnLight4->get_active() ); - } - else - { - if( m_xBtnLight4->get_state() != TRISTATE_INDET ) - { - m_xBtnLight4->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 4 (direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_4); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - - // Light 5 (color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue(); - ColorListBox* pLb = m_xLbLight5.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight5->IsNoSelection()) - { - m_xLbLight5->SetNoSelection(); - bUpdate = true; - } - } - // Light 5 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue(); - if (bOn != m_xBtnLight5->isLightOn()) - { - m_xBtnLight5->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight5->get_state() == TRISTATE_INDET ) - m_xBtnLight5->set_active( m_xBtnLight5->get_active() ); - } - else - { - if( m_xBtnLight5->get_state() != TRISTATE_INDET ) - { - m_xBtnLight5->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 5 (direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_5); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - - // Light 6 (color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue(); - ColorListBox* pLb = m_xLbLight6.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight6->IsNoSelection()) - { - m_xLbLight6->SetNoSelection(); - bUpdate = true; - } - } - // Light 6 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue(); - if (bOn != m_xBtnLight6->isLightOn()) - { - m_xBtnLight6->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight6->get_state() == TRISTATE_INDET ) - m_xBtnLight6->set_active( m_xBtnLight6->get_active() ); - } - else - { - if( m_xBtnLight6->get_state() != TRISTATE_INDET ) - { - m_xBtnLight6->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 6 (direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_6); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - - // Light 7 (color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue(); - ColorListBox* pLb = m_xLbLight7.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight7->IsNoSelection()) - { - m_xLbLight7->SetNoSelection(); - bUpdate = true; - } - } - // Light 7 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue(); - if (bOn != m_xBtnLight7->isLightOn()) - { - m_xBtnLight7->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight7->get_state() == TRISTATE_INDET ) - m_xBtnLight7->set_active( m_xBtnLight7->get_active() ); - } - else - { - if( m_xBtnLight7->get_state() != TRISTATE_INDET ) - { - m_xBtnLight7->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 7 (direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_7); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } - - // Light 8 (color) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8); - if( eState != SfxItemState::INVALID ) - { - aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue(); - ColorListBox* pLb = m_xLbLight8.get(); - if( aColor != pLb->GetSelectEntryColor() ) - { - LBSelectColor( pLb, aColor ); - bUpdate = true; - } - } - else - { - if (!m_xLbLight8->IsNoSelection()) - { - m_xLbLight8->SetNoSelection(); - bUpdate = true; - } - } - // Light 8 (on/off) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8); - if( eState != SfxItemState::INVALID ) - { - bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue(); - if (bOn != m_xBtnLight8->isLightOn()) - { - m_xBtnLight8->switchLightOn(bOn); - bUpdate = true; - } - if( m_xBtnLight8->get_state() == TRISTATE_INDET ) - m_xBtnLight8->set_active( m_xBtnLight8->get_active() ); - } - else - { - if( m_xBtnLight8->get_state() != TRISTATE_INDET ) - { - m_xBtnLight8->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } - // Light 8 (direction) - eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_8); - if( eState != SfxItemState::INVALID ) - { - bUpdate = true; - } + // Light 1 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_1, *m_xLbLight1, SDRATTR_3DSCENE_LIGHTON_1, + *m_xBtnLight1, SDRATTR_3DSCENE_LIGHTDIRECTION_1); + // Light 2 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_2, *m_xLbLight2, SDRATTR_3DSCENE_LIGHTON_2, + *m_xBtnLight2, SDRATTR_3DSCENE_LIGHTDIRECTION_2); + // Light 3 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_3, *m_xLbLight3, SDRATTR_3DSCENE_LIGHTON_3, + *m_xBtnLight3, SDRATTR_3DSCENE_LIGHTDIRECTION_3); + // Light 4 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_4, *m_xLbLight4, SDRATTR_3DSCENE_LIGHTON_4, + *m_xBtnLight4, SDRATTR_3DSCENE_LIGHTDIRECTION_4); + // Light 5 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_5, *m_xLbLight5, SDRATTR_3DSCENE_LIGHTON_5, + *m_xBtnLight5, SDRATTR_3DSCENE_LIGHTDIRECTION_5); + // Light 6 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_6, *m_xLbLight6, SDRATTR_3DSCENE_LIGHTON_6, + *m_xBtnLight6, SDRATTR_3DSCENE_LIGHTDIRECTION_6); + // Light 7 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_7, *m_xLbLight7, SDRATTR_3DSCENE_LIGHTON_7, + *m_xBtnLight7, SDRATTR_3DSCENE_LIGHTDIRECTION_7); + // Light 8 + UpdateLight(rAttrs, SDRATTR_3DSCENE_LIGHTCOLOR_8, *m_xLbLight8, SDRATTR_3DSCENE_LIGHTON_8, + *m_xBtnLight8, SDRATTR_3DSCENE_LIGHTDIRECTION_8); // Ambient light eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR); if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue(); - ColorListBox* pLb = m_xLbAmbientlight.get(); - if( aColor != pLb->GetSelectEntryColor() ) + if (aColor != m_xLbAmbientlight->GetSelectEntryColor()) { - LBSelectColor( pLb, aColor ); + LBSelectColor(*m_xLbAmbientlight, aColor); bUpdate = true; } } @@ -1455,26 +1114,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) } // Filter - eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER); - if( eState != SfxItemState::INVALID ) - { - bool bValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER).GetValue(); - if( bValue != m_xBtnTexFilter->get_active() ) - { - m_xBtnTexFilter->set_active( bValue ); - bUpdate = true; - } - if( m_xBtnTexFilter->get_state() == TRISTATE_INDET ) - m_xBtnTexFilter->set_active( bValue ); - } - else - { - if( m_xBtnTexFilter->get_state() != TRISTATE_INDET ) - { - m_xBtnTexFilter->set_state( TRISTATE_INDET ); - bUpdate = true; - } - } + UpdateToggleButton(rAttrs, SDRATTR_3DOBJ_TEXTURE_FILTER, *m_xBtnTexFilter); } @@ -1486,10 +1126,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(XATTR_FILLCOLOR).GetColorValue(); - ColorListBox* pLb = m_xLbMatColor.get(); - if( aColor != pLb->GetSelectEntryColor() ) + if (aColor != m_xLbMatColor->GetSelectEntryColor()) { - LBSelectColor( pLb, aColor ); + LBSelectColor(*m_xLbMatColor, aColor); bUpdate = true; } } @@ -1507,10 +1146,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION).GetValue(); - ColorListBox* pLb = m_xLbMatEmission.get(); - if( aColor != pLb->GetSelectEntryColor() ) + if (aColor != m_xLbMatEmission->GetSelectEntryColor()) { - LBSelectColor( pLb, aColor ); + LBSelectColor(*m_xLbMatEmission, aColor); bUpdate = true; } } @@ -1528,10 +1166,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if( eState != SfxItemState::INVALID ) { aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR).GetValue(); - ColorListBox* pLb = m_xLbMatSpecular.get(); - if( aColor != pLb->GetSelectEntryColor() ) + if (aColor != m_xLbMatSpecular->GetSelectEntryColor()) { - LBSelectColor( pLb, aColor ); + LBSelectColor(*m_xLbMatSpecular, aColor); bUpdate = true; } } @@ -1577,14 +1214,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) m_xBtnPerspective->set_active( ePT == ProjectionType::Perspective ); bUpdate = true; } - if( m_xBtnPerspective->get_state() == TRISTATE_INDET ) + if (m_xBtnPerspective->is_indeterminate()) m_xBtnPerspective->set_active( ePT == ProjectionType::Perspective ); } else { - if( m_xBtnPerspective->get_state() != TRISTATE_INDET ) + if (!m_xBtnPerspective->is_indeterminate()) { - m_xBtnPerspective->set_state( TRISTATE_INDET ); + m_xBtnPerspective->set_indeterminate(); bUpdate = true; } } @@ -1665,7 +1302,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) //Others must stand as the front on all sides // Perspective - if( m_xBtnPerspective->get_state() != TRISTATE_INDET ) + if (!m_xBtnPerspective->is_indeterminate()) { ProjectionType nValue; if( m_xBtnPerspective->get_active() ) @@ -1717,12 +1354,8 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) rAttrs.InvalidateItem(SDRATTR_3DOBJ_DEPTH); // Double-sided - TriState eState = m_xBtnDoubleSided->get_state(); - if( eState != TRISTATE_INDET ) - { - bool bValue = TRISTATE_TRUE == eState; - rAttrs.Put(makeSvx3DDoubleSidedItem(bValue)); - } + if (!m_xBtnDoubleSided->is_indeterminate()) + rAttrs.Put(makeSvx3DDoubleSidedItem(m_xBtnDoubleSided->get_active())); else rAttrs.InvalidateItem(SDRATTR_3DOBJ_DOUBLE_SIDED); @@ -1768,22 +1401,14 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) rAttrs.InvalidateItem(SDRATTR_3DOBJ_NORMALS_KIND); // Normal inverted - eState = m_xBtnNormalsInvert->get_state(); - if( eState != TRISTATE_INDET ) - { - bool bValue = TRISTATE_TRUE == eState; - rAttrs.Put(makeSvx3DNormalsInvertItem(bValue)); - } + if (!m_xBtnNormalsInvert->is_indeterminate()) + rAttrs.Put(makeSvx3DNormalsInvertItem(m_xBtnNormalsInvert->get_active())); else rAttrs.InvalidateItem(SDRATTR_3DOBJ_NORMALS_INVERT); // 2-sided lighting - eState = m_xBtnTwoSidedLighting->get_state(); - if( eState != TRISTATE_INDET ) - { - bool bValue = TRISTATE_TRUE == eState; - rAttrs.Put(makeSvx3DTwoSidedLightingItem(bValue)); - } + if (!m_xBtnTwoSidedLighting->is_indeterminate()) + rAttrs.Put(makeSvx3DTwoSidedLightingItem(m_xBtnTwoSidedLighting->get_active())); else rAttrs.InvalidateItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING); @@ -1798,10 +1423,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) rAttrs.InvalidateItem(SDRATTR_3DSCENE_SHADE_MODE); // 3D-Shadow - eState = m_xBtnShadow3d->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnShadow3d->is_indeterminate()) { - bool bValue = TRISTATE_TRUE == eState; + bool bValue = m_xBtnShadow3d->get_active(); rAttrs.Put(makeSvx3DShadow3DItem(bValue)); rAttrs.Put(makeSdrShadowItem(bValue)); } @@ -1851,8 +1475,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_1); // Light 1 (on/off) - eState = m_xBtnLight1->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight1->is_indeterminate()) { bool bValue = m_xBtnLight1->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff1Item(bValue)); @@ -1876,8 +1499,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_2); // Light 2 (on/off) - eState = m_xBtnLight2->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight2->is_indeterminate()) { bool bValue = m_xBtnLight2->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff2Item(bValue)); @@ -1900,8 +1522,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_3); // Light 3 (on/off) - eState = m_xBtnLight3->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight3->is_indeterminate()) { bool bValue = m_xBtnLight3->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff3Item(bValue)); @@ -1924,8 +1545,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_4); // Light 4 (on/off) - eState = m_xBtnLight4->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight4->is_indeterminate()) { bool bValue = m_xBtnLight4->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff4Item(bValue)); @@ -1948,8 +1568,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_5); // Light 5 (on/off) - eState = m_xBtnLight5->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight5->is_indeterminate()) { bool bValue = m_xBtnLight5->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff5Item(bValue)); @@ -1972,8 +1591,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_6); // Light 6 (on/off) - eState = m_xBtnLight6->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight6->is_indeterminate()) { bool bValue = m_xBtnLight6->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff6Item(bValue)); @@ -1996,8 +1614,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_7); // Light 7 (on/off) - eState = m_xBtnLight7->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight7->is_indeterminate()) { bool bValue = m_xBtnLight7->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff7Item(bValue)); @@ -2020,8 +1637,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_8); // Light 8 (on/off) - eState = m_xBtnLight8->get_state(); - if( eState != TRISTATE_INDET ) + if (!m_xBtnLight8->is_indeterminate()) { bool bValue = m_xBtnLight8->isLightOn(); rAttrs.Put(makeSvx3DLightOnOff8Item(bValue)); @@ -2107,12 +1723,8 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) // Filter - eState = m_xBtnTexFilter->get_state(); - if( eState != TRISTATE_INDET ) - { - bool bValue = TRISTATE_TRUE == eState; - rAttrs.Put(makeSvx3DTextureFilterItem(bValue)); - } + if (!m_xBtnTexFilter->is_indeterminate()) + rAttrs.Put(makeSvx3DTextureFilterItem(m_xBtnTexFilter->get_active())); else rAttrs.InvalidateItem(SDRATTR_3DOBJ_TEXTURE_FILTER); @@ -2170,7 +1782,7 @@ void Svx3DWin::Resize() m_xBtnConvertTo3D->hide(); m_xBtnLatheObject->hide(); - m_xBtnPerspective->hide(); + m_xBtnPerspective->get_widget()->hide(); m_xCtlPreview->Hide(); m_xLightPreviewGrid->hide(); @@ -2187,7 +1799,7 @@ void Svx3DWin::Resize() m_xBtnConvertTo3D->show(); m_xBtnLatheObject->show(); - m_xBtnPerspective->show(); + m_xBtnPerspective->get_widget()->show(); if( m_xBtnGeo->get_active() ) ClickViewTypeHdl(*m_xBtnGeo); @@ -2464,7 +2076,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, weld::Button&, rBtn, void ) m_xBtnTexObjectY->set_active( &rBtn == m_xBtnTexObjectY.get() ); bUpdatePreview = true; } - else if (&rBtn == m_xBtnShadow3d.get()) + else if (&rBtn == m_xBtnShadow3d->get_widget()) { m_xFtSlant->set_sensitive( m_xBtnShadow3d->get_active() ); m_xMtrSlant->set_sensitive( m_xBtnShadow3d->get_active() ); @@ -2512,7 +2124,7 @@ IMPL_LINK( Svx3DWin, ClickColorHdl, weld::Button&, rBtn, void) if (aColorDlg.Execute() == RET_OK) { aColor = aColorDlg.GetColor(); - LBSelectColor(pLb, aColor); + LBSelectColor(*pLb, aColor); SelectColorHdl(*pLb); } } @@ -2576,9 +2188,9 @@ IMPL_LINK( Svx3DWin, SelectHdl, weld::ComboBox&, rListBox, void ) } break; } - LBSelectColor( m_xLbMatColor.get(), aColObj ); - LBSelectColor( m_xLbMatEmission.get(), aColEmis ); - LBSelectColor( m_xLbMatSpecular.get(), aColSpec ); + LBSelectColor(*m_xLbMatColor, aColObj); + LBSelectColor(*m_xLbMatEmission, aColEmis); + LBSelectColor(*m_xLbMatSpecular, aColSpec); m_xMtrMatSpecularIntensity->set_value(nSpecIntens, FieldUnit::PERCENT); bUpdatePreview = true; @@ -2742,10 +2354,10 @@ namespace } // Method to ensure that the LB is also associated with a color -void Svx3DWin::LBSelectColor( ColorListBox* pLb, const Color& rColor ) +void Svx3DWin::LBSelectColor(ColorListBox& rLb, const Color& rColor) { - pLb->SetNoSelection(); - pLb->SelectEntry({rColor, lcl_makeColorName(rColor)}); + rLb.SetNoSelection(); + rLb.SelectEntry({ rColor, lcl_makeColorName(rColor) }); } void Svx3DWin::UpdatePreview() @@ -2932,12 +2544,17 @@ void SvxConvertTo3DItem::StateChangedAtToolBoxControl(sal_uInt16 /*_nId*/, SfxIt } } -LightButton::LightButton(std::unique_ptr<weld::ToggleButton> xButton) +TriStateToggleButton::TriStateToggleButton(std::unique_ptr<weld::ToggleButton> xButton) : m_xButton(std::move(xButton)) +{ +} + +LightButton::LightButton(std::unique_ptr<weld::ToggleButton> xButton) + : TriStateToggleButton(std::move(xButton)) , m_bLightOn(false) , m_bButtonPrevActive(false) { - m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_OFF); + get_widget()->set_from_icon_name(RID_SVXBMP_LAMP_OFF); } void LightButton::switchLightOn(bool bOn) @@ -2946,9 +2563,9 @@ void LightButton::switchLightOn(bool bOn) return; m_bLightOn = bOn; if (m_bLightOn) - m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_ON); + get_widget()->set_from_icon_name(RID_SVXBMP_LAMP_ON); else - m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_OFF); + get_widget()->set_from_icon_name(RID_SVXBMP_LAMP_OFF); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index cc1e850ccb68..a83fe8bbc8bc 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -29,6 +29,7 @@ #include <svx/svdpage.hxx> #include <svx/svdmodel.hxx> #include <svx/svdoutl.hxx> +#include <vcl/svapp.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <utility> #include <osl/diagnose.h> @@ -103,7 +104,8 @@ namespace drawinglayer::primitive2d mnLastPageCount(0), mbContainsPageField(false), mbContainsPageCountField(false), - mbContainsOtherFields(false) + mbContainsOtherFields(false), + mbEditViewActive(false) { const EditTextObject& rETO = maOutlinerParaObject.GetTextObject(); @@ -196,6 +198,14 @@ namespace drawinglayer::primitive2d } } + // tdf#167511 check if EditViewActive has changed, but only if we are in + // HighContrast mode at all + if (!bDoDelete && mbEditViewActive != rViewInformation.getEditViewActive() + && Application::GetSettings().GetStyleSettings().GetHighContrastMode()) + { + bDoDelete = true; + } + if(bDoDelete) { const_cast< SdrTextPrimitive2D* >(this)->setBuffered2DDecomposition(nullptr); @@ -229,6 +239,7 @@ namespace drawinglayer::primitive2d const_cast< SdrTextPrimitive2D* >(this)->mnLastPageNumber = nCurrentlyValidPageNumber; const_cast< SdrTextPrimitive2D* >(this)->mnLastPageCount = nCurrentlyValidPageCount; const_cast< SdrTextPrimitive2D* >(this)->maLastTextBackgroundColor = aNewTextBackgroundColor; + const_cast< SdrTextPrimitive2D* >(this)->mbEditViewActive = rViewInformation.getEditViewActive(); } // call parent diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 77ac5c6a5e2b..951d991e8a35 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -783,8 +783,11 @@ void TextEditOverlayObject::checkDataChange(const basegfx::B2DRange& rMinTextEdi // of this mechanism, it *may* be possible to buffer layouted // primitives per ParaPortion with/in/dependent on the EditEngine // content if needed. For now, get and compare - TextHierarchyBreakupBlockText aBreakup(*pSdrOutliner, aNewTransformA, aNewTransformB, - aClipRange); + drawinglayer::geometry::ViewInformation2D aViewInformation2D; + // TextEditOverlay is only possible in EditView, activate it + aViewInformation2D.setEditViewActive(true); + TextHierarchyBreakupBlockText aBreakup(aViewInformation2D, *pSdrOutliner, aNewTransformA, + aNewTransformB, aClipRange); pSdrOutliner->StripPortions(aBreakup); aNewTextPrimitives.append(aBreakup.getTextPortionPrimitives()); diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 5d3788789136..69a5a5bca4ab 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -351,7 +351,6 @@ std::unique_ptr<SdrOutliner> SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrMode { SfxItemPool* pPool = &rModel.GetItemPool(); std::unique_ptr<SdrOutliner> pOutl(new SdrOutliner( pPool, nOutlinerMode )); - pOutl->SetEditTextObjectPool( pPool ); pOutl->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(rModel.GetStyleSheetPool())); pOutl->SetDefTab(rModel.GetDefaultTabulator()); Outliner::SetForbiddenCharsTable(rModel.GetForbiddenCharsTable()); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index a3d6de78ec99..7e1948dc0597 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -713,7 +713,7 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit ) { pOutliner->EraseVirtualDevice(); pOutliner->SetUpdateLayout(false); - pOutliner->SetEditTextObjectPool(m_pItemPool.get()); + pOutliner->SetEditEnginePool(m_pItemPool.get()); pOutliner->SetDefTab(m_nDefaultTabulator); } diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 7a6001d628e4..3f7d41a6597d 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -152,6 +152,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive( // ScaledUnitPolyPolygon. Thus aPolyPolygon might be smaller than aScale from aObjectMatrix. We // use this smaller size for the text area, otherwise the text will reach into the stroke. TextHierarchyBreakupContourText aBreakup( + aViewInformation, rOutliner, aNewTransformA, aNewTransformB, @@ -303,6 +304,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive( // now break up text primitives. TextHierarchyBreakupBlockText aBreakup( + aViewInformation, rOutliner, aNewTransformA, aNewTransformB, @@ -620,6 +622,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( // now break up text primitives. TextHierarchyBreakupBlockText aBreakup( + aViewInformation, rOutliner, aNewTransformA, aNewTransformB, @@ -704,6 +707,7 @@ void SdrTextObj::impDecomposeStretchTextPrimitive( // now break up text primitives. TextHierarchyBreakupOutliner aBreakup( + aViewInformation, rOutliner, aNewTransformA, aNewTransformB); @@ -1133,6 +1137,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive( // now break up text primitives. TextHierarchyBreakupBlockText aBreakup( + aViewInformation, rOutliner, aNewTransformA, aNewTransformB, diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index ec4017ba4350..20fa93f76490 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -154,6 +154,12 @@ namespace ::std::vector< impPathTextPortion > maPathTextPortions; public: + TextHierarchyBreakupPathTextPortions(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D) + : StripPortionsHelper(rViewInformation2D) + , maPathTextPortions() + { + } + virtual void processDrawPortionInfo(const DrawPortionInfo& rDrawPortionInfo) override { // extract and add data for TextOnPath further processing @@ -640,7 +646,7 @@ void SdrTextObj::impDecomposePathTextPrimitive( rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage())); // now break up to text portions - TextHierarchyBreakupPathTextPortions aBreakup; + TextHierarchyBreakupPathTextPortions aBreakup(aViewInformation); rOutliner.StripPortions(aBreakup); const ::std::vector< impPathTextPortion > rPathTextPortions(aBreakup.sortAndGetPathTextPortions()); diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index da7bafc506c7..dff076f1da52 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -166,11 +166,13 @@ void TextHierarchyBreakupBlockText::processDrawPortionInfo(const DrawPortionInfo } TextHierarchyBreakupBlockText::TextHierarchyBreakupBlockText( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, SdrOutliner& rOutliner, const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const basegfx::B2DRange& rClipRange) : TextHierarchyBreakupOutliner( + rViewInformation2D, rOutliner, rNewTransformA, rNewTransformB) @@ -189,11 +191,13 @@ void TextHierarchyBreakupContourText::processDrawPortionInfo(const DrawPortionIn } TextHierarchyBreakupContourText::TextHierarchyBreakupContourText( + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D, SdrOutliner& rOutliner, const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const basegfx::B2DVector& rScale) : TextHierarchyBreakupOutliner( + rViewInformation2D, rOutliner, rNewTransformA, rNewTransformB) diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 974b06c30219..f39b33662b00 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1717,19 +1717,17 @@ EEAnchorMode SdrTableObj::GetOutlinerViewAnchorMode() const { SdrTextVertAdjust eV=xCell->GetTextVerticalAdjust(); + if (eV==SDRTEXTVERTADJUST_TOP) { - if (eV==SDRTEXTVERTADJUST_TOP) - { - eRet=EEAnchorMode::TopLeft; - } - else if (eV==SDRTEXTVERTADJUST_BOTTOM) - { - eRet=EEAnchorMode::BottomLeft; - } - else - { - eRet=EEAnchorMode::VCenterLeft; - } + eRet=EEAnchorMode::TopLeft; + } + else if (eV==SDRTEXTVERTADJUST_BOTTOM) + { + eRet=EEAnchorMode::BottomLeft; + } + else + { + eRet=EEAnchorMode::VCenterLeft; } } return eRet; diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx index 50888ce339c3..7a564a76e609 100644 --- a/sw/inc/edimp.hxx +++ b/sw/inc/edimp.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_INC_EDIMP_HXX -#define INCLUDED_SW_INC_EDIMP_HXX +#pragma once #include <o3tl/sorted_vector.hxx> @@ -53,6 +52,4 @@ private: o3tl::sorted_vector<SwPamRange> maVector; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 30d35c966ba4..0de50413d3cc 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_INC_EDITSH_HXX -#define INCLUDED_SW_INC_EDITSH_HXX +#pragma once #include <sfx2/redlinerecordingmode.hxx> @@ -1062,6 +1061,4 @@ public: ~SwMvContext() COVERITY_NOEXCEPT_FALSE; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx index c2fe02adbbdf..f59c35e5bec6 100644 --- a/sw/inc/extinput.hxx +++ b/sw/inc/extinput.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_INC_EXTINPUT_HXX -#define INCLUDED_SW_INC_EXTINPUT_HXX +#pragma once #include "pam.hxx" #include <i18nlangtag/lang.h> @@ -48,6 +47,4 @@ public: const SwExtTextInput* GetPrev() const { return static_cast<SwExtTextInput const *>(GetPrevInRing()); } }; -#endif // INCLUDED_SW_INC_EXTINPUT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx index 0fd676dfebe9..a5f86fef0d3c 100644 --- a/sw/inc/fchrfmt.hxx +++ b/sw/inc/fchrfmt.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_INC_FCHRFMT_HXX -#define INCLUDED_SW_INC_FCHRFMT_HXX +#pragma once #include <svl/poolitem.hxx> #include <svl/listener.hxx> @@ -74,6 +73,5 @@ public: void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; -#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlexport/data/tdf167527_title_letters_cut_from_below.docx b/sw/qa/extras/ooxmlexport/data/tdf167527_title_letters_cut_from_below.docx Binary files differnew file mode 100644 index 000000000000..96dc4f2366a2 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf167527_title_letters_cut_from_below.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx index 20c65ae8a637..76d9d0af8a30 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx @@ -20,6 +20,7 @@ #include <unotxdoc.hxx> #include <docsh.hxx> #include <IDocumentSettingAccess.hxx> +#include <vcl/gdimtf.hxx> #include <set> @@ -428,6 +429,31 @@ DECLARE_OOXMLEXPORT_TEST(testFieldMarkFormat, "fontsize-field-separator.docx") CPPUNIT_ASSERT_EQUAL(12.f, getProperty<float>(xRun, u"CharHeight"_ustr)); } +CPPUNIT_TEST_FIXTURE(Test, tdf167527_title_letters_cut_from_below) +{ + createSwDoc("tdf167527_title_letters_cut_from_below.docx"); + + SwDocShell* pDocShell = getSwDocShell(); + CPPUNIT_ASSERT(pDocShell); + + // bOutputForScreen of true to ensure field backgrounds are rendered + std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile(false, true); + + MetafileXmlDump dumper; + xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); + + auto nFieldShadingsBottom = getXPath(pXmlDoc, "(//rect)[2]", "bottom").toInt32(); + auto nFieldShadingsTop = getXPath(pXmlDoc, "(//rect)[2]", "top").toInt32(); + sal_Int32 nFieldShadingsHeight = nFieldShadingsBottom - nFieldShadingsTop; + + // Without the accompanying fix in place, this test would have failed with: + // less equal assertion failed + // Expected less or equal than: 700 + // Actual : 810 + // i.e. the field background overlaps the previous row of text + CPPUNIT_ASSERT_LESSEQUAL(static_cast<sal_Int32>(700), nFieldShadingsHeight); +} + } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/sdi/_drwbase.sdi b/sw/sdi/_drwbase.sdi index 4981490ec22b..4fa17e1f96eb 100644 --- a/sw/sdi/_drwbase.sdi +++ b/sw/sdi/_drwbase.sdi @@ -149,6 +149,12 @@ interface BaseTextDrawBase StateMethod = GetState; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + SID_INSERT_HYPERLINK + [ + ExecMethod = Execute; + StateMethod = GetState; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] SID_HYPERLINK_SETLINK // status() [ ExecMethod = Execute ; diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index f7b0c2c9f4bc..543ae83111d9 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -402,6 +402,12 @@ interface BaseText ExecMethod = Execute ; StateMethod = GetState; ] + SID_INSERT_HYPERLINK + [ + ExecMethod = Execute ; + StateMethod = GetState; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] SID_RUBY_DIALOG [ ExecMethod = Execute ; diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 423a12bf582e..b45daf55bff8 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -996,27 +996,25 @@ void SwNumberTreeNode::SetLastValid } } + if (IsContinuous()) { - if (IsContinuous()) - { - tSwNumberTreeChildren::const_iterator aIt = mItLastValid; + tSwNumberTreeChildren::const_iterator aIt = mItLastValid; - if (aIt != mChildren.end()) - ++aIt; - else - aIt = mChildren.begin(); + if (aIt != mChildren.end()) + ++aIt; + else + aIt = mChildren.begin(); - while (aIt != mChildren.end()) - { - (*aIt)->InvalidateTree(); + while (aIt != mChildren.end()) + { + (*aIt)->InvalidateTree(); - ++aIt; - } + ++aIt; + } - if (mpParent) - { - mpParent->SetLastValid(mpParent->GetIterator(this), bValidating); - } + if (mpParent) + { + mpParent->SetLastValid(mpParent->GetIterator(this), bValidating); } } } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 53e4de7548cf..b5f56036a88f 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1485,13 +1485,11 @@ void SwAccessibleParagraph::_getRunAttributesImpl( // as run attributes. // SwXTextCursor::GetCursorAttr( *pPaM, aSet, sal_True, sal_True ); // get character attributes from automatic paragraph style and merge these into <aSet> + if ( pTextNode->HasSwAttrSet() ) { - if ( pTextNode->HasSwAttrSet() ) - { - SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> aAutomaticParaStyleCharAttrs( pPaM->GetDoc().GetAttrPool()); - aAutomaticParaStyleCharAttrs.Put( *(pTextNode->GetpSwAttrSet()), false ); - aSet.Put( aAutomaticParaStyleCharAttrs ); - } + SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> aAutomaticParaStyleCharAttrs( pPaM->GetDoc().GetAttrPool()); + aAutomaticParaStyleCharAttrs.Put( *(pTextNode->GetpSwAttrSet()), false ); + aSet.Put( aAutomaticParaStyleCharAttrs ); } // get character attributes at <pPaM> and merge these into <aSet> { diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index e2a6665e3b8d..bd3515895d8d 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -674,13 +674,11 @@ namespace docfunc dynamic_cast<SwAnchoredDrawObject*>(pDrawContact->GetAnchoredObj( pObj )); // error handling + if ( !pAnchoredDrawObj ) { - if ( !pAnchoredDrawObj ) - { - OSL_FAIL( "<docfunc::AllDrawObjsOnPage() - missing anchored draw object" ); - bAllDrawObjsOnPage = false; - break; - } + OSL_FAIL( "<docfunc::AllDrawObjsOnPage() - missing anchored draw object" ); + bAllDrawObjsOnPage = false; + break; } if ( pAnchoredDrawObj->NotYetPositioned() ) diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index cc9a3e68b433..edecdcf5b256 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1517,14 +1517,12 @@ static bool lcl_IsNumOk( sal_uInt8 nSrchNum, sal_uInt8& rLower, sal_uInt8& rUppe "<lcl_IsNumOk(..)> - misusage of method" ); bool bRet = false; - { - if( bOverUpper ? nSrchNum == nNumber : nSrchNum >= nNumber ) - bRet = true; - else if( nNumber > rLower ) - rLower = nNumber; - else if( nNumber < rUpper ) - rUpper = nNumber; - } + if( bOverUpper ? nSrchNum == nNumber : nSrchNum >= nNumber ) + bRet = true; + else if( nNumber > rLower ) + rLower = nNumber; + else if( nNumber < rUpper ) + rUpper = nNumber; return bRet; } diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index bab097258a71..d2ab6a0d427f 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -246,11 +246,9 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc& rDoc, const SwNodeIndex& rIdx ) const // In which array are we? Nodes? UndoNodes? SwNodes& rNds = const_cast<SwNodes&>(GetNodes()); - { - if( rIdx < rDoc.GetNodes().GetEndOfInserts().GetIndex() && - rIdx >= rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() ) - return nullptr; - } + if( rIdx < rDoc.GetNodes().GetEndOfInserts().GetIndex() && + rIdx >= rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() ) + return nullptr; // Copy the TableFrameFormat UIName sTableName( GetTable().GetFrameFormat()->GetName() ); diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 0e2980ba530e..b7e388a23305 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -114,13 +114,11 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const { double nGrfDPIx = 0.0; double nGrfDPIy = 0.0; + if ( !bPixelGrf && m_bPixelContour ) { - if ( !bPixelGrf && m_bPixelContour ) - { - basegfx::B2DSize aDPI = GetGraphic().GetPPI(); - nGrfDPIx = aDPI.getWidth(); - nGrfDPIy = aDPI.getHeight(); - } + basegfx::B2DSize aDPI = GetGraphic().GetPPI(); + nGrfDPIx = aDPI.getWidth(); + nGrfDPIy = aDPI.getHeight(); } OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap, "scale factor for pixel unsupported" ); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 0f3e2e680860..8c1cebb6f4aa 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -637,19 +637,17 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData, // Test if the whole Content Section (Document/TableBox/Fly) should be hidden, // which we're currently not able to do. const SwNodeIndex* pIdx = nullptr; + if (rNewData.IsHidden()) { - if (rNewData.IsHidden()) + pIdx = pFormat->GetContent().GetContentIdx(); + if (pIdx) { - pIdx = pFormat->GetContent().GetContentIdx(); - if (pIdx) + const SwSectionNode* pSectNd = + pIdx->GetNode().GetSectionNode(); + if (pSectNd) { - const SwSectionNode* pSectNd = - pIdx->GetNode().GetSectionNode(); - if (pSectNd) - { - ::lcl_CheckEmptyLayFrame( rNewData, - *pSectNd, *pSectNd->EndOfSectionNode() ); - } + ::lcl_CheckEmptyLayFrame( rNewData, + *pSectNd, *pSectNd->EndOfSectionNode() ); } } } diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index ab0f8185f753..da3f89930b5b 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1382,18 +1382,16 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt, bool *pSelectFrameInste // Do not select object in background which is overlapping this text // at the given position. bool bObjInBackground( false ); + if ( pObj->GetLayer() == rIDDMA.GetHellId() ) { - if ( pObj->GetLayer() == rIDDMA.GetHellId() ) + if (const SwContact* pContact = ::GetUserCall( pObj )) { - if (const SwContact* pContact = ::GetUserCall( pObj )) + const SwAnchoredObject* pAnchoredObj = pContact->GetAnchoredObj( pObj ); + const SwFrameFormat* pFormat = pAnchoredObj->GetFrameFormat(); + const SwFormatSurround& rSurround = pFormat->GetSurround(); + if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGH ) { - const SwAnchoredObject* pAnchoredObj = pContact->GetAnchoredObj( pObj ); - const SwFrameFormat* pFormat = pAnchoredObj->GetFrameFormat(); - const SwFormatSurround& rSurround = pFormat->GetSurround(); - if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGH ) - { - bObjInBackground = true; - } + bObjInBackground = true; } } } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 90d93f5a1004..27c38dbf44b4 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -1113,12 +1113,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } } // only use 90% of height for character bound - { - if( aRectFnSet.IsVert() || aRectFnSet.IsVertL2R() ) - _orRect.Width( (_orRect.Width()*9)/10 ); - else - _orRect.Height( (_orRect.Height()*9)/10 ); - } + if( aRectFnSet.IsVert() || aRectFnSet.IsVertL2R() ) + _orRect.Width( (_orRect.Width()*9)/10 ); + else + _orRect.Height( (_orRect.Height()*9)/10 ); } const SwTwips nBaseOfstForFly = ( pFrame->IsTextFrame() && pFly ) ? diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 717f5f73ae8f..a7a9ddc244ad 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1754,16 +1754,14 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) } // - loop prevention + if ( (aOldFrame_StopFormat == getFrameArea() || aOldFrame_StopFormat2 == getFrameArea() ) && + (aOldPrt_StopFormat == getFramePrintArea() || aOldPrt_StopFormat2 == getFramePrintArea())) { - if ( (aOldFrame_StopFormat == getFrameArea() || aOldFrame_StopFormat2 == getFrameArea() ) && - (aOldPrt_StopFormat == getFramePrintArea() || aOldPrt_StopFormat2 == getFramePrintArea())) - { - ++nConsecutiveFormatsWithoutChange; - } - else - { - nConsecutiveFormatsWithoutChange = 0; - } + ++nConsecutiveFormatsWithoutChange; + } + else + { + nConsecutiveFormatsWithoutChange = 0; } // Yet again an invalid value? Repeat from the start... diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 2f6974ba39c7..5c5b0fa2afef 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2622,22 +2622,20 @@ Size SwFlyFrame::ChgSize( const Size& aNewSize ) // object, assure that the new size fits into the current clipping area // of the fly frame Size aAdjustedNewSize( aNewSize ); + if (dynamic_cast<SwFlyAtContentFrame*>(this)) { - if (dynamic_cast<SwFlyAtContentFrame*>(this)) + auto pLower = dynamic_cast<SwNoTextFrame*>(Lower()); + if ( pLower && pLower->GetNode()->GetOLENode() ) { - auto pLower = dynamic_cast<SwNoTextFrame*>(Lower()); - if ( pLower && pLower->GetNode()->GetOLENode() ) + SwRect aClipRect; + ::CalcClipRect( GetVirtDrawObj(), aClipRect, false ); + if ( aAdjustedNewSize.Width() > aClipRect.Width() ) { - SwRect aClipRect; - ::CalcClipRect( GetVirtDrawObj(), aClipRect, false ); - if ( aAdjustedNewSize.Width() > aClipRect.Width() ) - { - aAdjustedNewSize.setWidth( aClipRect.Width() ); - } - if ( aAdjustedNewSize.Height() > aClipRect.Height() ) - { - aAdjustedNewSize.setWidth( aClipRect.Height() ); - } + aAdjustedNewSize.setWidth( aClipRect.Width() ); + } + if ( aAdjustedNewSize.Height() > aClipRect.Height() ) + { + aAdjustedNewSize.setWidth( aClipRect.Height() ); } } } diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 4a44cc109e36..888b59fd2d0c 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -95,36 +95,34 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() const SvxLRSpaceItem& rLRSpace = rFrameFormat.GetLRSpace(); const SvxULSpaceItem& rULSpace = rFrameFormat.GetULSpace(); SwTwips nLRSpaceLeft, nLRSpaceRight, nULSpaceUpper, nULSpaceLower; + if ( rAnchorFrame.IsVertical() ) { - if ( rAnchorFrame.IsVertical() ) + // Seems to be easier to do it all the horizontal way + // So, from now on think horizontal. + rAnchorFrame.SwitchVerticalToHorizontal( aObjBoundRect ); + rAnchorFrame.SwitchVerticalToHorizontal( aAnchorPos ); + + // convert the spacing values + nLRSpaceLeft = rULSpace.GetUpper(); + nLRSpaceRight = rULSpace.GetLower(); + nULSpaceUpper = rLRSpace.ResolveRight({}); + nULSpaceLower = rLRSpace.ResolveLeft({}); + } + else + { + if ( rAnchorFrame.IsRightToLeft() ) { - // Seems to be easier to do it all the horizontal way - // So, from now on think horizontal. - rAnchorFrame.SwitchVerticalToHorizontal( aObjBoundRect ); - rAnchorFrame.SwitchVerticalToHorizontal( aAnchorPos ); - - // convert the spacing values - nLRSpaceLeft = rULSpace.GetUpper(); - nLRSpaceRight = rULSpace.GetLower(); - nULSpaceUpper = rLRSpace.ResolveRight({}); - nULSpaceLower = rLRSpace.ResolveLeft({}); + nLRSpaceLeft = rLRSpace.ResolveRight({}); + nLRSpaceRight = rLRSpace.ResolveLeft({}); } else { - if ( rAnchorFrame.IsRightToLeft() ) - { - nLRSpaceLeft = rLRSpace.ResolveRight({}); - nLRSpaceRight = rLRSpace.ResolveLeft({}); - } - else - { - nLRSpaceLeft = rLRSpace.ResolveLeft({}); - nLRSpaceRight = rLRSpace.ResolveRight({}); - } - - nULSpaceUpper = rULSpace.GetUpper(); - nULSpaceLower = rULSpace.GetLower(); + nLRSpaceLeft = rLRSpace.ResolveLeft({}); + nLRSpaceRight = rLRSpace.ResolveRight({}); } + + nULSpaceUpper = rULSpace.GetUpper(); + nULSpaceLower = rULSpace.GetLower(); } // consider left and upper spacing by adjusting anchor position. diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 9ffb25400fd7..df5066ed13cd 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -495,27 +495,25 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // This frame is used in the following instead of the 'real' anchor // frame <rAnchorTextFrame> for the 'vertical' position in all cases. const SwLayoutFrame* pUpperOfOrientFrame = nullptr; + // #i28701# - As long as the anchor frame is on the + // same page as <pOrientFrame> and the vertical position isn't aligned + // automatic at the anchor character or the top of the line of the + // anchor character, the anchor frame determines the vertical position. + // Split fly follows: always let the anchor char frame determine the vertical position. + // This gives us a vertical cut position between the master and the follow. + if ( &rAnchorTextFrame == pOrientFrame || + ( rAnchorTextFrame.FindPageFrame() == pOrientFrame->FindPageFrame() && + aVert.GetVertOrient() == text::VertOrientation::NONE && + aVert.GetRelationOrient() != text::RelOrientation::CHAR && + aVert.GetRelationOrient() != text::RelOrientation::TEXT_LINE && !bFollowSplitFly ) ) { - // #i28701# - As long as the anchor frame is on the - // same page as <pOrientFrame> and the vertical position isn't aligned - // automatic at the anchor character or the top of the line of the - // anchor character, the anchor frame determines the vertical position. - // Split fly follows: always let the anchor char frame determine the vertical position. - // This gives us a vertical cut position between the master and the follow. - if ( &rAnchorTextFrame == pOrientFrame || - ( rAnchorTextFrame.FindPageFrame() == pOrientFrame->FindPageFrame() && - aVert.GetVertOrient() == text::VertOrientation::NONE && - aVert.GetRelationOrient() != text::RelOrientation::CHAR && - aVert.GetRelationOrient() != text::RelOrientation::TEXT_LINE && !bFollowSplitFly ) ) - { - pUpperOfOrientFrame = rAnchorTextFrame.GetUpper(); - pAnchorFrameForVertPos = &rAnchorTextFrame; - } - else - { - pUpperOfOrientFrame = pOrientFrame->GetUpper(); - pAnchorFrameForVertPos = pOrientFrame; - } + pUpperOfOrientFrame = rAnchorTextFrame.GetUpper(); + pAnchorFrameForVertPos = &rAnchorTextFrame; + } + else + { + pUpperOfOrientFrame = pOrientFrame->GetUpper(); + pAnchorFrameForVertPos = pOrientFrame; } // ignore one-column sections. diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 7c85cc95a8a8..e85e1160cf39 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -794,7 +794,34 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, SwRect* pRect, SwRect* pIntersect, const bool bInsideBox ) const { - Size aSize( rPor.Width(), rPor.Height() ); + const SwAttrSet& rAttrSet = GetTextFrame()->GetTextNodeForParaProps()->GetSwAttrSet(); + const SvxLineSpacingItem& rSpace = rAttrSet.GetLineSpacing(); + tools::Long nPropLineSpace = rSpace.GetPropLineSpace(); + + SwTwips nHeight = rPor.Height(); + + // we should take line spacing into account. + // otherwise, bottom of some letters will be cut because of the "field shading" background layer. + switch (rSpace.GetInterLineSpaceRule()) + { + case SvxInterLineSpaceRule::Prop: // proportional + { + if (nPropLineSpace < 100) + nHeight = rPor.Height() * nPropLineSpace / 100; + } + break; + case SvxInterLineSpaceRule::Fix: // fixed + { + if (rSpace.GetInterLineSpace() > 0) + nHeight = std::min<SwTwips>(rSpace.GetInterLineSpace(), rPor.Height()); + } + break; + default: + break; + } + + Size aSize( rPor.Width(), nHeight); + if( rPor.IsHangingPortion() ) aSize.setWidth( static_cast<const SwHangingPortion&>(rPor).GetInnerWidth() ); if( rPor.InSpaceGrp() && GetSpaceAdd() ) @@ -829,7 +856,29 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, if (GetTextFrame()->IsVertLR() && !GetTextFrame()->IsVertLRBT()) aPoint.setY( Y() - rPor.Height() + rPor.GetAscent() ); else - aPoint.setY( Y() - rPor.GetAscent() ); + { + SwTwips nAscent = rPor.GetAscent(); + + switch (rSpace.GetInterLineSpaceRule()) + { + case SvxInterLineSpaceRule::Prop: // proportional + { + if (nPropLineSpace < 100) + nAscent = (rPor.GetAscent() * nPropLineSpace / 100); + } + break; + case SvxInterLineSpaceRule::Fix: // fixed + { + if (rSpace.GetInterLineSpace() > 0) + nAscent = std::min<SwTwips>(rSpace.GetInterLineSpace(), rPor.GetAscent()); + } + break; + default: + break; + } + + aPoint.setY( Y() - nAscent); + } } // Adjust x coordinate if we are inside a bidi portion diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx index f8a49d6041ac..3c52c6a977fa 100644 --- a/sw/source/core/unocore/XMLRangeHelper.cxx +++ b/sw/source/core/unocore/XMLRangeHelper.cxx @@ -304,9 +304,7 @@ CellRange getCellRangeFromXMLString( const OUString & rXMLString ) CellRange aResult; // iterate over different ranges - for( sal_Int32 i = 0; - nEndPos < nLength; - nStartPos = ++nEndPos, i++ ) + for( ; nEndPos < nLength; ) { // find start point of next range diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index e3ead0c11196..694ff865e037 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -386,7 +386,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) * There are local structures that only need to be known to the ASCII DLL. */ -SwNodeFnTab aASCNodeFnTab = { +const SwNodeFnTab aASCNodeFnTab = { /* RES_TXTNODE */ OutASC_SwTextNode, /* RES_GRFNODE */ nullptr, /* RES_OLENODE */ nullptr diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx index 7464c4eccd52..860927fb1e5e 100644 --- a/sw/source/filter/ascii/wrtasc.hxx +++ b/sw/source/filter/ascii/wrtasc.hxx @@ -22,7 +22,7 @@ #include <shellio.hxx> #include <wrt_fn.hxx> -extern SwNodeFnTab aASCNodeFnTab; +extern const SwNodeFnTab aASCNodeFnTab; // The ASC writer diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 047860778628..026d6c1060f7 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -3277,7 +3277,7 @@ static SwHTMLWriter& OutHTML_SvxAdjust( SwHTMLWriter& rWrt, const SfxPoolItem& r * functions. */ -SwAttrFnTab aHTMLAttrFnTab = { +const SwAttrFnTab aHTMLAttrFnTab = { /* RES_CHRATR_CASEMAP */ OutHTML_CSS1Attr, /* RES_CHRATR_CHARSETCOLOR */ nullptr, /* RES_CHRATR_COLOR */ OutHTML_SvxColor, diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 6e897e5eb5e4..5cd68c0c76e1 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -161,7 +161,7 @@ const OUString aEventMethodTable[] = u""_ustr }; -const char * aEventSDOptionTable[] = +const char * const aEventSDOptionTable[] = { OOO_STRING_SVTOOLS_HTML_O_SDonsubmit, OOO_STRING_SVTOOLS_HTML_O_SDonreset, @@ -173,7 +173,7 @@ const char * aEventSDOptionTable[] = nullptr }; -const char * aEventOptionTable[] = +const char * const aEventOptionTable[] = { OOO_STRING_SVTOOLS_HTML_O_onsubmit, OOO_STRING_SVTOOLS_HTML_O_onreset, diff --git a/sw/source/filter/html/htmlform.hxx b/sw/source/filter/html/htmlform.hxx index f52e67ca175d..122e0a1c8135 100644 --- a/sw/source/filter/html/htmlform.hxx +++ b/sw/source/filter/html/htmlform.hxx @@ -22,8 +22,8 @@ extern const OUString aEventListenerTable[]; extern const OUString aEventMethodTable[]; -extern const char* aEventSDOptionTable[]; -extern const char* aEventOptionTable[]; +extern const char* const aEventSDOptionTable[]; +extern const char* const aEventOptionTable[]; #endif diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 4830efb753bb..e6fd8d8378a6 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -60,7 +60,7 @@ class SwTextFootnote; enum class HtmlTokenId : sal_Int16; namespace utl { class TempFileNamed; } -extern SwAttrFnTab aHTMLAttrFnTab; +extern const SwAttrFnTab aHTMLAttrFnTab; #define HTML_PARSPACE (o3tl::toTwips(5, o3tl::Length::mm)) diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 1c7ba38e5a62..82643081d739 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -192,7 +192,7 @@ static OString OutTBLBorderLine(RtfExport const& rExport, const editeng::SvxBord } aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF - + OString::number(static_cast<sal_Int32>(rExport.GetColor(pLine->GetColor())))); + + OString::number(rExport.GetColor(pLine->GetColor()))); } else // tdf#129758 "no border" may be needed to override style { @@ -963,8 +963,8 @@ void RtfAttributeOutput::TableBackgrounds( if (!aColor.IsTransparent()) { - m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLCBPAT); - m_aRowDefs.append(static_cast<sal_Int32>(m_rExport.GetColor(aColor))); + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLCBPAT + + OString::number(m_rExport.GetColor(aColor))); } } @@ -1864,9 +1864,8 @@ void RtfAttributeOutput::NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, m_rExport.Strm().WriteOString(aProperties); } - m_rExport.Strm().WriteOString(OOO_STRING_SVTOOLS_RTF_FI); - m_rExport.Strm().WriteNumberAsString(nFirstLineIndex).WriteOString(OOO_STRING_SVTOOLS_RTF_LI); - m_rExport.Strm().WriteNumberAsString(nIndentAt); + m_rExport.Strm().WriteOString(OOO_STRING_SVTOOLS_RTF_FI).WriteNumberAsString(nFirstLineIndex); + m_rExport.Strm().WriteOString(OOO_STRING_SVTOOLS_RTF_LI).WriteNumberAsString(nIndentAt); m_rExport.Strm().WriteChar('}'); if (nLevel > 8) @@ -2607,8 +2606,7 @@ void RtfAttributeOutput::CharColor(const SvxColorItem& rColor) { const Color aColor(rColor.GetValue()); - m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CF); - m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(aColor))); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CF + OString::number(m_rExport.GetColor(aColor))); } void RtfAttributeOutput::CharContour(const SvxContourItem& rContour) @@ -2853,7 +2851,7 @@ void RtfAttributeOutput::CharUnderline(const SvxUnderlineItem& rUnderline) // NEEDSWORK looks like here rUnderline.GetColor() is always black, // even if the color in the odt is for example green... m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ULC); - m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(rUnderline.GetColor()))); + m_aStyles.append(m_rExport.GetColor(rUnderline.GetColor())); } } @@ -2881,7 +2879,7 @@ void RtfAttributeOutput::CharBackground(const SvxBrushItem& rBrush) if (!rBrush.GetColor().IsTransparent()) { m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CHCBPAT); - m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(rBrush.GetColor()))); + m_aStyles.append(m_rExport.GetColor(rBrush.GetColor())); } } @@ -3773,7 +3771,7 @@ void RtfAttributeOutput::FormatBackground(const SvxBrushItem& rBrush) else if (!rBrush.GetColor().IsTransparent()) { m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CBPAT); - m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(rBrush.GetColor()))); + m_aStyles.append(m_rExport.GetColor(rBrush.GetColor())); } } diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index bd9e176a7c5f..c12f528e43db 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1243,7 +1243,7 @@ void RtfExport::OutDateTime(std::string_view pStr, const util::DateTime& rDT) Strm().WriteNumberAsString(rDT.Minutes).WriteChar('}'); } -sal_uInt16 RtfExport::GetColor(const Color& rColor) const +sal_Int32 RtfExport::GetColor(const Color& rColor) const { for (const auto& rEntry : m_aColTable) if (rEntry.second == rColor) diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 04d98a3cdfff..6b285dbab485 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -188,7 +188,7 @@ public: void OutDateTime(std::string_view pStr, const css::util::DateTime& rDT); void OutPageDescription(const SwPageDesc& rPgDsc); - sal_uInt16 GetColor(const Color& rColor) const; + sal_Int32 GetColor(const Color& rColor) const; void InsColor(const Color& rCol); void InsColorLine(const SvxBoxItem& rBox); void OutColorTable(); diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 4efba9159e6f..ef2eb019f74c 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -427,9 +427,9 @@ IMPL_LINK_NOARG(SwAsciiFilterDlg, CharSetSelHdl, weld::ComboBox&, void) else { // restore old user choice (not the automatic!) - m_xCRLF_RB->set_state(m_xCRLF_RB->get_saved_state()); - m_xCR_RB->set_state(m_xCR_RB->get_saved_state()); - m_xLF_RB->set_state(m_xLF_RB->get_saved_state()); + m_xCRLF_RB->set_active(m_xCRLF_RB->get_saved_state() == TRISTATE_TRUE); + m_xCR_RB->set_active(m_xCR_RB->get_saved_state() == TRISTATE_TRUE); + m_xLF_RB->set_active(m_xLF_RB->get_saved_state() == TRISTATE_TRUE); } m_bSaveLineStatus = true; diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index c8a2bce3c1fc..a6f6b4eee6cd 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -2034,6 +2034,13 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.MoveParagraph(SwNodeOffset(-1)); rReq.Done(); break; + case SID_INSERT_HYPERLINK: + { + SfxRequest aReq(SID_HYPERLINK_DIALOG, SfxCallMode::SLOT, SfxGetpApp()->GetPool()); + GetView().GetViewFrame().ExecuteSlot( aReq); + rReq.Ignore(); + } + break; case SID_RUBY_DIALOG: case SID_HYPERLINK_DIALOG: { @@ -3973,6 +3980,38 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSet.DisableItem(nWhich); } break; + case SID_INSERT_HYPERLINK: + { + if (!rSh.HasSelection()) + { + rSet.DisableItem(nWhich); + break; + } + if (!rSh.HasReadonlySel()) + { + SfxItemSetFixed<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT> aSet(GetPool()); + rSh.GetCurAttr(aSet); + + // If a hyperlink is selected, either alone or along with other text... + if (SfxItemState::SET <= aSet.GetItemState(RES_TXTATR_INETFMT) + || aSet.GetItemState(RES_TXTATR_INETFMT) == SfxItemState::INVALID) + { + rSet.DisableItem(nWhich); + } + + // is the cursor at the beginning of a hyperlink? + const SwTextNode* pTextNd = rSh.GetCursor()->GetPointNode().GetTextNode(); + if (pTextNd && !rSh.HasSelection()) + { + const sal_Int32 nIndex = rSh.GetCursor()->Start()->GetContentIndex(); + const SwTextAttr* pINetFmt + = pTextNd->GetTextAttrAt(nIndex, RES_TXTATR_INETFMT); + if (pINetFmt && !pINetFmt->GetINetFormat().GetValue().isEmpty()) + rSet.DisableItem(nWhich); + } + } + } + break; case SID_REMOVE_HYPERLINK: { if (!rSh.HasReadonlySel()) diff --git a/sw/uiconfig/sglobal/popupmenu/draw.xml b/sw/uiconfig/sglobal/popupmenu/draw.xml index fe8349419653..d94cc2f78a7b 100644 --- a/sw/uiconfig/sglobal/popupmenu/draw.xml +++ b/sw/uiconfig/sglobal/popupmenu/draw.xml @@ -72,6 +72,7 @@ <menu:menuitem menu:id=".uno:EnterGroup"/> <menu:menuitem menu:id=".uno:LeaveGroup"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/sglobal/popupmenu/drawtext.xml b/sw/uiconfig/sglobal/popupmenu/drawtext.xml index 07a09cccae9d..2562b93114b8 100644 --- a/sw/uiconfig/sglobal/popupmenu/drawtext.xml +++ b/sw/uiconfig/sglobal/popupmenu/drawtext.xml @@ -25,6 +25,7 @@ <menu:menuseparator/> <menu:menuitem menu:id=".uno:ThesaurusFromContext"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/sglobal/popupmenu/table.xml b/sw/uiconfig/sglobal/popupmenu/table.xml index aee5e19d5c1d..c999d65fc2e1 100644 --- a/sw/uiconfig/sglobal/popupmenu/table.xml +++ b/sw/uiconfig/sglobal/popupmenu/table.xml @@ -135,6 +135,7 @@ <menu:menuitem menu:id=".uno:IndexEntryDialog"/> <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/sglobal/popupmenu/text.xml b/sw/uiconfig/sglobal/popupmenu/text.xml index a9046d728686..b25c236ca141 100644 --- a/sw/uiconfig/sglobal/popupmenu/text.xml +++ b/sw/uiconfig/sglobal/popupmenu/text.xml @@ -83,6 +83,7 @@ <menu:menuitem menu:id=".uno:NextTrackedChange"/> <menu:menuitem menu:id=".uno:PreviousTrackedChange"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/sweb/popupmenu/table.xml b/sw/uiconfig/sweb/popupmenu/table.xml index 05b67ac1d72b..3ab405ecaad4 100644 --- a/sw/uiconfig/sweb/popupmenu/table.xml +++ b/sw/uiconfig/sweb/popupmenu/table.xml @@ -134,6 +134,7 @@ <menu:menuitem menu:id=".uno:IndexEntryDialog"/> <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/sweb/popupmenu/text.xml b/sw/uiconfig/sweb/popupmenu/text.xml index 209510f5fe6c..46e59aafdcab 100644 --- a/sw/uiconfig/sweb/popupmenu/text.xml +++ b/sw/uiconfig/sweb/popupmenu/text.xml @@ -82,6 +82,7 @@ <menu:menuitem menu:id=".uno:NextTrackedChange"/> <menu:menuitem menu:id=".uno:PreviousTrackedChange"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swform/popupmenu/draw.xml b/sw/uiconfig/swform/popupmenu/draw.xml index fe8349419653..d94cc2f78a7b 100644 --- a/sw/uiconfig/swform/popupmenu/draw.xml +++ b/sw/uiconfig/swform/popupmenu/draw.xml @@ -72,6 +72,7 @@ <menu:menuitem menu:id=".uno:EnterGroup"/> <menu:menuitem menu:id=".uno:LeaveGroup"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swform/popupmenu/drawtext.xml b/sw/uiconfig/swform/popupmenu/drawtext.xml index 07a09cccae9d..2562b93114b8 100644 --- a/sw/uiconfig/swform/popupmenu/drawtext.xml +++ b/sw/uiconfig/swform/popupmenu/drawtext.xml @@ -25,6 +25,7 @@ <menu:menuseparator/> <menu:menuitem menu:id=".uno:ThesaurusFromContext"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swform/popupmenu/table.xml b/sw/uiconfig/swform/popupmenu/table.xml index aee5e19d5c1d..c999d65fc2e1 100644 --- a/sw/uiconfig/swform/popupmenu/table.xml +++ b/sw/uiconfig/swform/popupmenu/table.xml @@ -135,6 +135,7 @@ <menu:menuitem menu:id=".uno:IndexEntryDialog"/> <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swform/popupmenu/text.xml b/sw/uiconfig/swform/popupmenu/text.xml index a9046d728686..b25c236ca141 100644 --- a/sw/uiconfig/swform/popupmenu/text.xml +++ b/sw/uiconfig/swform/popupmenu/text.xml @@ -83,6 +83,7 @@ <menu:menuitem menu:id=".uno:NextTrackedChange"/> <menu:menuitem menu:id=".uno:PreviousTrackedChange"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swreport/popupmenu/draw.xml b/sw/uiconfig/swreport/popupmenu/draw.xml index fe8349419653..d94cc2f78a7b 100644 --- a/sw/uiconfig/swreport/popupmenu/draw.xml +++ b/sw/uiconfig/swreport/popupmenu/draw.xml @@ -72,6 +72,7 @@ <menu:menuitem menu:id=".uno:EnterGroup"/> <menu:menuitem menu:id=".uno:LeaveGroup"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swreport/popupmenu/drawtext.xml b/sw/uiconfig/swreport/popupmenu/drawtext.xml index 07a09cccae9d..2562b93114b8 100644 --- a/sw/uiconfig/swreport/popupmenu/drawtext.xml +++ b/sw/uiconfig/swreport/popupmenu/drawtext.xml @@ -25,6 +25,7 @@ <menu:menuseparator/> <menu:menuitem menu:id=".uno:ThesaurusFromContext"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swreport/popupmenu/table.xml b/sw/uiconfig/swreport/popupmenu/table.xml index 11045d07129d..548db6b09222 100644 --- a/sw/uiconfig/swreport/popupmenu/table.xml +++ b/sw/uiconfig/swreport/popupmenu/table.xml @@ -84,6 +84,7 @@ <menu:menuitem menu:id=".uno:NextTrackedChange"/> <menu:menuitem menu:id=".uno:PreviousTrackedChange"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swreport/popupmenu/text.xml b/sw/uiconfig/swreport/popupmenu/text.xml index 1f4f5f040a2f..e2cd521ae916 100644 --- a/sw/uiconfig/swreport/popupmenu/text.xml +++ b/sw/uiconfig/swreport/popupmenu/text.xml @@ -47,6 +47,7 @@ <menu:menuitem menu:id=".uno:ResetAttributes"/> <menu:menuitem menu:id=".uno:EditStyle"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swriter/popupmenu/draw.xml b/sw/uiconfig/swriter/popupmenu/draw.xml index fe8349419653..d94cc2f78a7b 100644 --- a/sw/uiconfig/swriter/popupmenu/draw.xml +++ b/sw/uiconfig/swriter/popupmenu/draw.xml @@ -72,6 +72,7 @@ <menu:menuitem menu:id=".uno:EnterGroup"/> <menu:menuitem menu:id=".uno:LeaveGroup"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swriter/popupmenu/drawtext.xml b/sw/uiconfig/swriter/popupmenu/drawtext.xml index 07a09cccae9d..2562b93114b8 100644 --- a/sw/uiconfig/swriter/popupmenu/drawtext.xml +++ b/sw/uiconfig/swriter/popupmenu/drawtext.xml @@ -25,6 +25,7 @@ <menu:menuseparator/> <menu:menuitem menu:id=".uno:ThesaurusFromContext"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swriter/popupmenu/table.xml b/sw/uiconfig/swriter/popupmenu/table.xml index fc04ff6aadb5..360320bd9b1d 100644 --- a/sw/uiconfig/swriter/popupmenu/table.xml +++ b/sw/uiconfig/swriter/popupmenu/table.xml @@ -141,6 +141,7 @@ <menu:menuitem menu:id=".uno:IndexEntryDialog"/> <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swriter/popupmenu/text.xml b/sw/uiconfig/swriter/popupmenu/text.xml index effb85631b8e..50c7dc3dcf16 100644 --- a/sw/uiconfig/swriter/popupmenu/text.xml +++ b/sw/uiconfig/swriter/popupmenu/text.xml @@ -87,6 +87,7 @@ <menu:menuitem menu:id=".uno:NextTrackedChange"/> <menu:menuitem menu:id=".uno:PreviousTrackedChange"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swxform/popupmenu/draw.xml b/sw/uiconfig/swxform/popupmenu/draw.xml index fe8349419653..d94cc2f78a7b 100644 --- a/sw/uiconfig/swxform/popupmenu/draw.xml +++ b/sw/uiconfig/swxform/popupmenu/draw.xml @@ -72,6 +72,7 @@ <menu:menuitem menu:id=".uno:EnterGroup"/> <menu:menuitem menu:id=".uno:LeaveGroup"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swxform/popupmenu/drawtext.xml b/sw/uiconfig/swxform/popupmenu/drawtext.xml index 07a09cccae9d..2562b93114b8 100644 --- a/sw/uiconfig/swxform/popupmenu/drawtext.xml +++ b/sw/uiconfig/swxform/popupmenu/drawtext.xml @@ -25,6 +25,7 @@ <menu:menuseparator/> <menu:menuitem menu:id=".uno:ThesaurusFromContext"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swxform/popupmenu/table.xml b/sw/uiconfig/swxform/popupmenu/table.xml index aee5e19d5c1d..c999d65fc2e1 100644 --- a/sw/uiconfig/swxform/popupmenu/table.xml +++ b/sw/uiconfig/swxform/popupmenu/table.xml @@ -135,6 +135,7 @@ <menu:menuitem menu:id=".uno:IndexEntryDialog"/> <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/sw/uiconfig/swxform/popupmenu/text.xml b/sw/uiconfig/swxform/popupmenu/text.xml index b7a3a75d9c14..4f89f4c82ca4 100644 --- a/sw/uiconfig/swxform/popupmenu/text.xml +++ b/sw/uiconfig/swxform/popupmenu/text.xml @@ -82,6 +82,7 @@ <menu:menuitem menu:id=".uno:NextTrackedChange"/> <menu:menuitem menu:id=".uno:PreviousTrackedChange"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> <menu:menuitem menu:id=".uno:EditHyperlink"/> <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index 1766bc601b05..27649eb728c7 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -472,12 +472,10 @@ void SAL_CALL ContentResultSetWrapper::addVetoableChangeListener( const OUString return; impl_init_xPropertySetOrigin(aGuard); + if( !m_xPropertySetOrigin.is() ) { - if( !m_xPropertySetOrigin.is() ) - { - OSL_FAIL( "broadcaster was disposed already" ); - return; - } + OSL_FAIL( "broadcaster was disposed already" ); + return; } try { diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 7a5b910a073e..bd4a40777c80 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -342,22 +342,22 @@ void MountOperation::Completed(GObject *source, GAsyncResult *res, gpointer user GError *MountOperation::Mount(GFile *pFile) { g_file_mount_enclosing_volume(pFile, G_MOUNT_MOUNT_NONE, mpAuthentication, nullptr, MountOperation::Completed, this); + + //HACK: At least the gdk_threads_set_lock_functions(GdkThreadsEnter, + // GdkThreadsLeave) call in vcl/unx/gtk/app/gtkinst.cxx will lead to + // GdkThreadsLeave unlock the SolarMutex down to zero at the end of + // g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to + // the original value again: + if (comphelper::SolarMutex::get()->IsCurrentThread()) { - //HACK: At least the gdk_threads_set_lock_functions(GdkThreadsEnter, - // GdkThreadsLeave) call in vcl/unx/gtk/app/gtkinst.cxx will lead to - // GdkThreadsLeave unlock the SolarMutex down to zero at the end of - // g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to - // the original value again: - if (comphelper::SolarMutex::get()->IsCurrentThread()) - { - SolarMutexReleaser rel; - g_main_loop_run(mpLoop); - } - else - { - g_main_loop_run(mpLoop); - } + SolarMutexReleaser rel; + g_main_loop_run(mpLoop); } + else + { + g_main_loop_run(mpLoop); + } + return mpError; } diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index cf2dff7ff509..b665e1c65728 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -109,7 +109,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/accessibility/accessiblebrowseboxcell \ vcl/source/accessibility/accessibleiconchoicectrl \ vcl/source/accessibility/accessibleiconchoicectrlentry \ - vcl/source/accessibility/AccessibleIconView \ vcl/source/accessibility/accessiblelistbox \ vcl/source/accessibility/accessiblelistboxentry \ vcl/source/accessibility/accessiblemenubasecomponent \ diff --git a/vcl/backendtest/GraphicsRenderTests.cxx b/vcl/backendtest/GraphicsRenderTests.cxx index 2683541b15ea..6e0fe7ab1146 100644 --- a/vcl/backendtest/GraphicsRenderTests.cxx +++ b/vcl/backendtest/GraphicsRenderTests.cxx @@ -72,7 +72,6 @@ void exportBitmapExToImage(OUString const& rImageName, const BitmapEx& rBitmapEx SvFileStream aStream(rImageName, StreamMode::WRITE | StreamMode::TRUNC); GraphicFilter::GetGraphicFilter().compressAsPNG(aBitmapEx, aStream); } -bool is32bppSupported() { return ImplGetSVData()->mpDefInst->supportsBitmap32(); } // Some tests need special handling in drawing code (for example, not smoothscaling // when handling HiDPI bitmaps). Temporarily set up the test name to get such special @@ -1787,7 +1786,7 @@ void GraphicsRenderTests::testDrawBitmap32bpp() GraphicsTestZone zone(aTestName); vcl::test::OutputDeviceTestBitmap aOutDevTest; Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N32_BPP); - if (!SHOULD_ASSERT || !is32bppSupported()) + if (!SHOULD_ASSERT) { appendTestResult(aTestName, u"SKIPPED"_ustr); return; @@ -1809,7 +1808,7 @@ void GraphicsRenderTests::testDrawTransformedBitmap32bpp() GraphicsTestZone zone(aTestName); vcl::test::OutputDeviceTestBitmap aOutDevTest; Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N32_BPP); - if (!SHOULD_ASSERT || !is32bppSupported()) + if (!SHOULD_ASSERT) { appendTestResult(aTestName, u"SKIPPED"_ustr); return; @@ -1831,7 +1830,7 @@ void GraphicsRenderTests::testDrawBitmapExWithAlpha32bpp() GraphicsTestZone zone(aTestName); vcl::test::OutputDeviceTestBitmap aOutDevTest; Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N32_BPP); - if (!SHOULD_ASSERT || !is32bppSupported()) + if (!SHOULD_ASSERT) { appendTestResult(aTestName, u"SKIPPED"_ustr); return; @@ -1853,7 +1852,7 @@ void GraphicsRenderTests::testDrawMask32bpp() GraphicsTestZone zone(aTestName); vcl::test::OutputDeviceTestBitmap aOutDevTest; Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N32_BPP); - if (!SHOULD_ASSERT || !is32bppSupported()) + if (!SHOULD_ASSERT) { appendTestResult(aTestName, u"SKIPPED"_ustr); return; @@ -1874,7 +1873,7 @@ void GraphicsRenderTests::testDrawBlend32bpp() GraphicsTestZone zone(aTestName); vcl::test::OutputDeviceTestBitmap aOutDevTest; BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N32_BPP); - if (!SHOULD_ASSERT || !is32bppSupported()) + if (!SHOULD_ASSERT) { appendTestResult(aTestName, u"SKIPPED"_ustr); return; diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx index c8a55fd9478d..0a212f579291 100644 --- a/vcl/backendtest/outputdevice/common.cxx +++ b/vcl/backendtest/outputdevice/common.cxx @@ -1655,7 +1655,7 @@ TestResult OutputDeviceTestBitmap::checkBlend(const BitmapEx& rBitmapEx) std::vector<Color> aExpected { - COL_WHITE, COL_WHITE, COL_YELLOW, constBackgroundColor, + COL_BLACK, COL_BLACK, COL_YELLOW, constBackgroundColor, constBackgroundColor, aBlendedColor, constBackgroundColor }; Bitmap aBitmap(rBitmapEx.GetBitmap()); diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index ff5090b17079..d3323b9c3bcb 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -642,6 +642,27 @@ void CairoCommon::applyColor(cairo_t* cr, Color aColor, double fTransparency) } } +void CairoCommon::applyColor2(cairo_t* cr, Color aColor) +{ + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); + cairo_content_t eContentType = cairo_surface_get_content(cairo_get_target(cr)); + if (eContentType == CAIRO_CONTENT_COLOR_ALPHA) + { + cairo_set_source_rgba(cr, aColor.GetRed() / 255.0, aColor.GetGreen() / 255.0, + aColor.GetBlue() / 255.0, aColor.GetAlpha() / 255.0); + } + else if (eContentType == CAIRO_CONTENT_COLOR) + { + cairo_set_source_rgba(cr, aColor.GetRed() / 255.0, aColor.GetGreen() / 255.0, + aColor.GetBlue() / 255.0, 1.0); + } + else // CAIRO_CONTENT_ALPHA + { + double fSet = aColor == COL_BLACK ? 1.0 : 0.0; + cairo_set_source_rgba(cr, 1, 1, 1, fSet); + } +} + void CairoCommon::clipRegion(cairo_t* cr, const vcl::Region& rClipRegion) { RectangleVector aRectangles; @@ -713,7 +734,25 @@ void CairoCommon::drawPixel(const std::optional<Color>& rLineColor, tools::Long clipRegion(cr); cairo_rectangle(cr, nX, nY, 1, 1); - CairoCommon::applyColor(cr, *rLineColor, 0.0); + + cairo_content_t eContentType = cairo_surface_get_content(cairo_get_target(cr)); + if (eContentType == CAIRO_CONTENT_COLOR_ALPHA) + { + cairo_set_source_rgba(cr, rLineColor->GetRed() / 255.0, rLineColor->GetGreen() / 255.0, + rLineColor->GetBlue() / 255.0, rLineColor->GetAlpha() / 255.0); + } + else if (eContentType == CAIRO_CONTENT_COLOR) + { + cairo_set_source_rgba(cr, rLineColor->GetRed() / 255.0, rLineColor->GetGreen() / 255.0, + rLineColor->GetBlue() / 255.0, 1.0); + } + else // eContentType == CAIRO_CONTENT_ALPHA + { + double fSet = *rLineColor == COL_BLACK ? 1.0 : 0.0; + cairo_set_source_rgba(cr, 1, 1, 1, fSet); + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); + } + cairo_fill(cr); basegfx::B2DRange extents = getClippedFillDamage(cr); @@ -801,7 +840,6 @@ void CairoCommon::drawRect(double nX, double nY, double nWidth, double nHeight, // fast path for the common case of simply creating a solid block of color if (onlyFillRect(m_oFillColor, m_oLineColor)) { - double fTransparency = 0; // don't bother trying to draw stuff which is effectively invisible if (nWidth < 0.1 || nHeight < 0.1) return; @@ -820,7 +858,7 @@ void CairoCommon::drawRect(double nX, double nY, double nWidth, double nHeight, } cairo_rectangle(cr, nX, nY, nWidth, nHeight); - CairoCommon::applyColor(cr, *m_oFillColor, fTransparency); + CairoCommon::applyColor2(cr, *m_oFillColor); // Get FillDamage basegfx::B2DRange extents = getClippedFillDamage(cr); @@ -1876,14 +1914,15 @@ void CairoCommon::drawMask(const SalTwoRect& rTR, const SalBitmap& rSalBitmap, C } std::shared_ptr<SalBitmap> CairoCommon::getBitmap(tools::Long nX, tools::Long nY, - tools::Long nWidth, tools::Long nHeight) + tools::Long nWidth, tools::Long nHeight, + bool bWithoutAlpha) { std::shared_ptr<SvpSalBitmap> pBitmap = std::make_shared<SvpSalBitmap>(); BitmapPalette aPal; assert(GetBitCount() != 1 && "not supported anymore"); vcl::PixelFormat ePixelFormat = vcl::PixelFormat::N32_BPP; - if (!pBitmap->ImplCreate(Size(nWidth, nHeight), ePixelFormat, aPal, false)) + if (!pBitmap->ImplCreate(Size(nWidth, nHeight), ePixelFormat, aPal, false, bWithoutAlpha)) { SAL_WARN("vcl.gdi", "SvpSalGraphics::getBitmap, cannot create bitmap"); return nullptr; @@ -2023,8 +2062,8 @@ std::optional<BitmapBuffer> FastConvert24BitRgbTo32BitCairo(const BitmapBuffer* for (tools::Long x = 0; x < nWidth; ++x) { #if ENABLE_CAIRO_RGBA - static_assert(SVP_CAIRO_FORMAT == ScanlineFormat::N32BitTcRgbx, - "Expected SVP_CAIRO_FORMAT set to N32BitTcRgbx"); + static_assert(SVP_CAIRO_FORMAT == ScanlineFormat::N32BitTcRgba, + "Expected SVP_CAIRO_FORMAT set to N32BitTcRgba"); static_assert(SVP_24BIT_FORMAT == ScanlineFormat::N24BitTcRgb, "Expected SVP_24BIT_FORMAT set to N24BitTcRgb"); pD[0] = pS[0]; @@ -2032,8 +2071,8 @@ std::optional<BitmapBuffer> FastConvert24BitRgbTo32BitCairo(const BitmapBuffer* pD[2] = pS[2]; pD[3] = 0xff; // Alpha #elif defined OSL_BIGENDIAN - static_assert(SVP_CAIRO_FORMAT == ScanlineFormat::N32BitTcXrgb, - "Expected SVP_CAIRO_FORMAT set to N32BitTcXrgb"); + static_assert(SVP_CAIRO_FORMAT == ScanlineFormat::N32BitTcArgb, + "Expected SVP_CAIRO_FORMAT set to N32BitTcArgb"); static_assert(SVP_24BIT_FORMAT == ScanlineFormat::N24BitTcRgb, "Expected SVP_24BIT_FORMAT set to N24BitTcRgb"); pD[0] = 0xff; // Alpha @@ -2041,8 +2080,8 @@ std::optional<BitmapBuffer> FastConvert24BitRgbTo32BitCairo(const BitmapBuffer* pD[2] = pS[1]; pD[3] = pS[2]; #else - static_assert(SVP_CAIRO_FORMAT == ScanlineFormat::N32BitTcBgrx, - "Expected SVP_CAIRO_FORMAT set to N32BitTcBgrx"); + static_assert(SVP_CAIRO_FORMAT == ScanlineFormat::N32BitTcBgra, + "Expected SVP_CAIRO_FORMAT set to N32BitTcAgrx"); static_assert(SVP_24BIT_FORMAT == ScanlineFormat::N24BitTcBgr, "Expected SVP_24BIT_FORMAT set to N24BitTcBgr"); pD[0] = pS[0]; diff --git a/vcl/headless/SvpGraphicsBackend.cxx b/vcl/headless/SvpGraphicsBackend.cxx index 029e65820209..61f7454b7b66 100644 --- a/vcl/headless/SvpGraphicsBackend.cxx +++ b/vcl/headless/SvpGraphicsBackend.cxx @@ -182,9 +182,10 @@ void SvpGraphicsBackend::drawMask(const SalTwoRect& rTR, const SalBitmap& rSalBi } std::shared_ptr<SalBitmap> SvpGraphicsBackend::getBitmap(tools::Long nX, tools::Long nY, - tools::Long nWidth, tools::Long nHeight) + tools::Long nWidth, tools::Long nHeight, + bool bWithoutAlpha) { - return m_rCairoCommon.getBitmap(nX, nY, nWidth, nHeight); + return m_rCairoCommon.getBitmap(nX, nY, nWidth, nHeight, bWithoutAlpha); } void SvpGraphicsBackend::drawBitmapBuffer(const SalTwoRect& rTR, const BitmapBuffer* pBuffer, diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index 9066791db1f1..de034b2d4c7b 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -42,7 +42,8 @@ static std::optional<BitmapBuffer> ImplCreateDIB( const Size& rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette& rPal, - bool bClear) + bool bClear, + bool bWithoutAlpha) { if (!rSize.Width() || !rSize.Height()) return std::nullopt; @@ -58,7 +59,13 @@ static std::optional<BitmapBuffer> ImplCreateDIB( pDIB->meFormat = SVP_24BIT_FORMAT; break; case vcl::PixelFormat::N32_BPP: - pDIB->meFormat = SVP_CAIRO_FORMAT; +#if ENABLE_CAIRO_RGBA + pDIB->meFormat = bWithoutAlpha ? ScanlineFormat::N32BitTcRgbx : SVP_CAIRO_FORMAT; +#elif defined OSL_BIGENDIAN + pDIB->meFormat = bWithoutAlpha ? ScanlineFormat::N32BitTcXrgb : SVP_CAIRO_FORMAT; +#else + pDIB->meFormat = bWithoutAlpha ? ScanlineFormat::N32BitTcBgrx : SVP_CAIRO_FORMAT; +#endif break; case vcl::PixelFormat::INVALID: assert(false); @@ -132,10 +139,10 @@ void SvpSalBitmap::Create(const std::optional<BitmapBuffer>& pBuf) } bool SvpSalBitmap::ImplCreate(const Size& rSize, vcl::PixelFormat ePixelFormat, - const BitmapPalette& rPal, bool bClear) + const BitmapPalette& rPal, bool bClear, bool bWithoutAlpha) { Destroy(); - moDIB = ImplCreateDIB(rSize, ePixelFormat, rPal, bClear); + moDIB = ImplCreateDIB(rSize, ePixelFormat, rPal, bClear, bWithoutAlpha); return moDIB.has_value(); } diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 8d6fcd9288e9..8a2318db00db 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -199,12 +199,13 @@ void SvpSalInstance::DestroyObject( SalObject* pObject ) std::unique_ptr<SalVirtualDevice> SvpSalInstance::CreateVirtualDevice(SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat /*eFormat*/) + DeviceFormat /*eFormat*/, + bool bAlphaMaskTransparent) { SvpSalGraphics *pSvpSalGraphics = dynamic_cast<SvpSalGraphics*>(&rGraphics); assert(pSvpSalGraphics); std::unique_ptr<SalVirtualDevice> xNew(new SvpSalVirtualDevice(pSvpSalGraphics->getSurface(), /*pPreExistingTarget*/nullptr)); - if (!xNew->SetSize(nDX, nDY)) + if (!xNew->SetSize(nDX, nDY, bAlphaMaskTransparent)) xNew.reset(); return xNew; } @@ -227,7 +228,7 @@ std::unique_ptr<SalVirtualDevice> SvpSalInstance::CreateVirtualDevice(SalGraphic cairo_surface_t* pPreExistingTarget = nullptr; #endif std::unique_ptr<SalVirtualDevice> xNew(new SvpSalVirtualDevice(pSvpSalGraphics->getSurface(), pPreExistingTarget)); - if (!xNew->SetSize(nDX, nDY)) + if (!xNew->SetSize(nDX, nDY, /*bAlphaMaskTransparent*/false)) xNew.reset(); return xNew; } diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx index c9524aa65065..00b8014c9cb9 100644 --- a/vcl/headless/svpvd.cxx +++ b/vcl/headless/svpvd.cxx @@ -63,7 +63,7 @@ void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics ) delete pGraphics; } -bool SvpSalVirtualDevice::SetSize( tools::Long nNewDX, tools::Long nNewDY ) +bool SvpSalVirtualDevice::SetSize( tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent ) { if (nNewDX == 0) nNewDX = 1; @@ -78,7 +78,7 @@ bool SvpSalVirtualDevice::SetSize( tools::Long nNewDX, tools::Long nNewDY ) m_aFrameSize = basegfx::B2IVector(nNewDX, nNewDY); if (m_bOwnsSurface) - bSuccess = CreateSurface(nNewDX, nNewDY); + bSuccess = CreateSurface(nNewDX, nNewDY, bAlphaMaskTransparent); assert(m_pSurface); @@ -112,7 +112,7 @@ bool SvpSalVirtualDevice::CreateSurface(tools::Long nNewDX, tools::Long nNewDY, return cairo_surface_status(m_pSurface) == CAIRO_STATUS_SUCCESS; } -bool SvpSalVirtualDevice::CreateSurface(tools::Long nNewDX, tools::Long nNewDY) +bool SvpSalVirtualDevice::CreateSurface(tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent) { if (m_pSurface) { @@ -132,11 +132,25 @@ bool SvpSalVirtualDevice::CreateSurface(tools::Long nNewDX, tools::Long nNewDY) // in software (which should be fairly cheap for small surfaces anyway). m_pSurface = cairo_surface_create_similar_image(m_pRefSurface, CAIRO_FORMAT_ARGB32, nNewDX, nNewDY); dl_cairo_surface_set_device_scale(m_pSurface, fXScale, fYScale); + + cairo_t* cr = cairo_create(m_pSurface); + cairo_set_operator(cr, CAIRO_OPERATOR_OVER); + cairo_rectangle(cr, 0, 0, nNewDX, nNewDY); + cairo_set_source_rgba(cr, 0, 0, 0, bAlphaMaskTransparent ? 0 : 1); + cairo_fill(cr); + cairo_destroy(cr); } else { m_pSurface = cairo_surface_create_similar(m_pRefSurface, CAIRO_CONTENT_COLOR_ALPHA, nNewDX, nNewDY); // Device scale is inherited in this case. + + cairo_t* cr = cairo_create(m_pSurface); + cairo_set_operator(cr, CAIRO_OPERATOR_OVER); + cairo_rectangle(cr, 0, 0, nNewDX, nNewDY); + cairo_set_source_rgba(cr, 1, 1, 1, bAlphaMaskTransparent ? 0 : 1); + cairo_fill(cr); + cairo_destroy(cr); } SAL_WARN_IF(cairo_surface_status(m_pSurface) != CAIRO_STATUS_SUCCESS, "vcl", "surface of size " << nNewDX << " by " << nNewDY << " creation failed with status of: " << cairo_status_to_string(cairo_surface_status(m_pSurface))); diff --git a/vcl/inc/accessibility/accessibleiconchoicectrlentry.hxx b/vcl/inc/accessibility/accessibleiconchoicectrlentry.hxx index 7892a377bd4f..bdf630a6e88c 100644 --- a/vcl/inc/accessibility/accessibleiconchoicectrlentry.hxx +++ b/vcl/inc/accessibility/accessibleiconchoicectrlentry.hxx @@ -48,7 +48,6 @@ class AccessibleIconChoiceCtrlEntry final : public AccessibleIconChoiceCtrlEntry css::uno::Reference< css::accessibility::XAccessible > m_xParent; tools::Rectangle GetBoundingBox_Impl() const; - AbsoluteScreenPixelRectangle GetBoundingBoxOnScreen_Impl() const; bool IsAlive_Impl() const; bool IsShowing_Impl() const; diff --git a/vcl/inc/accessibility/accessiblelistboxentry.hxx b/vcl/inc/accessibility/accessiblelistboxentry.hxx index 148a5844959e..1520a8f4fe2f 100644 --- a/vcl/inc/accessibility/accessiblelistboxentry.hxx +++ b/vcl/inc/accessibility/accessiblelistboxentry.hxx @@ -57,13 +57,10 @@ private: unotools::WeakReference<AccessibleListBox> m_wListBox; tools::Rectangle GetBoundingBox_Impl() const; - bool IsAlive_Impl() const; bool IsShowing_Impl() const; /// @throws css::lang::IndexOutOfBoundsException void CheckActionIndex(sal_Int32 nIndex); - /// @throws css::lang::DisposedException - void EnsureIsAlive() const; /** this function is called upon disposing the component */ @@ -95,6 +92,8 @@ protected: virtual css::awt::Rectangle implGetBounds() override; private: + css::uno::Any SAL_CALL queryInterface(const css::uno::Type& rType) override; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; diff --git a/vcl/inc/headless/CairoCommon.hxx b/vcl/inc/headless/CairoCommon.hxx index 96630f39b681..b1423b7f6e03 100644 --- a/vcl/inc/headless/CairoCommon.hxx +++ b/vcl/inc/headless/CairoCommon.hxx @@ -152,6 +152,7 @@ struct VCL_DLLPUBLIC CairoCommon cairo_t* createTmpCompatibleCairoContext() const; static void applyColor(cairo_t* cr, Color rColor, double fTransparency = 0.0); + static void applyColor2(cairo_t* cr, Color rColor); void clipRegion(cairo_t* cr); static void clipRegion(cairo_t* cr, const vcl::Region& rClipRegion); @@ -224,7 +225,7 @@ struct VCL_DLLPUBLIC CairoCommon bool bAntiAlias); std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight); + tools::Long nHeight, bool bWithoutAlpha); static cairo_surface_t* createCairoSurface(const BitmapBuffer* pBuffer); diff --git a/vcl/inc/headless/SvpGraphicsBackend.hxx b/vcl/inc/headless/SvpGraphicsBackend.hxx index a631cb161e8b..28851fb0e112 100644 --- a/vcl/inc/headless/SvpGraphicsBackend.hxx +++ b/vcl/inc/headless/SvpGraphicsBackend.hxx @@ -93,7 +93,7 @@ public: Color nMaskColor) override; std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight) override; + tools::Long nHeight, bool bWithoutAlpha) override; Color getPixel(tools::Long nX, tools::Long nY) override; diff --git a/vcl/inc/headless/svpbmp.hxx b/vcl/inc/headless/svpbmp.hxx index e60f8ce91690..439f7e626189 100644 --- a/vcl/inc/headless/svpbmp.hxx +++ b/vcl/inc/headless/svpbmp.hxx @@ -35,7 +35,7 @@ public: SAL_DLLPRIVATE bool ImplCreate(const Size& rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette& rPalette, - bool bClear); + bool bClear, bool bWithoutAlpha = false); // SalBitmap SAL_DLLPRIVATE virtual bool Create(const Size& rSize, diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 2a420d15c80d..6cb7668e9d89 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -135,7 +135,8 @@ public: SAL_DLLPRIVATE virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) override; + DeviceFormat eFormat, + bool bAlphaMaskTransparent = false ) override; // VirtualDevice // nDX and nDY in Pixel diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx index 4bc796f32a60..44647dd7e122 100644 --- a/vcl/inc/headless/svpvd.hxx +++ b/vcl/inc/headless/svpvd.hxx @@ -36,7 +36,7 @@ class VCL_DLLPUBLIC SvpSalVirtualDevice : public SalVirtualDevice std::vector< SvpSalGraphics* > m_aGraphics; bool CreateSurface(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *const pBuffer); - bool CreateSurface(tools::Long nNewDX, tools::Long nNewDY); + bool CreateSurface(tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent = false); protected: SvpSalGraphics* AddGraphics(SvpSalGraphics* aGraphics); @@ -49,10 +49,9 @@ public: virtual SalGraphics* AcquireGraphics() override; virtual void ReleaseGraphics( SalGraphics* pGraphics ) override; - virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override; + virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent ) override; virtual bool SetSizeUsingBuffer( tools::Long nNewDX, tools::Long nNewDY, - sal_uInt8 * pBuffer - ) override; + sal_uInt8 * pBuffer) override; cairo_surface_t* GetSurface() const { return m_pSurface; } diff --git a/vcl/inc/iconview.hxx b/vcl/inc/iconview.hxx index e868629a1966..612cefaacebe 100644 --- a/vcl/inc/iconview.hxx +++ b/vcl/inc/iconview.hxx @@ -37,8 +37,6 @@ public: void PaintEntry(SvTreeListEntry&, tools::Long nX, tools::Long nY, vcl::RenderContext& rRenderContext); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; - virtual FactoryFunction GetUITestFactory() const override; virtual void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override; typedef std::tuple<OUString&, SvTreeListEntry*> encoded_image_query; diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index be76e9c54164..3fddebeddfe3 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -634,7 +634,7 @@ public: JSCheckButton(JSDialogSender* pSender, ::CheckBox* pCheckBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership); - virtual void set_active(bool active) override; + virtual void set_state(TriState eState) override; }; class JSDrawingArea final : public JSWidget<SalInstanceDrawingArea, VclDrawingArea> diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 443b370498f5..f6ef23541004 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -109,7 +109,8 @@ public: virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) override; + DeviceFormat eFormat, + bool bAlphaMaskTransparent = false ) override; virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long &nDX, tools::Long &nDY, diff --git a/vcl/inc/pdf/pdfbuildin_fonts.hxx b/vcl/inc/pdf/pdfbuildin_fonts.hxx index 76c30481498c..4cee28aab2fe 100644 --- a/vcl/inc/pdf/pdfbuildin_fonts.hxx +++ b/vcl/inc/pdf/pdfbuildin_fonts.hxx @@ -40,10 +40,8 @@ struct BuildinFont FontWeight const m_eWeight; FontItalic const m_eItalic; int const m_aWidths[256]; - mutable FontCharMapRef m_xFontCharMap; OString getNameObject() const; - const FontCharMapRef& GetFontCharMap() const; FontAttributes GetFontAttributes() const; }; @@ -59,6 +57,7 @@ class BuildinFontFace final : public vcl::font::PhysicalFontFace { static const BuildinFont m_aBuildinFonts[14]; const BuildinFont& mrBuildin; + mutable FontCharMapRef m_xFontCharMap; rtl::Reference<LogicalFontInstance> CreateFontInstance(const vcl::font::FontSelectPattern& rFSD) const override; @@ -68,7 +67,7 @@ public: const BuildinFont& GetBuildinFont() const { return mrBuildin; } sal_IntPtr GetFontId() const override { return reinterpret_cast<sal_IntPtr>(&mrBuildin); } - FontCharMapRef GetFontCharMap() const override { return mrBuildin.GetFontCharMap(); } + FontCharMapRef GetFontCharMap() const override; bool GetFontCapabilities(vcl::FontCapabilities&) const override { return false; } static const BuildinFont& Get(int nId) { return m_aBuildinFonts[nId]; } diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 26534a612936..ca46b5978a5e 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -178,8 +178,6 @@ namespace vcl sal_Int32 mnCurPage; sal_Int32 mnCachedPages; - bool mbCollateAlwaysOff; - std::vector<std::unique_ptr<weld::Widget>> maExtraControls; diff --git a/vcl/inc/qt5/QtGraphics.hxx b/vcl/inc/qt5/QtGraphics.hxx index 4c7deb5d3f68..898a0e3f9943 100644 --- a/vcl/inc/qt5/QtGraphics.hxx +++ b/vcl/inc/qt5/QtGraphics.hxx @@ -122,7 +122,7 @@ public: Color nMaskColor) override; std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight) override; + tools::Long nHeight, bool bWithoutAlpha) override; Color getPixel(tools::Long nX, tools::Long nY) override; diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx index 51308c6ede84..699c04139f06 100644 --- a/vcl/inc/qt5/QtInstance.hxx +++ b/vcl/inc/qt5/QtInstance.hxx @@ -159,9 +159,9 @@ public: bool bShow) override; virtual void DestroyObject(SalObject* pObject) override; - virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice(SalGraphics& rGraphics, - tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat) override; + virtual std::unique_ptr<SalVirtualDevice> + CreateVirtualDevice(SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, + DeviceFormat eFormat, bool bAlphaMaskTransparent = false) override; virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice(SalGraphics& rGraphics, tools::Long& nDX, tools::Long& nDY, diff --git a/vcl/inc/qt5/QtInstanceCheckButton.hxx b/vcl/inc/qt5/QtInstanceCheckButton.hxx index a929dfe5e465..ad4fbf2e0291 100644 --- a/vcl/inc/qt5/QtInstanceCheckButton.hxx +++ b/vcl/inc/qt5/QtInstanceCheckButton.hxx @@ -23,13 +23,9 @@ class QtInstanceCheckButton : public QtInstanceWidget, public virtual weld::Chec public: QtInstanceCheckButton(QCheckBox* pCheckBox); - // weld::Toggleable methods - virtual void set_active(bool bActive) override; - virtual bool get_active() const override; - virtual void set_inconsistent(bool bInconsistent) override; - virtual bool get_inconsistent() const override; + virtual void set_state(TriState eState) override; + virtual TriState get_state() const override; - // weld::CheckButton methods virtual void set_label(const OUString& rText) override; virtual OUString get_label() const override; virtual void set_label_wrap(bool bWrap) override; diff --git a/vcl/inc/qt5/QtInstanceDrawingArea.hxx b/vcl/inc/qt5/QtInstanceDrawingArea.hxx index 05c9676af2fd..97923a903e7c 100644 --- a/vcl/inc/qt5/QtInstanceDrawingArea.hxx +++ b/vcl/inc/qt5/QtInstanceDrawingArea.hxx @@ -11,6 +11,8 @@ #include "QtInstanceWidget.hxx" +#include <comphelper/OAccessible.hxx> + #include <QtWidgets/QLabel> class QtInstanceDrawingArea : public QtInstanceWidget, public virtual weld::DrawingArea @@ -19,9 +21,12 @@ class QtInstanceDrawingArea : public QtInstanceWidget, public virtual weld::Draw QLabel* m_pLabel; ScopedVclPtrInstance<VirtualDevice> m_xDevice; + const rtl::Reference<comphelper::OAccessible> m_pAccessible; public: - QtInstanceDrawingArea(QLabel* pLabel); + QtInstanceDrawingArea(QLabel* pLabel, + const rtl::Reference<comphelper::OAccessible>& rpAccessible); + virtual ~QtInstanceDrawingArea(); virtual void queue_draw() override; virtual void queue_draw_area(int x, int y, int width, int height) override; diff --git a/vcl/inc/qt5/QtInstanceTextView.hxx b/vcl/inc/qt5/QtInstanceTextView.hxx index 4fb8ca94c6c9..71279c82d37c 100644 --- a/vcl/inc/qt5/QtInstanceTextView.hxx +++ b/vcl/inc/qt5/QtInstanceTextView.hxx @@ -49,6 +49,10 @@ public: virtual int vadjustment_get_lower() const override; virtual int vadjustment_get_page_size() const override; virtual void vadjustment_set_value(int nValue) override; + +private Q_SLOTS: + void handleCursorPositionChanged(); + void handleTextChanged(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/inc/qt5/QtInstanceToggleButton.hxx b/vcl/inc/qt5/QtInstanceToggleButton.hxx index c7da7454f4d6..ca3c89a56239 100644 --- a/vcl/inc/qt5/QtInstanceToggleButton.hxx +++ b/vcl/inc/qt5/QtInstanceToggleButton.hxx @@ -23,9 +23,6 @@ public: virtual void set_active(bool bActive) override; virtual bool get_active() const override; - virtual void set_inconsistent(bool bInconsistent) override; - virtual bool get_inconsistent() const override; - private Q_SLOTS: void signalToggled(); }; diff --git a/vcl/inc/qt5/QtInstanceTreeView.hxx b/vcl/inc/qt5/QtInstanceTreeView.hxx index 7bc55cb8be6b..f30343885e59 100644 --- a/vcl/inc/qt5/QtInstanceTreeView.hxx +++ b/vcl/inc/qt5/QtInstanceTreeView.hxx @@ -213,8 +213,7 @@ private: QModelIndex firstTextColumnModelIndex(const weld::TreeIter& rIter) const; static QAbstractItemView::SelectionMode mapSelectionMode(SelectionMode eMode); - static Qt::CheckState toQtCheckState(TriState eTristate); - static TriState toVclTriState(Qt::CheckState eCheckState); + void setImage(const weld::TreeIter& rIter, const QPixmap& rPixmap, int nCol); private Q_SLOTS: void handleActivated(); diff --git a/vcl/inc/qt5/QtTools.hxx b/vcl/inc/qt5/QtTools.hxx index ca179c38c86a..ea35710bc9b6 100644 --- a/vcl/inc/qt5/QtTools.hxx +++ b/vcl/inc/qt5/QtTools.hxx @@ -97,6 +97,9 @@ inline QDate toQDate(const Date& rDate) inline Date toDate(const QDate& rDate) { return Date(rDate.day(), rDate.month(), rDate.year()); } +Qt::CheckState toQtCheckState(TriState eTristate); +TriState toVclTriState(Qt::CheckState eTristate); + Qt::DropActions toQtDropActions(sal_Int8 dragOperation); sal_Int8 toVclDropActions(Qt::DropActions dragOperation); sal_Int8 toVclDropAction(Qt::DropAction dragOperation); diff --git a/vcl/inc/qt5/QtVirtualDevice.hxx b/vcl/inc/qt5/QtVirtualDevice.hxx index f20b937d5488..50bea3155338 100644 --- a/vcl/inc/qt5/QtVirtualDevice.hxx +++ b/vcl/inc/qt5/QtVirtualDevice.hxx @@ -44,7 +44,8 @@ public: virtual SalGraphics* AcquireGraphics() override; virtual void ReleaseGraphics(SalGraphics* pGraphics) override; - virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY) override; + virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY, + bool bAlphaMaskTransparent) override; // SalGeometryProvider virtual tools::Long GetWidth() const override; diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 0b8e01b569ba..c3213832f5a7 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -146,13 +146,13 @@ struct AquaSharedAttributes bool checkContext(); void setState(); - bool isPenVisible() const + bool isPenActive() const { - return maLineColor.IsVisible(); + return maLineColor.IsActive(); } - bool isBrushVisible() const + bool isBrushActive() const { - return maFillColor.IsVisible(); + return maFillColor.IsActive(); } void refreshRect(float lX, float lY, float lWidth, float lHeight) @@ -331,7 +331,7 @@ public: Color nMaskColor) override; std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight) override; + tools::Long nHeight, bool bWithoutAlpha) override; Color getPixel(tools::Long nX, tools::Long nY) override; diff --git a/vcl/inc/quartz/salgdicommon.hxx b/vcl/inc/quartz/salgdicommon.hxx index 3cd0845b0671..b5d2ee58bc8b 100644 --- a/vcl/inc/quartz/salgdicommon.hxx +++ b/vcl/inc/quartz/salgdicommon.hxx @@ -39,7 +39,8 @@ public: RGBAColor( ::Color ); RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET const CGFloat* AsArray() const { return m_fRGBA; } - bool IsVisible() const { return m_fRGBA[3] > 0; } + bool IsActive() const { return m_bActive; } + void SetActive(bool b) { m_bActive = b; } void SetAlpha( float fAlpha ) { m_fRGBA[3] = fAlpha; } CGFloat GetRed() const { return m_fRGBA[0]; } @@ -47,6 +48,7 @@ public: CGFloat GetBlue() const { return m_fRGBA[2]; } CGFloat GetAlpha() const { return m_fRGBA[3]; } private: + bool m_bActive { true }; CGFloat m_fRGBA[4]; // red, green, blue, alpha }; @@ -55,7 +57,7 @@ inline RGBAColor::RGBAColor( ::Color nColor ) m_fRGBA[0] = nColor.GetRed() * (1.0/255); m_fRGBA[1] = nColor.GetGreen() * (1.0/255); m_fRGBA[2] = nColor.GetBlue() * (1.0/255); - m_fRGBA[3] = 1.0; // opaque + m_fRGBA[3] = nColor.GetAlpha() * (1.0/255); } inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ) diff --git a/vcl/inc/quartz/salvd.h b/vcl/inc/quartz/salvd.h index a489dc9662fa..a0ccdac64607 100644 --- a/vcl/inc/quartz/salvd.h +++ b/vcl/inc/quartz/salvd.h @@ -51,13 +51,13 @@ private: void Destroy(); public: - AquaSalVirtualDevice( AquaSalGraphics* pGraphic, tools::Long nDX, tools::Long nDY, DeviceFormat eFormat ); + AquaSalVirtualDevice( AquaSalGraphics* pGraphic, tools::Long nDX, tools::Long nDY, DeviceFormat eFormat, bool bAlphaMaskTransparent ); AquaSalVirtualDevice( tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData& rData ); virtual ~AquaSalVirtualDevice() override; virtual SalGraphics* AcquireGraphics() override; virtual void ReleaseGraphics( SalGraphics* pGraphics ) override; - virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override; + virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent ) override; tools::Long GetWidth() const override { diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index a1e6ba238e0b..4bd2f31d487b 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -274,7 +274,8 @@ public: SAL_DLLPRIVATE std::shared_ptr<SalBitmap> GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, - const OutputDevice& rOutDev ); + const OutputDevice& rOutDev, + bool bWithoutAlpha ); SAL_DLLPRIVATE Color GetPixel( tools::Long nX, tools::Long nY, @@ -497,7 +498,7 @@ protected: const SalBitmap& rSalBitmap, Color nMaskColor ) = 0; - virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0; + virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, bool bWithoutAlpha ) = 0; virtual Color getPixel( tools::Long nX, tools::Long nY ) = 0; @@ -812,9 +813,9 @@ public: GetImpl()->drawMask(rPosAry, rSalBitmap, nMaskColor); } - std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override + std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, bool bWithoutAlpha) override { - return GetImpl()->getBitmap(nX, nY, nWidth, nHeight); + return GetImpl()->getBitmap(nX, nY, nWidth, nHeight, bWithoutAlpha); } Color getPixel(tools::Long nX, tools::Long nY) override diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx index f656b68058c8..54578b480f29 100644 --- a/vcl/inc/salgdiimpl.hxx +++ b/vcl/inc/salgdiimpl.hxx @@ -163,7 +163,7 @@ public: const SalBitmap& rSalBitmap, Color nMaskColor ) = 0; - virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0; + virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, bool bWithoutAlpha ) = 0; virtual Color getPixel( tools::Long nX, tools::Long nY ) = 0; diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 15ef93c6236d..a31e09cd6530 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -82,14 +82,12 @@ private: css::uno::Reference<css::datatransfer::clipboard::XClipboard> m_clipboard; protected: - bool m_bSupportsBitmap32 = false; bool m_bSupportsOpenGL = false; public: SalInstance(std::unique_ptr<comphelper::SolarMutex> pMutex); virtual ~SalInstance(); - bool supportsBitmap32() const { return m_bSupportsBitmap32; } bool supportsOpenGL() const { return m_bSupportsOpenGL; } //called directly after Application::Init @@ -114,7 +112,8 @@ public: virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) = 0; + DeviceFormat eFormat, + bool bAlphaMaskTransparent = false ) = 0; // VirtualDevice // nDX and nDY in pixels diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx index 1f6bb9c201bd..390c2dfe6a7f 100644 --- a/vcl/inc/salvd.hxx +++ b/vcl/inc/salvd.hxx @@ -40,13 +40,13 @@ public: virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; // Set new size, without saving the old contents - virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) = 0; + virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent ) = 0; // Set new size using a buffer at the given address virtual bool SetSizeUsingBuffer( tools::Long /*nNewDX*/, tools::Long /*nNewDY*/, sal_uInt8 * /*pBuffer*/) { - // Only the headless virtual device has an implementation. + // Only the headless/svp virtual device has an implementation. assert(false && "unsupported"); return false; } diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 0934d4d06309..cd43bc4447c1 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1128,18 +1128,6 @@ public: virtual bool get_active() const override { return m_xToggleButton->IsChecked(); } - virtual void set_inconsistent(bool inconsistent) override - { - disable_notify_events(); - m_xToggleButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE); - enable_notify_events(); - } - - virtual bool get_inconsistent() const override - { - return m_xToggleButton->GetState() == TRISTATE_INDET; - } - virtual ~SalInstanceToggleButton() override { if (m_aToggleHdl.IsSet()) @@ -1253,13 +1241,9 @@ private: public: SalInstanceCheckButton(CheckBox* pButton, SalInstanceBuilder* pBuilder, bool bTakeOwnership); - virtual void set_active(bool active) override; - - virtual bool get_active() const override; + virtual void set_state(TriState eState) override; - virtual void set_inconsistent(bool inconsistent) override; - - virtual bool get_inconsistent() const override; + virtual TriState get_state() const override; virtual void set_label(const OUString& rText) override { SalInstanceButton::set_label(rText); } @@ -2071,10 +2055,6 @@ public: virtual bool get_active() const override; - virtual void set_inconsistent(bool /*inconsistent*/) override; - - virtual bool get_inconsistent() const override; - virtual void insert_item(int pos, const OUString& rId, const OUString& rStr, const OUString* pIconName, VirtualDevice* pImageSurface, TriState eCheckRadioFalse) override; diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx index 9389e8426f94..ff11958f30bc 100644 --- a/vcl/inc/skia/gdiimpl.hxx +++ b/vcl/inc/skia/gdiimpl.hxx @@ -139,7 +139,7 @@ public: Color nMaskColor) override; virtual std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight) override; + tools::Long nHeight, bool bWithoutAlpha) override; virtual Color getPixel(tools::Long nX, tools::Long nY) override; @@ -387,6 +387,8 @@ inline SkPaint SkiaSalGraphicsImpl::makePaintInternal() const SkiaHelper::setBlenderInvert(&paint); else if (mXorMode == XorMode::Xor) SkiaHelper::setBlenderXor(&paint); + else + paint.setBlendMode(SkBlendMode::kSrc); // set as is, including alpha return paint; } @@ -415,7 +417,19 @@ inline SkPaint SkiaSalGraphicsImpl::makeFillPaint(double transparency) const return paint; } -inline SkPaint SkiaSalGraphicsImpl::makeBitmapPaint() const { return makePaintInternal(); } +inline SkPaint SkiaSalGraphicsImpl::makeBitmapPaint() const +{ + SkPaint paint; + // Invert could be done using a blend mode like invert() does, but + // intentionally use SkBlender to make sure it's not overwritten + // by a blend mode set later (which would be probably a mistake), + // and so that the drawing color does not actually matter. + if (mXorMode == XorMode::Invert) + SkiaHelper::setBlenderInvert(&paint); + else if (mXorMode == XorMode::Xor) + SkiaHelper::setBlenderXor(&paint); + return paint; +} inline SkPaint SkiaSalGraphicsImpl::makeGradientPaint() const { return makePaintInternal(); } diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx index dd6225649c55..449516759d6d 100644 --- a/vcl/inc/skia/salbmp.hxx +++ b/vcl/inc/skia/salbmp.hxx @@ -32,7 +32,7 @@ class VCL_PLUGIN_PUBLIC SkiaSalBitmap final : public SalBitmap { public: SkiaSalBitmap(); - SkiaSalBitmap(const sk_sp<SkImage>& image); + SkiaSalBitmap(const sk_sp<SkImage>& image, bool bWithoutAlpha); virtual ~SkiaSalBitmap() override; // SalBitmap methods @@ -199,6 +199,7 @@ private: BitmapPalette mPalette; int mBitCount = 0; // bpp + bool m_bWithoutAlpha = false; Size mSize; // The contents of the bitmap may be stored in several different ways: // As mBuffer buffer, which normally stores pixels in the given format. diff --git a/vcl/inc/skia/x11/salvd.hxx b/vcl/inc/skia/x11/salvd.hxx index 1cb14d5de47a..fcdc2925b4ea 100644 --- a/vcl/inc/skia/x11/salvd.hxx +++ b/vcl/inc/skia/x11/salvd.hxx @@ -41,7 +41,8 @@ public: virtual void ReleaseGraphics(SalGraphics* pGraphics) override; // Set new size, without saving the old contents - virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY) override; + virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY, + bool bAlphaMaskTransparent) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index 3834768355c7..02528e12d699 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -248,7 +248,8 @@ public: virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics&, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) override; + DeviceFormat eFormat, + bool bAlphaMaskTransparent = false ) override; virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics&, tools::Long &nDX, tools::Long &nDY, diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index d5774a3494b2..fb7619801d08 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -70,7 +70,7 @@ public: void Init(X11SalFrame& rFrame, Drawable aDrawable, SalX11Screen nXScreen); void Init(X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = nullptr, - bool bDeleteColormap = false); + bool bDeleteColormap = false, bool bAlphaMaskTransparent = false); void Init( X11SkiaSalVirtualDevice *pVirtualDevice ); virtual SalGraphicsImpl* GetImpl() const override; diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h index 2d6deb0c76d1..9431ec6d86c5 100644 --- a/vcl/inc/unx/salinst.h +++ b/vcl/inc/unx/salinst.h @@ -51,14 +51,16 @@ public: /// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics. static std::unique_ptr<SalVirtualDevice> CreateX11VirtualDevice(const SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat, std::unique_ptr<X11SalGraphics> pNewGraphics); + DeviceFormat eFormat, std::unique_ptr<X11SalGraphics> pNewGraphics, + bool bAlphaMaskTransparent); static std::unique_ptr<SalVirtualDevice> CreateX11VirtualDevice(const SalGraphics& rGraphics, tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData& rData, std::unique_ptr<X11SalGraphics> pNewGraphics); virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) override; + DeviceFormat eFormat, + bool bAlphaMaskTransparent = false ) override; virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long &nDX, tools::Long &nDY, diff --git a/vcl/inc/unx/salvd.h b/vcl/inc/unx/salvd.h index 268ce719fbe4..a0cfb1b30105 100644 --- a/vcl/inc/unx/salvd.h +++ b/vcl/inc/unx/salvd.h @@ -73,7 +73,7 @@ public: virtual void ReleaseGraphics( SalGraphics* pGraphics ) override; /// Set new size, without saving the old contents - virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override; + virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent ) override; // SalGeometryProvider virtual tools::Long GetWidth() const override { return nDX_; } diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 65988c2867d4..2423af293539 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -262,7 +262,7 @@ protected: const SalBitmap& rSalBitmap, Color nMaskColor ) override; - virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override; + virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, bool bWithoutAlpha ) override; virtual Color getPixel( tools::Long nX, tools::Long nY ) override; // invert --> ClipRegion (only Windows or VirDevs) diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index a603aa7fcef0..0a0f133df89e 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -52,7 +52,8 @@ public: virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) override; + DeviceFormat eFormat, + bool bAlphaMaskTransparent = false ) override; virtual std::unique_ptr<SalVirtualDevice> CreateVirtualDevice( SalGraphics& rGraphics, tools::Long &nDX, tools::Long &nDY, diff --git a/vcl/inc/win/salvd.h b/vcl/inc/win/salvd.h index 530fe4fb4cad..564a468c86d8 100644 --- a/vcl/inc/win/salvd.h +++ b/vcl/inc/win/salvd.h @@ -54,9 +54,10 @@ public: virtual SalGraphics* AcquireGraphics() override; virtual void ReleaseGraphics( SalGraphics* pGraphics ) override; - virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override; + virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent ) override; - static HBITMAP ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, tools::Long nDY, sal_uInt16 nBitCount, void **ppDummy); + static HBITMAP ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, tools::Long nDY, sal_uInt16 nBitCount, + void **ppDummy, bool bAlphaMaskTransparent = false); // SalGeometryProvider virtual tools::Long GetWidth() const override { return mnWidth; } diff --git a/vcl/inc/windowdev.hxx b/vcl/inc/windowdev.hxx index 013cfbc69cd0..13522ae0fe23 100644 --- a/vcl/inc/windowdev.hxx +++ b/vcl/inc/windowdev.hxx @@ -62,6 +62,8 @@ public: virtual css::uno::Reference<css::rendering::XCanvas> ImplGetCanvas(bool bSpriteCanvas) const override; + virtual bool HasAlpha() const override { return true; } + private: virtual void InitClipRegion() override; diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 4a21a7d05478..530a21e5ad5c 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -155,6 +155,7 @@ constexpr auto ScalcDialogList { u"modules/scalc/ui/formatcellsdialog.ui" }, { u"modules/scalc/ui/fourieranalysisdialog.ui" }, { u"modules/scalc/ui/goalseekdlg.ui" }, + { u"modules/scalc/ui/gotosheetdialog.ui" }, { u"modules/scalc/ui/groupdialog.ui" }, { u"modules/scalc/ui/headerfootercontent.ui" }, { u"modules/scalc/ui/headerfooterdialog.ui" }, diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 67afbc73ec82..a629101a84e9 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -740,7 +740,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, const Str if (sAction == "change") { bool bChecked = rData.at(u"data"_ustr) == "true"; - pRadioButton->set_state(bChecked ? TRISTATE_TRUE : TRISTATE_FALSE); + pRadioButton->set_active(bChecked); LOKTrigger::trigger_toggled(*static_cast<weld::Toggleable*>(pRadioButton)); return true; } diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index c5414e70a615..cffd42128252 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1554,11 +1554,11 @@ JSCheckButton::JSCheckButton(JSDialogSender* pSender, ::CheckBox* pCheckBox, { } -void JSCheckButton::set_active(bool active) +void JSCheckButton::set_state(TriState eState) { - bool bWasActive = get_active(); - SalInstanceCheckButton::set_active(active); - if (bWasActive != active) + TriState eOldState = get_state(); + SalInstanceCheckButton::set_state(eState); + if (eOldState != eState) sendUpdate(); } diff --git a/vcl/osx/salmacos.cxx b/vcl/osx/salmacos.cxx index 14e2a80695d9..ce2a12d82095 100644 --- a/vcl/osx/salmacos.cxx +++ b/vcl/osx/salmacos.cxx @@ -126,7 +126,8 @@ void AquaGraphicsBackend::copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcG mrShared.applyXorContext(); pSrcShared->applyXorContext(); std::shared_ptr<SalBitmap> pBitmap = pSrcGraphics->GetImpl()->getBitmap(rPosAry.mnSrcX, rPosAry.mnSrcY, - rPosAry.mnSrcWidth, rPosAry.mnSrcHeight); + rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, + /*bWithoutAlpha*/false); if (pBitmap) { SalTwoRect aPosAry(rPosAry); @@ -460,7 +461,7 @@ void AquaSalVirtualDevice::Destroy() } } -bool AquaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY) +bool AquaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY, bool bAlphaMaskTransparent) { SAL_INFO("vcl.virdev", "AquaSalVirtualDevice::SetSize() this=" << this << " (" << nDX << "x" << nDY << ") mbForeignContext=" << (mbForeignContext ? "YES" : "NO")); @@ -504,7 +505,7 @@ bool AquaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY) mnBitmapDepth = 32; aColorSpace = GetSalData()->mxRGBSpace; - nFlags = uint32_t(kCGImageAlphaNoneSkipFirst) | uint32_t(kCGBitmapByteOrder32Host); + nFlags = uint32_t(kCGImageAlphaPremultipliedFirst) | uint32_t(kCGBitmapByteOrder32Host); } if (SkiaHelper::isVCLSkiaEnabled()) @@ -520,6 +521,24 @@ bool AquaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY) size_t nBytesPerRow = mnBitmapDepth * nScaledWidth / 8; maBitmapContext.set(CGBitmapContextCreate(nullptr, nScaledWidth, nScaledHeight, 8, nBytesPerRow, aColorSpace, nFlags)); + if (mnBitmapDepth == 32) + { + if (bAlphaMaskTransparent) + { + CGColorRef transparentCol = CGColorCreateGenericRGB(0, 0, 0, 0); + CGContextSetFillColorWithColor(maBitmapContext.get(), transparentCol); + CGContextFillRect(maBitmapContext.get(), CGRectMake(0, 0, nScaledWidth, nScaledHeight)); + CGColorRelease(transparentCol); + } + else + { + CGColorRef opaqueCol = CGColorCreateGenericRGB(0, 0, 0, 1.0); + CGContextSetFillColorWithColor(maBitmapContext.get(), opaqueCol); + CGContextFillRect(maBitmapContext.get(), CGRectMake(0, 0, nScaledWidth, nScaledHeight)); + CGColorRelease(opaqueCol); + } + } + SAL_INFO("vcl.virdev", "AquaSalVirtualDevice::SetSize() this=" << this << " fScale=" << fScale << " mnBitmapDepth=" << mnBitmapDepth); diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx index 4c2ae7cfcfd7..d26248151fb7 100644 --- a/vcl/qa/cppunit/BackendTest.cxx +++ b/vcl/qa/cppunit/BackendTest.cxx @@ -61,8 +61,6 @@ class BackendTest : public test::BootstrapFixture } } - bool is32bppSupported() { return ImplGetSVData()->mpDefInst->supportsBitmap32(); } - public: BackendTest() : BootstrapFixture(true, false) @@ -543,7 +541,7 @@ public: Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N32_BPP); exportImage(u"09-01_bitmap_test_32bpp.png"_ustr, aBitmap); auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap); - if (SHOULD_ASSERT && is32bppSupported()) + if (SHOULD_ASSERT) CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); } @@ -555,7 +553,7 @@ public: Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N32_BPP); auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap); exportImage(u"09-02_transformed_bitmap_test_32bpp.png"_ustr, aBitmap); - if (SHOULD_ASSERT && is32bppSupported()) + if (SHOULD_ASSERT) CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); } @@ -567,7 +565,7 @@ public: Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N32_BPP); auto eResult = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap); exportImage(u"09-03_bitmapex_with_alpha_test_32bpp.png"_ustr, aBitmap); - if (SHOULD_ASSERT && is32bppSupported()) + if (SHOULD_ASSERT) CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); } @@ -579,7 +577,7 @@ public: Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N32_BPP); auto eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap); exportImage(u"09-04_mask_test_32bpp.png"_ustr, aBitmap); - if (SHOULD_ASSERT && is32bppSupported()) + if (SHOULD_ASSERT) CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); } @@ -591,7 +589,7 @@ public: BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N32_BPP); auto eResult = vcl::test::OutputDeviceTestBitmap::checkBlend(aBitmapEx); exportImage(u"09-05_blend_test_32bpp.png"_ustr, aBitmapEx); - if (SHOULD_ASSERT && is32bppSupported()) + if (SHOULD_ASSERT) CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); } diff --git a/vcl/qa/cppunit/BitmapExTest.cxx b/vcl/qa/cppunit/BitmapExTest.cxx index 56b91afe5049..517d7574accf 100644 --- a/vcl/qa/cppunit/BitmapExTest.cxx +++ b/vcl/qa/cppunit/BitmapExTest.cxx @@ -58,11 +58,6 @@ void BitmapExTest::testGetPixelColor24_8() void BitmapExTest::testGetPixelColor32() { - // Check backend capabilities and return from the test successfully - // if the backend doesn't support 32-bit bitmap - if (!ImplGetSVData()->mpDefInst->supportsBitmap32()) - return; - Bitmap aBitmap(Size(3, 3), vcl::PixelFormat::N32_BPP); { BitmapScopedWriteAccess pWriteAccess(aBitmap); diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 0534718ed14b..f280ed05f3ba 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -115,8 +115,6 @@ void BitmapTest::testCreation() } // Check backend capabilities and return from the test successfully - // if the backend doesn't support 32-bit bitmap - if (ImplGetSVData()->mpDefInst->supportsBitmap32()) { Bitmap aBmp(Size(10, 10), vcl::PixelFormat::N32_BPP); Size aSize = aBmp.GetSizePixel(); @@ -482,11 +480,6 @@ void BitmapTest::testErase() void BitmapTest::testBitmap32() { - // Check backend capabilities and return from the test successfully - // if the backend doesn't support 32-bit bitmap - if (!ImplGetSVData()->mpDefInst->supportsBitmap32()) - return; - Bitmap aBitmap(Size(3, 3), vcl::PixelFormat::N32_BPP); { BitmapScopedWriteAccess pWriteAccess(aBitmap); diff --git a/vcl/qa/cppunit/animationrenderer.cxx b/vcl/qa/cppunit/animationrenderer.cxx index aa5edcc5dff2..b6f0b53dd249 100644 --- a/vcl/qa/cppunit/animationrenderer.cxx +++ b/vcl/qa/cppunit/animationrenderer.cxx @@ -31,6 +31,7 @@ public: void ReleaseGraphics(bool) override {} bool UsePolyPolygonForComplexGradient() override { return false; } bool CanAnimate() const override { return false; } + virtual bool HasAlpha() const override { return false; } }; Animation createAnimation() diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx index 4ec0e62527d5..65e0db417084 100644 --- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx +++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx @@ -146,17 +146,9 @@ void BitmapRenderTest::testDrawAlphaBitmapEx() BitmapEx aBitmapEx; aPngReader.read(aBitmapEx); - // Check backend capabilities, if the backend support 32-bit bitmap - if (ImplGetSVData()->mpDefInst->supportsBitmap32()) - { - CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N32_BPP, aBitmapEx.GetBitmap().getPixelFormat()); - } - else - { - CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N24_BPP, aBitmapEx.GetBitmap().getPixelFormat()); - CPPUNIT_ASSERT_EQUAL(true, aBitmapEx.IsAlpha()); - CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N8_BPP, aBitmapEx.GetAlphaMask().getPixelFormat()); - } + CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N24_BPP, aBitmapEx.GetBitmap().getPixelFormat()); + CPPUNIT_ASSERT_EQUAL(true, aBitmapEx.IsAlpha()); + CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N8_BPP, aBitmapEx.GetAlphaMask().getPixelFormat()); // Check the bitmap has pixels we expect CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0xFF, 0x00, 0x00, 0x00), @@ -190,15 +182,21 @@ void BitmapRenderTest::testAlphaVirtualDevice() // Set it up pAlphaVirtualDevice->SetOutputSizePixel(Size(4, 4)); + CPPUNIT_ASSERT_EQUAL(Color(ColorAlpha, 0xff, 0xff, 0xff, 0xff), + pAlphaVirtualDevice->GetPixel(Point(1, 1))); pAlphaVirtualDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); pAlphaVirtualDevice->Erase(); + // the backends use pre-multipled alpha, so pure transparency does not round-trip properly + CPPUNIT_ASSERT_EQUAL(Color(ColorAlpha, 0x00, 0x00, 0x00, 0x00), + pAlphaVirtualDevice->GetPixel(Point(1, 1))); // Get a BitmapEx from the VirDev -> Colors should have alpha BitmapEx aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4)); CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width()); CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height()); Color aColor = aBitmap.GetPixelColor(1, 1); - CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, aColor); + // the backends use pre-multipled alpha, so pure transparency does not round-trip properly + CPPUNIT_ASSERT_EQUAL(Color(ColorAlpha, 0x00, 0x00, 0x00, 0x00), aColor); // Draw an opaque pixel to the VirDev pAlphaVirtualDevice->DrawPixel(Point(1, 1), Color(0x0022ff55)); diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index d0cb54376728..82972b64e6cc 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -890,6 +890,7 @@ public: void ReleaseGraphics(bool) override {} bool UsePolyPolygonForComplexGradient() override { return false; } bool CanAnimate() const override { return false; } + virtual bool HasAlpha() const override { return false; } bool testShouldDrawWavePixelAsRect(tools::Long nLineWidth) { diff --git a/vcl/qa/cppunit/skia/skia.cxx b/vcl/qa/cppunit/skia/skia.cxx index fbe3899cb4f8..bb40421f5df5 100644 --- a/vcl/qa/cppunit/skia/skia.cxx +++ b/vcl/qa/cppunit/skia/skia.cxx @@ -365,7 +365,7 @@ void SkiaTest::testDelayedScale() CPPUNIT_ASSERT_EQUAL(tools::Long(20), buffer1->mnHeight); skiaBitmap1->ReleaseBuffer(buffer1, BitmapAccessMode::Read); // Do scaling based on mImage. - SkiaSalBitmap skiaBitmap2(skiaBitmap1->GetSkImage()); + SkiaSalBitmap skiaBitmap2(skiaBitmap1->GetSkImage(), /*bWithoutAlpha*/ false); CPPUNIT_ASSERT(!skiaBitmap2.unittestHasBuffer()); CPPUNIT_ASSERT(skiaBitmap2.unittestHasImage()); CPPUNIT_ASSERT(skiaBitmap2.Scale(2, 3, BmpScaleFlag::Default)); @@ -388,7 +388,7 @@ void SkiaTest::testDelayedScaleAlphaImage() CPPUNIT_ASSERT(bitmapTmp->Create(Size(10, 10), vcl::PixelFormat::N24_BPP, BitmapPalette())); bitmapTmp->Erase(COL_RED); // Create a bitmap that has only an image, not a pixel buffer. - SkiaSalBitmap bitmap(bitmapTmp->GetSkImage()); + SkiaSalBitmap bitmap(bitmapTmp->GetSkImage(), /*bWithoutAlpha*/ false); bitmapTmp.release(); CPPUNIT_ASSERT(!bitmap.unittestHasBuffer()); CPPUNIT_ASSERT(bitmap.unittestHasImage()); diff --git a/vcl/qt5/QtBitmap.cxx b/vcl/qt5/QtBitmap.cxx index a69ee562046b..9bf28b1492cc 100644 --- a/vcl/qt5/QtBitmap.cxx +++ b/vcl/qt5/QtBitmap.cxx @@ -136,13 +136,9 @@ BitmapBuffer* QtBitmap::AcquireBuffer(BitmapAccessMode /*nMode*/) case 32: { #ifdef OSL_BIGENDIAN - pBuffer->meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32() - ? ScanlineFormat::N32BitTcArgb - : ScanlineFormat::N32BitTcXrgb; + pBuffer->meFormat = ScanlineFormat::N32BitTcArgb; #else - pBuffer->meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32() - ? ScanlineFormat::N32BitTcBgra - : ScanlineFormat::N32BitTcBgrx; + pBuffer->meFormat = ScanlineFormat::N32BitTcBgra; #endif pBuffer->maPalette = aEmptyPalette; break; diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 0aa9a415083b..27b9e1f0b6b0 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -347,6 +347,12 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: setScaleProperties(*pSlider, rMap); pObject = pSlider; } + else if (sName == u"GtkSeparatorToolItem") + { + QToolBar* pToolBar = qobject_cast<QToolBar*>(pParentWidget); + assert(pToolBar && "GtkSeparatorToolItem doesn't have a toolbar parent"); + pToolBar->addSeparator(); + } else if (sName == u"GtkSpinButton") { QtDoubleSpinBox* pSpinBox = new QtDoubleSpinBox(pParentWidget); @@ -369,7 +375,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: { pObject = new QToolBar(pParentWidget); } - else if (sName == u"GtkToolButton") + else if (sName == u"GtkToggleToolButton" || sName == u"GtkToolButton") { QToolButton* pToolButton = new QToolButton(pParentWidget); const OUString sIconName = extractIconName(rMap); @@ -379,6 +385,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: pToolButton->setIcon(toQPixmap(aImage)); } pToolButton->setText(toQString(extractLabel(rMap))); + pToolButton->setCheckable(sName == u"GtkToggleToolButton"); pObject = pToolButton; } else if (sName == u"GtkTreeView") diff --git a/vcl/qt5/QtGraphics_GDI.cxx b/vcl/qt5/QtGraphics_GDI.cxx index 4cc10454ce6b..70a78086545f 100644 --- a/vcl/qt5/QtGraphics_GDI.cxx +++ b/vcl/qt5/QtGraphics_GDI.cxx @@ -523,8 +523,11 @@ void QtGraphicsBackend::drawMask(const SalTwoRect& rPosAry, const SalBitmap& /*r } std::shared_ptr<SalBitmap> QtGraphicsBackend::getBitmap(tools::Long nX, tools::Long nY, - tools::Long nWidth, tools::Long nHeight) + tools::Long nWidth, tools::Long nHeight, + bool bWithoutAlpha) { + assert(!bWithoutAlpha && "not supported here"); + (void)bWithoutAlpha; return std::make_shared<QtBitmap>(m_pQImage->copy(nX, nY, nWidth, nHeight)); } diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx index cb65d7b3e974..ed37179fb471 100644 --- a/vcl/qt5/QtInstance.cxx +++ b/vcl/qt5/QtInstance.cxx @@ -404,7 +404,8 @@ void QtInstance::DestroyObject(SalObject* pObject) std::unique_ptr<SalVirtualDevice> QtInstance::CreateVirtualDevice(SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat /*eFormat*/) + DeviceFormat /*eFormat*/, + bool bAlphaMaskTransparent) { if (m_bUseCairo) { @@ -413,13 +414,13 @@ std::unique_ptr<SalVirtualDevice> QtInstance::CreateVirtualDevice(SalGraphics& r // tdf#127529 see SvpSalInstance::CreateVirtualDevice for the rare case of a non-null pPreExistingTarget std::unique_ptr<SalVirtualDevice> pVD( new QtSvpVirtualDevice(pSvpSalGraphics->getSurface(), /*pPreExistingTarget*/ nullptr)); - pVD->SetSize(nDX, nDY); + pVD->SetSize(nDX, nDY, bAlphaMaskTransparent); return pVD; } else { std::unique_ptr<SalVirtualDevice> pVD(new QtVirtualDevice(/*scale*/ 1)); - pVD->SetSize(nDX, nDY); + pVD->SetSize(nDX, nDY, bAlphaMaskTransparent); return pVD; } } @@ -436,13 +437,13 @@ QtInstance::CreateVirtualDevice(SalGraphics& rGraphics, tools::Long& nDX, tools: cairo_surface_t* pPreExistingTarget = static_cast<cairo_surface_t*>(rGd.pSurface); std::unique_ptr<SalVirtualDevice> pVD( new QtSvpVirtualDevice(pSvpSalGraphics->getSurface(), pPreExistingTarget)); - pVD->SetSize(nDX, nDY); + pVD->SetSize(nDX, nDY, /*bAlphaMaskTransparent*/ false); return pVD; } else { std::unique_ptr<SalVirtualDevice> pVD(new QtVirtualDevice(/*scale*/ 1)); - pVD->SetSize(nDX, nDY); + pVD->SetSize(nDX, nDY, /*bAlphaMaskTransparent*/ false); return pVD; } } diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index cb3152723404..1c6a9de644fb 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -11,7 +11,6 @@ #include <unordered_set> -#include <QtAccessibleWidget.hxx> #include <QtBuilder.hxx> #include <QtInstanceAssistant.hxx> #include <QtInstanceBox.hxx> @@ -80,6 +79,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"cui/ui/optnewdictionarydialog.ui"_ustr, u"cui/ui/password.ui"_ustr, u"cui/ui/pastespecial.ui"_ustr, + u"cui/ui/positionsizedialog.ui"_ustr, u"cui/ui/querydeletedictionarydialog.ui"_ustr, u"cui/ui/qrcodegen.ui"_ustr, u"cui/ui/querydialog.ui"_ustr, @@ -89,6 +89,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"cui/ui/similaritysearchdialog.ui"_ustr, u"cui/ui/spelloptionsdialog.ui"_ustr, u"cui/ui/splitcellsdialog.ui"_ustr, + u"cui/ui/textdialog.ui"_ustr, u"cui/ui/tipofthedaydialog.ui"_ustr, u"cui/ui/toolbartabpage.ui"_ustr, u"cui/ui/uipickerdialog.ui"_ustr, @@ -105,6 +106,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"filter/ui/xsltfilterdialog.ui"_ustr, u"modules/BasicIDE/ui/gotolinedialog.ui"_ustr, u"modules/BasicIDE/ui/newlibdialog.ui"_ustr, + u"modules/scalc/ui/gotosheetdialog.ui"_ustr, u"modules/scalc/ui/groupbydate.ui"_ustr, u"modules/scalc/ui/inputstringdialog.ui"_ustr, u"modules/scalc/ui/insertcells.ui"_ustr, @@ -145,6 +147,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"sfx/ui/printeroptionsdialog.ui"_ustr, u"sfx/ui/querysavedialog.ui"_ustr, u"sfx/ui/safemodequerydialog.ui"_ustr, + u"sfx/ui/templatecategorydlg.ui"_ustr, u"svt/ui/addresstemplatedialog.ui"_ustr, u"svt/ui/printersetupdialog.ui"_ustr, u"svt/ui/restartdialog.ui"_ustr, @@ -167,11 +170,12 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"writerperfect/ui/exportepub.ui"_ustr, }; - // These UI files are used in multiple places and only supported within - // native Qt dialogs/widgets + // These UI files are only supported inside native Qt dialogs/widgets static std::unordered_set<OUString> aSupportedWithQtParent = { - u"cui/ui/appearance.ui"_ustr, - u"svt/ui/datewindow.ui"_ustr, + u"cui/ui/appearance.ui"_ustr, u"cui/ui/possizetabpage.ui"_ustr, + u"cui/ui/rotationtabpage.ui"_ustr, u"cui/ui/slantcornertabpage.ui"_ustr, + u"cui/ui/textattrtabpage.ui"_ustr, u"cui/ui/textanimtabpage.ui"_ustr, + u"cui/ui/textcolumnstabpage.ui"_ustr, u"svt/ui/datewindow.ui"_ustr, }; if (aSupportedUIFiles.contains(rUIFile)) @@ -618,10 +622,7 @@ QtInstanceBuilder::weld_drawing_area(const OUString& rId, if (!pLabel) return; - if (rA11yImpl.is()) - QtAccessibleWidget::setCustomAccessible(*pLabel, rA11yImpl); - - xRet = std::make_unique<QtInstanceDrawingArea>(pLabel); + xRet = std::make_unique<QtInstanceDrawingArea>(pLabel, rA11yImpl); }); return xRet; } diff --git a/vcl/qt5/QtInstanceCheckButton.cxx b/vcl/qt5/QtInstanceCheckButton.cxx index 1a5e63408de7..cdd5fb3e4571 100644 --- a/vcl/qt5/QtInstanceCheckButton.cxx +++ b/vcl/qt5/QtInstanceCheckButton.cxx @@ -20,51 +20,35 @@ QtInstanceCheckButton::QtInstanceCheckButton(QCheckBox* pCheckBox) connect(m_pCheckBox, &QCheckBox::toggled, this, &QtInstanceCheckButton::handleToggled); } -void QtInstanceCheckButton::set_active(bool bActive) +void QtInstanceCheckButton::set_state(TriState eState) { SolarMutexGuard g; GetQtInstance().RunInMainThread([&] { - m_pCheckBox->setTristate(false); - m_pCheckBox->setChecked(bActive); + m_pCheckBox->setTristate(eState == TRISTATE_INDET); + m_pCheckBox->setCheckState(toQtCheckState(eState)); }); } -bool QtInstanceCheckButton::get_active() const +TriState QtInstanceCheckButton::get_state() const { SolarMutexGuard g; - bool bActive; - GetQtInstance().RunInMainThread([&] { bActive = m_pCheckBox->isChecked(); }); - return bActive; -} - -void QtInstanceCheckButton::set_inconsistent(bool bInconsistent) -{ - SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { - m_pCheckBox->setTristate(true); - m_pCheckBox->setCheckState(bInconsistent ? Qt::PartiallyChecked : Qt::Unchecked); - }); -} - -bool QtInstanceCheckButton::get_inconsistent() const -{ - SolarMutexGuard g; - bool bInconsistent; - GetQtInstance().RunInMainThread( - [&] { bInconsistent = m_pCheckBox->checkState() == Qt::PartiallyChecked; }); - return bInconsistent; + TriState eState = TRISTATE_INDET; + GetQtInstance().RunInMainThread([&] { eState = toVclTriState(m_pCheckBox->checkState()); }); + return eState; } void QtInstanceCheckButton::set_label(const OUString& rText) { SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { m_pCheckBox->setText(toQString(rText)); }); + GetQtInstance().RunInMainThread( + [&] { m_pCheckBox->setText(vclToQtStringWithAccelerator(rText)); }); } OUString QtInstanceCheckButton::get_label() const { SolarMutexGuard g; OUString sLabel; - GetQtInstance().RunInMainThread([&] { sLabel = toOUString(m_pCheckBox->text()); }); + GetQtInstance().RunInMainThread( + [&] { sLabel = qtToVclStringWithAccelerator(m_pCheckBox->text()); }); return sLabel; } diff --git a/vcl/qt5/QtInstanceDrawingArea.cxx b/vcl/qt5/QtInstanceDrawingArea.cxx index 325f4e389668..cc0b577948fe 100644 --- a/vcl/qt5/QtInstanceDrawingArea.cxx +++ b/vcl/qt5/QtInstanceDrawingArea.cxx @@ -10,6 +10,7 @@ #include <QtInstanceDrawingArea.hxx> #include <QtInstanceDrawingArea.moc> +#include <QtAccessibleWidget.hxx> #include <QtData.hxx> #include <vcl/qt/QtUtils.hxx> @@ -17,17 +18,28 @@ #include <QtGui/QHelpEvent> #include <QtWidgets/QToolTip> -QtInstanceDrawingArea::QtInstanceDrawingArea(QLabel* pLabel) +QtInstanceDrawingArea::QtInstanceDrawingArea( + QLabel* pLabel, const rtl::Reference<comphelper::OAccessible>& rpAccessible) : QtInstanceWidget(pLabel) , m_pLabel(pLabel) , m_xDevice(DeviceFormat::WITHOUT_ALPHA) + , m_pAccessible(rpAccessible) { assert(m_pLabel); + if (m_pAccessible.is()) + QtAccessibleWidget::setCustomAccessible(*m_pLabel, m_pAccessible); + // install event filter, so eventFilter() can handle widget events m_pLabel->installEventFilter(this); } +QtInstanceDrawingArea::~QtInstanceDrawingArea() +{ + if (m_pAccessible) + m_pAccessible->dispose(); +} + void QtInstanceDrawingArea::queue_draw() { SolarMutexGuard g; diff --git a/vcl/qt5/QtInstanceFrame.cxx b/vcl/qt5/QtInstanceFrame.cxx index 3943805db558..1fc7114ca7eb 100644 --- a/vcl/qt5/QtInstanceFrame.cxx +++ b/vcl/qt5/QtInstanceFrame.cxx @@ -21,7 +21,8 @@ QtInstanceFrame::QtInstanceFrame(QGroupBox* pGroupBox) void QtInstanceFrame::set_label(const OUString& rText) { SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { m_pGroupBox->setTitle(toQString(rText)); }); + GetQtInstance().RunInMainThread( + [&] { m_pGroupBox->setTitle(vclToQtStringWithAccelerator(rText)); }); } OUString QtInstanceFrame::get_label() const @@ -29,7 +30,8 @@ OUString QtInstanceFrame::get_label() const SolarMutexGuard g; OUString sLabel; - GetQtInstance().RunInMainThread([&] { sLabel = toOUString(m_pGroupBox->title()); }); + GetQtInstance().RunInMainThread( + [&] { sLabel = qtToVclStringWithAccelerator(m_pGroupBox->title()); }); return sLabel; } diff --git a/vcl/qt5/QtInstanceNotebook.cxx b/vcl/qt5/QtInstanceNotebook.cxx index 8ff95b59f8bf..70818fce7ad6 100644 --- a/vcl/qt5/QtInstanceNotebook.cxx +++ b/vcl/qt5/QtInstanceNotebook.cxx @@ -79,7 +79,11 @@ OUString QtInstanceNotebook::get_current_page_ident() const SolarMutexGuard g; OUString sIdent; - GetQtInstance().RunInMainThread([&] { sIdent = get_page_ident(m_pTabWidget->currentIndex()); }); + GetQtInstance().RunInMainThread([&] { + const int nIndex = m_pTabWidget->currentIndex(); + if (nIndex >= 0) + sIdent = get_page_ident(nIndex); + }); return sIdent; } diff --git a/vcl/qt5/QtInstanceRadioButton.cxx b/vcl/qt5/QtInstanceRadioButton.cxx index e9cf7b658ef5..9c8ba8148535 100644 --- a/vcl/qt5/QtInstanceRadioButton.cxx +++ b/vcl/qt5/QtInstanceRadioButton.cxx @@ -37,13 +37,15 @@ bool QtInstanceRadioButton::get_active() const void QtInstanceRadioButton::set_label(const OUString& rText) { SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { m_pRadioButton->setText(toQString(rText)); }); + GetQtInstance().RunInMainThread( + [&] { m_pRadioButton->setText(vclToQtStringWithAccelerator(rText)); }); } OUString QtInstanceRadioButton::get_label() const { SolarMutexGuard g; OUString sLabel; - GetQtInstance().RunInMainThread([&] { sLabel = toOUString(m_pRadioButton->text()); }); + GetQtInstance().RunInMainThread( + [&] { sLabel = qtToVclStringWithAccelerator(m_pRadioButton->text()); }); return sLabel; } diff --git a/vcl/qt5/QtInstanceTextView.cxx b/vcl/qt5/QtInstanceTextView.cxx index 2c79383c6890..fab6f2809561 100644 --- a/vcl/qt5/QtInstanceTextView.cxx +++ b/vcl/qt5/QtInstanceTextView.cxx @@ -19,6 +19,11 @@ QtInstanceTextView::QtInstanceTextView(QPlainTextEdit* pTextEdit) , m_pTextEdit(pTextEdit) { assert(m_pTextEdit); + + connect(m_pTextEdit, &QPlainTextEdit::cursorPositionChanged, this, + &QtInstanceTextView::handleCursorPositionChanged); + connect(m_pTextEdit, &QPlainTextEdit::textChanged, this, + &QtInstanceTextView::handleTextChanged); } void QtInstanceTextView::set_text(const OUString& rText) @@ -140,4 +145,16 @@ int QtInstanceTextView::vadjustment_get_page_size() const void QtInstanceTextView::vadjustment_set_value(int) { assert(false && "Not implemented yet"); } +void QtInstanceTextView::handleCursorPositionChanged() +{ + SolarMutexGuard aGuard; + signal_cursor_position(); +} + +void QtInstanceTextView::handleTextChanged() +{ + SolarMutexGuard aGuard; + signal_changed(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt5/QtInstanceToggleButton.cxx b/vcl/qt5/QtInstanceToggleButton.cxx index eca59aa95f4a..cb63c32b8fa4 100644 --- a/vcl/qt5/QtInstanceToggleButton.cxx +++ b/vcl/qt5/QtInstanceToggleButton.cxx @@ -36,18 +36,6 @@ bool QtInstanceToggleButton::get_active() const return bActive; }; -void QtInstanceToggleButton::set_inconsistent(bool bInconsistent) -{ - assert(!bInconsistent && "Inconsistent state not supported (yet?)"); - (void)bInconsistent; -}; - -bool QtInstanceToggleButton::get_inconsistent() const -{ - assert(false && "Not implemented yet"); - return false; -}; - void QtInstanceToggleButton::signalToggled() { SolarMutexGuard g; diff --git a/vcl/qt5/QtInstanceToolbar.cxx b/vcl/qt5/QtInstanceToolbar.cxx index 825f1648ea05..cac9734c942f 100644 --- a/vcl/qt5/QtInstanceToolbar.cxx +++ b/vcl/qt5/QtInstanceToolbar.cxx @@ -39,15 +39,31 @@ bool QtInstanceToolbar::get_item_sensitive(const OUString&) const assert(false && "Not implemented yet"); return false; } -void QtInstanceToolbar::set_item_active(const OUString&, bool) +void QtInstanceToolbar::set_item_active(const OUString& rIdent, bool bActive) { - assert(false && "Not implemented yet"); + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + QToolButton* pToolButton = m_pToolBar->findChild<QToolButton*>(toQString(rIdent)); + assert(pToolButton && "No tool button with the given ID found"); + assert(pToolButton->isCheckable() && "Tool button is not checkable"); + pToolButton->setChecked(bActive); + }); } -bool QtInstanceToolbar::get_item_active(const OUString&) const +bool QtInstanceToolbar::get_item_active(const OUString& rIdent) const { - assert(false && "Not implemented yet"); - return false; + SolarMutexGuard g; + + bool bActive = false; + GetQtInstance().RunInMainThread([&] { + QToolButton* pToolButton = m_pToolBar->findChild<QToolButton*>(toQString(rIdent)); + assert(pToolButton && "No tool button with the given ID found"); + assert(pToolButton->isCheckable() && "Tool button is not checkable"); + bActive = pToolButton->isChecked(); + }); + + return bActive; } void QtInstanceToolbar::set_menu_item_active(const OUString&, bool) diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 2977c3cdb169..134095438fc7 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -636,45 +636,22 @@ OUString QtInstanceTreeView::get_id(const weld::TreeIter& rIter) const void QtInstanceTreeView::set_image(const weld::TreeIter& rIter, const OUString& rImage, int nCol) { - assert(nCol != -1 && "Special column -1 not handled yet"); - - SolarMutexGuard g; + if (rImage.isEmpty()) + return; - GetQtInstance().RunInMainThread([&] { - if (rImage.isEmpty()) - return; - QModelIndex aIndex = modelIndex(rIter, nCol); - QIcon aIcon = loadQPixmapIcon(rImage); - m_pModel->setData(aIndex, aIcon, Qt::DecorationRole); - }); + setImage(rIter, loadQPixmapIcon(rImage), nCol); } void QtInstanceTreeView::set_image(const weld::TreeIter& rIter, VirtualDevice& rImage, int nCol) { - assert(nCol != -1 && "Special column -1 not handled yet"); - - SolarMutexGuard g; - - GetQtInstance().RunInMainThread([&] { - QModelIndex aIndex = modelIndex(rIter, nCol); - QIcon aIcon = toQPixmap(rImage); - m_pModel->setData(aIndex, aIcon, Qt::DecorationRole); - }); + setImage(rIter, toQPixmap(rImage), nCol); } void QtInstanceTreeView::set_image(const weld::TreeIter& rIter, const css::uno::Reference<css::graphic::XGraphic>& rImage, int nCol) { - assert(nCol != -1 && "Special column -1 not handled yet"); - - SolarMutexGuard g; - - GetQtInstance().RunInMainThread([&] { - QModelIndex aIndex = modelIndex(rIter, nCol); - QIcon aIcon = toQPixmap(rImage); - m_pModel->setData(aIndex, aIcon, Qt::DecorationRole); - }); + setImage(rIter, toQPixmap(rImage), nCol); } void QtInstanceTreeView::set_font_color(const weld::TreeIter&, const Color&) @@ -1066,36 +1043,16 @@ QModelIndex QtInstanceTreeView::firstTextColumnModelIndex(const weld::TreeIter& return QModelIndex(); } -Qt::CheckState QtInstanceTreeView::toQtCheckState(TriState eTristate) +void QtInstanceTreeView::setImage(const weld::TreeIter& rIter, const QPixmap& rPixmap, int nCol) { - switch (eTristate) - { - case TRISTATE_FALSE: - return Qt::CheckState::Unchecked; - case TRISTATE_TRUE: - return Qt::CheckState::Checked; - case TRISTATE_INDET: - return Qt::CheckState::PartiallyChecked; - default: - assert(false && "unhandled Tristate value"); - return Qt::CheckState::PartiallyChecked; - } -} + assert(nCol != -1 && "Special column -1 not handled yet"); -TriState QtInstanceTreeView::toVclTriState(Qt::CheckState eTristate) -{ - switch (eTristate) - { - case Qt::CheckState::Unchecked: - return TRISTATE_FALSE; - case Qt::CheckState::Checked: - return TRISTATE_TRUE; - case Qt::CheckState::PartiallyChecked: - return TRISTATE_INDET; - default: - assert(false && "unhandled Qt::CheckState value"); - return TRISTATE_INDET; - } + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + QModelIndex aIndex = modelIndex(rIter, nCol); + m_pModel->setData(aIndex, rPixmap, Qt::DecorationRole); + }); } void QtInstanceTreeView::handleActivated() diff --git a/vcl/qt5/QtInstanceWidget.cxx b/vcl/qt5/QtInstanceWidget.cxx index 1d296cc33cb7..3cf97d867585 100644 --- a/vcl/qt5/QtInstanceWidget.cxx +++ b/vcl/qt5/QtInstanceWidget.cxx @@ -691,7 +691,7 @@ OUString QtInstanceWidget::escape_ui_str(const OUString& rLabel) const VclPtr<VirtualDevice> QtInstanceWidget::create_virtual_device() const { VclPtr<VirtualDevice> xRet = VclPtr<VirtualDevice>::Create(); - xRet->SetBackground(COL_TRANSPARENT); + xRet->SetBackground(); return xRet; } diff --git a/vcl/qt5/QtTools.cxx b/vcl/qt5/QtTools.cxx index 201762f9f6c7..b94cd2f0d11d 100644 --- a/vcl/qt5/QtTools.cxx +++ b/vcl/qt5/QtTools.cxx @@ -38,6 +38,38 @@ void CairoDeleter::operator()(cairo_surface_t* pSurface) const { cairo_surface_destroy(pSurface); } +Qt::CheckState toQtCheckState(TriState eTristate) +{ + switch (eTristate) + { + case TRISTATE_FALSE: + return Qt::CheckState::Unchecked; + case TRISTATE_TRUE: + return Qt::CheckState::Checked; + case TRISTATE_INDET: + return Qt::CheckState::PartiallyChecked; + default: + assert(false && "unhandled Tristate value"); + return Qt::CheckState::PartiallyChecked; + } +}; + +TriState toVclTriState(Qt::CheckState eTristate) +{ + switch (eTristate) + { + case Qt::CheckState::Unchecked: + return TRISTATE_FALSE; + case Qt::CheckState::Checked: + return TRISTATE_TRUE; + case Qt::CheckState::PartiallyChecked: + return TRISTATE_INDET; + default: + assert(false && "unhandled Qt::CheckState value"); + return TRISTATE_INDET; + } +}; + sal_uInt16 toVclKeyboardModifiers(Qt::KeyboardModifiers eKeyModifiers) { sal_uInt16 nCode = 0; diff --git a/vcl/qt5/QtVirtualDevice.cxx b/vcl/qt5/QtVirtualDevice.cxx index c52316eeb7c5..de3a96d5773c 100644 --- a/vcl/qt5/QtVirtualDevice.cxx +++ b/vcl/qt5/QtVirtualDevice.cxx @@ -43,8 +43,11 @@ void QtVirtualDevice::ReleaseGraphics(SalGraphics* pGraphics) delete pGraphics; } -bool QtVirtualDevice::SetSize(tools::Long nNewDX, tools::Long nNewDY) +bool QtVirtualDevice::SetSize(tools::Long nNewDX, tools::Long nNewDY, bool bAlphaMaskTransparent) { + assert(!bAlphaMaskTransparent && "TODO"); + (void)bAlphaMaskTransparent; + if (nNewDX == 0) nNewDX = 1; if (nNewDY == 0) diff --git a/vcl/quartz/AquaGraphicsBackend.cxx b/vcl/quartz/AquaGraphicsBackend.cxx index f6d1134072c6..507ee139a043 100644 --- a/vcl/quartz/AquaGraphicsBackend.cxx +++ b/vcl/quartz/AquaGraphicsBackend.cxx @@ -270,12 +270,12 @@ tools::Long AquaGraphicsBackend::GetGraphicsWidth() const void AquaGraphicsBackend::SetLineColor() { - mrShared.maLineColor.SetAlpha(0.0); // transparent + mrShared.maLineColor.SetActive(false); if (mrShared.checkContext()) { CGContextSetRGBStrokeColor(mrShared.maContextHolder.get(), mrShared.maLineColor.GetRed(), mrShared.maLineColor.GetGreen(), mrShared.maLineColor.GetBlue(), - mrShared.maLineColor.GetAlpha()); + 0.0); // alpha, transparent } } @@ -292,12 +292,12 @@ void AquaGraphicsBackend::SetLineColor(Color nColor) void AquaGraphicsBackend::SetFillColor() { - mrShared.maFillColor.SetAlpha(0.0); // transparent + mrShared.maFillColor.SetActive(false); if (mrShared.checkContext()) { CGContextSetRGBFillColor(mrShared.maContextHolder.get(), mrShared.maFillColor.GetRed(), mrShared.maFillColor.GetGreen(), mrShared.maFillColor.GetBlue(), - mrShared.maFillColor.GetAlpha()); + 0.0); // alpha, transparent } } @@ -444,7 +444,7 @@ void AquaGraphicsBackend::drawRect(tools::Long nX, tools::Long nY, tools::Long n return; CGRect aRect = CGRectMake(nX, nY, nWidth, nHeight); - if (mrShared.isPenVisible()) + if (mrShared.isPenActive()) { aRect.origin.x += 0.5; aRect.origin.y += 0.5; @@ -452,13 +452,22 @@ void AquaGraphicsBackend::drawRect(tools::Long nX, tools::Long nY, tools::Long n aRect.size.height -= 1; } - if (mrShared.isBrushVisible()) + if (mrShared.isBrushActive() && mrShared.maFillColor.GetAlpha() == 0) { - CGContextFillRect(mrShared.maContextHolder.get(), aRect); + CGContextSetBlendMode(mrShared.maContextHolder.get(), kCGBlendModeClear); + CGContextClearRect(mrShared.maContextHolder.get(), aRect); + CGContextSetBlendMode(mrShared.maContextHolder.get(), kCGBlendModeNormal); } - if (mrShared.isPenVisible()) + else { - CGContextStrokeRect(mrShared.maContextHolder.get(), aRect); + if (mrShared.isBrushActive()) + { + CGContextFillRect(mrShared.maContextHolder.get(), aRect); + } + if (mrShared.isPenActive()) + { + CGContextStrokeRect(mrShared.maContextHolder.get(), aRect); + } } mrShared.refreshRect(nX, nY, nWidth, nHeight); } @@ -502,15 +511,15 @@ void AquaGraphicsBackend::drawPolygon(sal_uInt32 nPoints, const Point* pPointArr getBoundRect(nPoints, pPointArray, nX, nY, nWidth, nHeight); CGPathDrawingMode eMode; - if (mrShared.isBrushVisible() && mrShared.isPenVisible()) + if (mrShared.isBrushActive() && mrShared.isPenActive()) { eMode = kCGPathEOFillStroke; } - else if (mrShared.isPenVisible()) + else if (mrShared.isPenActive()) { eMode = kCGPathStroke; } - else if (mrShared.isBrushVisible()) + else if (mrShared.isBrushActive()) { eMode = kCGPathEOFill; } @@ -522,7 +531,7 @@ void AquaGraphicsBackend::drawPolygon(sal_uInt32 nPoints, const Point* pPointArr CGContextBeginPath(mrShared.maContextHolder.get()); - if (mrShared.isPenVisible()) + if (mrShared.isPenActive()) { float fX, fY; alignLinePoint(pPointArray, fX, fY); @@ -592,15 +601,15 @@ void AquaGraphicsBackend::drawPolyPolygon(sal_uInt32 nPolyCount, const sal_uInt3 // prepare drawing mode CGPathDrawingMode eMode; - if (mrShared.isBrushVisible() && mrShared.isPenVisible()) + if (mrShared.isBrushActive() && mrShared.isPenActive()) { eMode = kCGPathEOFillStroke; } - else if (mrShared.isPenVisible()) + else if (mrShared.isPenActive()) { eMode = kCGPathStroke; } - else if (mrShared.isBrushVisible()) + else if (mrShared.isBrushActive()) { eMode = kCGPathEOFill; } @@ -612,7 +621,7 @@ void AquaGraphicsBackend::drawPolyPolygon(sal_uInt32 nPolyCount, const sal_uInt3 // convert to CGPath CGContextBeginPath(mrShared.maContextHolder.get()); - if (mrShared.isPenVisible()) + if (mrShared.isPenActive()) { for (sal_uInt32 nPoly = 0; nPoly < nPolyCount; nPoly++) { @@ -688,7 +697,7 @@ void AquaGraphicsBackend::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectTo // the transformation is not used here...) for (auto const& rPolygon : std::as_const(aPolyPolygon)) { - AddPolygonToPath(xPath, rPolygon, true, !getAntiAlias(), mrShared.isPenVisible()); + AddPolygonToPath(xPath, rPolygon, true, !getAntiAlias(), mrShared.isPenActive()); } const CGRect aRefreshRect = CGPathGetBoundingBox(xPath); @@ -697,15 +706,15 @@ void AquaGraphicsBackend::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectTo { // prepare drawing mode CGPathDrawingMode eMode; - if (mrShared.isBrushVisible() && mrShared.isPenVisible()) + if (mrShared.isBrushActive() && mrShared.isPenActive()) { eMode = kCGPathEOFillStroke; } - else if (mrShared.isPenVisible()) + else if (mrShared.isPenActive()) { eMode = kCGPathStroke; } - else if (mrShared.isBrushVisible()) + else if (mrShared.isBrushActive()) { eMode = kCGPathEOFill; } @@ -949,7 +958,8 @@ void AquaGraphicsBackend::drawMask(const SalTwoRect& rPosAry, const SalBitmap& r } std::shared_ptr<SalBitmap> AquaGraphicsBackend::getBitmap(tools::Long nX, tools::Long nY, - tools::Long nDX, tools::Long nDY) + tools::Long nDX, tools::Long nDY, + bool /*bWithoutAlpha*/) { SAL_WARN_IF(!mrShared.maLayer.isSet(), "vcl.quartz", "AquaSalGraphics::getBitmap() with no layer this=" << this); @@ -1006,7 +1016,7 @@ Color AquaGraphicsBackend::getPixel(tools::Long nX, tools::Long nY) CGContextRelease(xOnePixelContext); - Color nColor(aPixel.r, aPixel.g, aPixel.b); + Color nColor(ColorAlpha, aPixel.a, aPixel.r, aPixel.g, aPixel.b); return nColor; } @@ -1305,7 +1315,7 @@ bool AquaGraphicsBackend::drawAlphaRect(tools::Long nX, tools::Long nY, tools::L CGContextSetAlpha(mrShared.maContextHolder.get(), (100 - nTransparency) * (1.0 / 100)); CGRect aRect = CGRectMake(nX, nY, nWidth - 1, nHeight - 1); - if (mrShared.isPenVisible()) + if (mrShared.isPenActive()) { aRect.origin.x += 0.5; aRect.origin.y += 0.5; diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index 4c6c57874f04..7fc4ab50d15c 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -276,7 +276,7 @@ void QuartzSalBitmap::ConvertBitmapData( sal_uInt32 nWidth, sal_uInt32 nHeight, aSrcBuf.mnBitCount = nSrcBits; aSrcBuf.mnScanlineSize = nSrcBytesPerRow; BitmapBuffer aDstBuf; - aDstBuf.meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32() ? ScanlineFormat::N32BitTcArgb : ScanlineFormat::N32BitTcXrgb; + aDstBuf.meFormat = ScanlineFormat::N32BitTcArgb; aDstBuf.mpBits = pDestData; aDstBuf.mnBitCount = nDestBits; aDstBuf.mnScanlineSize = nDestBytesPerRow; @@ -439,10 +439,8 @@ BitmapBuffer* QuartzSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ ) pBuffer->meFormat = ScanlineFormat::N24BitTcBgr; break; case 32: - { - pBuffer->meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32() ? ScanlineFormat::N32BitTcArgb : ScanlineFormat::N32BitTcXrgb; + pBuffer->meFormat = ScanlineFormat::N32BitTcArgb; break; - } default: assert(false); } diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index b813f7c0421d..27b2c96fdd6f 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -39,19 +39,20 @@ std::unique_ptr<SalVirtualDevice> AquaSalInstance::CreateVirtualDevice( SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) + DeviceFormat eFormat, + bool bAlphaMaskTransparent) { // #i92075# can be called first in a thread SalData::ensureThreadAutoreleasePool(); #ifdef IOS (void)rGraphics; - std::unique_ptr<SalVirtualDevice> pNew(new AquaSalVirtualDevice( nullptr, nDX, nDY, eFormat )); + std::unique_ptr<SalVirtualDevice> pNew(new AquaSalVirtualDevice( nullptr, nDX, nDY, eFormat, bAlphaMaskTransparent )); pNew->SetSize( nDX, nDY ); return pNew; #else return std::unique_ptr<SalVirtualDevice>(new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >(&rGraphics), - nDX, nDY, eFormat )); + nDX, nDY, eFormat, bAlphaMaskTransparent )); #endif } @@ -69,7 +70,7 @@ std::unique_ptr<SalVirtualDevice> AquaSalInstance::CreateVirtualDevice( SalGraph AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, tools::Long nDX, tools::Long nDY, - DeviceFormat eFormat ) + DeviceFormat eFormat, bool bAlphaMaskTransparent ) : mbGraphicsUsed( false ) , mnBitmapDepth( 0 ) , mnWidth(0) @@ -109,7 +110,7 @@ AquaSalVirtualDevice::AquaSalVirtualDevice( #endif if( nDX && nDY ) { - SetSize( nDX, nDY ); + SetSize( nDX, nDY, bAlphaMaskTransparent ); } // NOTE: if SetSize does not succeed, we just ignore the nDX and nDY } diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index 52f8021785ef..9933350bc256 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -1452,7 +1452,8 @@ void SkiaSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, const SalBitmap& r } std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(tools::Long nX, tools::Long nY, - tools::Long nWidth, tools::Long nHeight) + tools::Long nWidth, tools::Long nHeight, + bool bWithoutAlpha) { SkiaZone zone; checkSurface(); @@ -1464,7 +1465,7 @@ std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(tools::Long nX, tools: // in blendAlphaBitmap(), where we could simply use the proper rect of the image. sk_sp<SkImage> image = makeCheckedImageSnapshot( mSurface, scaleRect(SkIRect::MakeXYWH(nX, nY, nWidth, nHeight), mScaling)); - std::shared_ptr<SkiaSalBitmap> bitmap = std::make_shared<SkiaSalBitmap>(image); + std::shared_ptr<SkiaSalBitmap> bitmap = std::make_shared<SkiaSalBitmap>(image, bWithoutAlpha); // If the surface is scaled for HiDPI, the bitmap needs to be scaled down, otherwise // it would have incorrect size from the API point of view. The DirectImage::Yes handling // in mergeCacheBitmaps() should access the original unscaled bitmap data to avoid diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx index 6dee8b0b5252..c12d08bb9aac 100644 --- a/vcl/skia/salbmp.cxx +++ b/vcl/skia/salbmp.cxx @@ -58,16 +58,13 @@ SkiaSalBitmap::SkiaSalBitmap() {} SkiaSalBitmap::~SkiaSalBitmap() {} -SkiaSalBitmap::SkiaSalBitmap(const sk_sp<SkImage>& image) +SkiaSalBitmap::SkiaSalBitmap(const sk_sp<SkImage>& image, bool bWithoutAlpha) { ResetAllData(); mImage = image; mPalette = BitmapPalette(); -#if SKIA_USE_BITMAP32 mBitCount = 32; -#else - mBitCount = 24; -#endif + m_bWithoutAlpha = bWithoutAlpha; mSize = mPixelsSize = Size(image->width(), image->height()); ComputeScanlineSize(); mReadAccessCount = 0; @@ -300,14 +297,16 @@ BitmapBuffer* SkiaSalBitmap::AcquireBuffer(BitmapAccessMode nMode) : ScanlineFormat::N24BitTcRgb; break; case 32: -#if SKIA_USE_BITMAP32 - // this tracks the m_bSupportsBitmap32 field - buffer->meFormat = kN32_SkColorTypeIsBGRA ? ScanlineFormat::N32BitTcBgra - : ScanlineFormat::N32BitTcRgba; -#else - buffer->meFormat = kN32_SkColorTypeIsBGRA ? ScanlineFormat::N32BitTcBgrx - : ScanlineFormat::N32BitTcRgbx; -#endif + if (m_bWithoutAlpha) + { + buffer->meFormat = kN32_SkColorTypeIsBGRA ? ScanlineFormat::N32BitTcBgrx + : ScanlineFormat::N32BitTcRgbx; + } + else + { + buffer->meFormat = kN32_SkColorTypeIsBGRA ? ScanlineFormat::N32BitTcBgra + : ScanlineFormat::N32BitTcRgba; + } break; default: abort(); @@ -1125,12 +1124,8 @@ SkAlphaType SkiaSalBitmap::alphaType() const { if (mEraseColorSet) return mEraseColor.IsTransparent() ? kPremul_SkAlphaType : kOpaque_SkAlphaType; -#if SKIA_USE_BITMAP32 - // The bitmap's alpha matters only if SKIA_USE_BITMAP32 is set, otherwise - // the alpha is in a separate bitmap. if (mBitCount == 32) return kPremul_SkAlphaType; -#endif return kOpaque_SkAlphaType; } @@ -1251,18 +1246,12 @@ void SkiaSalBitmap::EnsureBitmapData() // Try to fill mBuffer from mImage. assert(mImage->colorType() == kN32_SkColorType); SkiaZone zone; - // If the source image has no alpha, then use no alpha (faster to convert), otherwise - // use kUnpremul_SkAlphaType to make Skia convert from premultiplied alpha when reading - // from the SkImage (the alpha will be ignored if converting to bpp<32 formats, but - // the color channels must be unpremultiplied. Unless bpp==32 and SKIA_USE_BITMAP32, - // in which case use kPremul_SkAlphaType, since SKIA_USE_BITMAP32 implies premultiplied alpha. + // If the source image has no alpha, then use no alpha (faster to convert). SkAlphaType alphaType = kUnpremul_SkAlphaType; if (mImage->imageInfo().alphaType() == kOpaque_SkAlphaType) alphaType = kOpaque_SkAlphaType; -#if SKIA_USE_BITMAP32 if (mBitCount == 32) alphaType = kPremul_SkAlphaType; -#endif SkBitmap bitmap; SkPixmap pixmap; if (imageSize(mImage) == mSize && mImage->imageInfo().alphaType() == alphaType diff --git a/vcl/skia/x11/salvd.cxx b/vcl/skia/x11/salvd.cxx index c517a165efa1..15ffaf880283 100644 --- a/vcl/skia/x11/salvd.cxx +++ b/vcl/skia/x11/salvd.cxx @@ -78,8 +78,10 @@ SalGraphics* X11SkiaSalVirtualDevice::AcquireGraphics() void X11SkiaSalVirtualDevice::ReleaseGraphics(SalGraphics*) { mbGraphicsAcquired = false; } -bool X11SkiaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY) +bool X11SkiaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY, bool bAlphaMaskTransparent) { + assert(!bAlphaMaskTransparent && "TODO"); + (void)bAlphaMaskTransparent; if (!nDX) nDX = 1; if (!nDY) diff --git a/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx b/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx index 54934b39f3bd..6427bf8aeca2 100644 --- a/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx +++ b/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx @@ -252,7 +252,7 @@ sal_Int64 AccessibleBrowseBoxBase::implCreateStateSet() bool AccessibleBrowseBoxBase::isAlive() const { - return !rBHelper.bDisposed && !rBHelper.bInDispose && mpBrowseBox; + return OAccessible::isAlive() && mpBrowseBox; } void AccessibleBrowseBoxBase::ensureIsAlive() const diff --git a/vcl/source/accessibility/AccessibleIconView.cxx b/vcl/source/accessibility/AccessibleIconView.cxx deleted file mode 100644 index 0ee1b253b90d..000000000000 --- a/vcl/source/accessibility/AccessibleIconView.cxx +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <sal/config.h> - -#include <com/sun/star/accessibility/AccessibleEventId.hpp> - -#include <vcl/event.hxx> -#include <vcl/unohelp.hxx> - -#include <accessibility/AccessibleIconView.hxx> - -AccessibleIconView::AccessibleIconView( - SvTreeListBox& _rListBox, const css::uno::Reference<css::accessibility::XAccessible>& _xParent) - : AccessibleListBox(_rListBox, _xParent) -{ -} - -void AccessibleIconView::ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) -{ - if (!isAlive()) - return; - - switch (rVclWindowEvent.GetId()) - { - case VclEventId::WindowMouseMove: - if (MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rVclWindowEvent.GetData())) - { - if (auto xChild = getAccessibleAtPoint( - vcl::unohelper::ConvertToAWTPoint(pMouseEvt->GetPosPixel()))) - { - // Allow announcing the element on mouse hover - css::uno::Any aNew(xChild); - NotifyAccessibleEvent( - css::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, {}, aNew); - } - } - break; - default: - AccessibleListBox::ProcessWindowEvent(rVclWindowEvent); - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/source/accessibility/accessibleiconchoicectrl.cxx b/vcl/source/accessibility/accessibleiconchoicectrl.cxx index c01dfe0961ca..b6a6a3d6da17 100644 --- a/vcl/source/accessibility/accessibleiconchoicectrl.cxx +++ b/vcl/source/accessibility/accessibleiconchoicectrl.cxx @@ -99,7 +99,6 @@ OUString SAL_CALL AccessibleIconChoiceCtrl::getImplementationName() Sequence< OUString > SAL_CALL AccessibleIconChoiceCtrl::getSupportedServiceNames() { return {u"com.sun.star.accessibility.AccessibleContext"_ustr, - u"com.sun.star.accessibility.AccessibleComponent"_ustr, u"com.sun.star.awt.AccessibleIconChoiceControl"_ustr}; } diff --git a/vcl/source/accessibility/accessibleiconchoicectrlentry.cxx b/vcl/source/accessibility/accessibleiconchoicectrlentry.cxx index bccd6d2af576..9af81cee34d1 100644 --- a/vcl/source/accessibility/accessibleiconchoicectrlentry.cxx +++ b/vcl/source/accessibility/accessibleiconchoicectrlentry.cxx @@ -98,20 +98,9 @@ tools::Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBox_Impl() const return aRect; } -AbsoluteScreenPixelRectangle AccessibleIconChoiceCtrlEntry::GetBoundingBoxOnScreen_Impl() const -{ - SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry( m_nIndex ); - if ( !pEntry ) - return AbsoluteScreenPixelRectangle(); - tools::Rectangle aRect = m_pIconCtrl->GetBoundingBox( pEntry ); - AbsoluteScreenPixelPoint aTopLeft = m_pIconCtrl->GetWindowExtentsAbsolute().TopLeft(); - aTopLeft += AbsoluteScreenPixelPoint(aRect.TopLeft()); - return AbsoluteScreenPixelRectangle( aTopLeft, aRect.GetSize() ); -} - bool AccessibleIconChoiceCtrlEntry::IsAlive_Impl() const { - return ( !rBHelper.bDisposed && !rBHelper.bInDispose && m_pIconCtrl ); + return isAlive() && m_pIconCtrl; } bool AccessibleIconChoiceCtrlEntry::IsShowing_Impl() const @@ -136,7 +125,14 @@ AbsoluteScreenPixelRectangle AccessibleIconChoiceCtrlEntry::GetBoundingBoxOnScre ::osl::MutexGuard aGuard( m_aMutex ); EnsureIsAlive(); - return GetBoundingBoxOnScreen_Impl(); + + SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry(m_nIndex); + if (!pEntry) + return AbsoluteScreenPixelRectangle(); + tools::Rectangle aRect = m_pIconCtrl->GetBoundingBox(pEntry); + AbsoluteScreenPixelPoint aTopLeft = m_pIconCtrl->GetWindowExtentsAbsolute().TopLeft(); + aTopLeft += AbsoluteScreenPixelPoint(aRect.TopLeft()); + return AbsoluteScreenPixelRectangle(aTopLeft, aRect.GetSize()); } void AccessibleIconChoiceCtrlEntry::EnsureIsAlive() const @@ -194,7 +190,6 @@ OUString SAL_CALL AccessibleIconChoiceCtrlEntry::getImplementationName() Sequence< OUString > SAL_CALL AccessibleIconChoiceCtrlEntry::getSupportedServiceNames() { return {u"com.sun.star.accessibility.AccessibleContext"_ustr, - u"com.sun.star.accessibility.AccessibleComponent"_ustr, u"com.sun.star.awt.AccessibleIconChoiceControlEntry"_ustr}; } diff --git a/vcl/source/accessibility/accessiblelistbox.cxx b/vcl/source/accessibility/accessiblelistbox.cxx index a79fd49b5fdd..6e6ff710f713 100644 --- a/vcl/source/accessibility/accessiblelistbox.cxx +++ b/vcl/source/accessibility/accessiblelistbox.cxx @@ -251,7 +251,6 @@ OUString SAL_CALL AccessibleListBox::getImplementationName() Sequence< OUString > SAL_CALL AccessibleListBox::getSupportedServiceNames() { return {u"com.sun.star.accessibility.AccessibleContext"_ustr, - u"com.sun.star.accessibility.AccessibleComponent"_ustr, u"com.sun.star.awt.AccessibleTreeListBox"_ustr}; } @@ -277,9 +276,6 @@ Reference< XAccessible > SAL_CALL AccessibleListBox::getAccessibleChild( sal_Int if ( !pEntry ) throw IndexOutOfBoundsException(); - // Solution: Set the parameter of the parent to null to let entry determine the parent by itself - //return new AccessibleListBoxEntry( *getListBox(), pEntry, this ); - //return new AccessibleListBoxEntry( *getListBox(), pEntry, nullptr ); return implGetAccessible(*pEntry); } @@ -431,9 +427,6 @@ Reference< XAccessible > SAL_CALL AccessibleListBox::getSelectedAccessibleChild( if ( nSelCount == ( nSelectedChildIndex + 1 ) ) { - // Solution: Set the parameter of the parent to null to let entry determine the parent by itself - //xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, this ); - //xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, nullptr ); xChild = implGetAccessible(*pEntry).get(); break; } diff --git a/vcl/source/accessibility/accessiblelistboxentry.cxx b/vcl/source/accessibility/accessiblelistboxentry.cxx index 106e9cb691e2..ea022d70d1be 100644 --- a/vcl/source/accessibility/accessiblelistboxentry.cxx +++ b/vcl/source/accessibility/accessiblelistboxentry.cxx @@ -37,17 +37,12 @@ #include <svdata.hxx> #include <strings.hrc> -// class AccessibleListBoxEntry ----------------------------------------------------- - using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star; using namespace ::comphelper; - -// Ctor() and Dtor() - AccessibleListBoxEntry::AccessibleListBoxEntry( SvTreeListBox& _rListBox, SvTreeListEntry& rEntry, AccessibleListBox & rListBox) @@ -89,9 +84,6 @@ IMPL_LINK( AccessibleListBoxEntry, WindowEventListener, VclWindowEvent&, rEvent, } case VclEventId::ObjectDying : { - if ( m_pTreeListBox ) - m_pTreeListBox->RemoveEventListener( LINK( this, AccessibleListBoxEntry, WindowEventListener ) ); - m_pTreeListBox = nullptr; dispose(); break; } @@ -119,11 +111,6 @@ tools::Rectangle AccessibleListBoxEntry::GetBoundingBox_Impl() const return aRect; } -bool AccessibleListBoxEntry::IsAlive_Impl() const -{ - return !rBHelper.bDisposed && !rBHelper.bInDispose && (m_pTreeListBox != nullptr); -} - bool AccessibleListBoxEntry::IsShowing_Impl() const { Reference< XAccessible > xParent = implGetParentAccessible( ); @@ -148,12 +135,6 @@ void AccessibleListBoxEntry::CheckActionIndex(sal_Int32 nIndex) throw css::lang::IndexOutOfBoundsException(); } -void AccessibleListBoxEntry::EnsureIsAlive() const -{ - if ( !IsAlive_Impl() ) - throw lang::DisposedException(); -} - OUString AccessibleListBoxEntry::implGetText() { SvTreeListEntry* pEntry = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); @@ -197,6 +178,21 @@ void SAL_CALL AccessibleListBoxEntry::disposing() m_pTreeListBox = nullptr; } +uno::Any SAL_CALL AccessibleListBoxEntry::queryInterface(const uno::Type& rType) +{ + if (rType == cppu::UnoType<XAccessibleText>::get()) + { + // don't support XAccessibleText interface if there's no text item + // (e.g. for IconView items), as screen readers may give text a higher + // priority than accessible name and just say something like "blank" otherwise + SvTreeListEntry* pEntry = m_pTreeListBox->GetEntryFromPath(m_aEntryPath); + if (pEntry && !pEntry->GetFirstItem(SvLBoxItemType::String)) + return uno::Any(); + } + + return AccessibleListBoxEntry_BASE::queryInterface(rType); +} + // XServiceInfo OUString SAL_CALL AccessibleListBoxEntry::getImplementationName() @@ -206,9 +202,7 @@ OUString SAL_CALL AccessibleListBoxEntry::getImplementationName() Sequence< OUString > SAL_CALL AccessibleListBoxEntry::getSupportedServiceNames() { - return {u"com.sun.star.accessibility.AccessibleContext"_ustr, - u"com.sun.star.accessibility.AccessibleComponent"_ustr, - u"com.sun.star.awt.AccessibleTreeListBoxEntry"_ustr}; + return {u"com.sun.star.accessibility.AccessibleContext"_ustr}; } sal_Bool SAL_CALL AccessibleListBoxEntry::supportsService( const OUString& _rServiceName ) @@ -223,7 +217,7 @@ sal_Int64 SAL_CALL AccessibleListBoxEntry::getAccessibleChildCount( ) SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); SvTreeListEntry* pEntry = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); sal_Int32 nCount = 0; if ( pEntry ) @@ -236,7 +230,7 @@ Reference< XAccessible > SAL_CALL AccessibleListBoxEntry::getAccessibleChild( sa { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); SvTreeListEntry* pEntry = GetRealChild(i); if ( !pEntry ) @@ -286,7 +280,7 @@ Reference< XAccessible > SAL_CALL AccessibleListBoxEntry::getAccessibleParent( { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return implGetParentAccessible( ); } @@ -371,7 +365,7 @@ OUString SAL_CALL AccessibleListBoxEntry::getAccessibleName( ) { ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if (SvTreeListEntry* pEntry = m_pTreeListBox->GetEntryFromPath(m_aEntryPath)) { @@ -404,7 +398,7 @@ sal_Int64 SAL_CALL AccessibleListBoxEntry::getAccessibleStateSet( ) sal_Int64 nStateSet = 0; - if ( IsAlive_Impl() ) + if (isAlive()) { switch(getAccessibleRole()) { @@ -450,20 +444,21 @@ Reference< XAccessible > SAL_CALL AccessibleListBoxEntry::getAccessibleAtPoint( SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); SvTreeListEntry* pEntry = m_pTreeListBox->GetEntry(vcl::unohelper::ConvertToVCLPoint(_aPoint)); if ( !pEntry ) throw RuntimeException(u"AccessibleListBoxEntry::getAccessibleAtPoint - pEntry cannot be empty!"_ustr); - Reference< XAccessible > xAcc; rtl::Reference<AccessibleListBox> xListBox(m_wListBox); assert(xListBox.is()); - auto pAccEntry = xListBox->implGetAccessible(*pEntry); + rtl::Reference<AccessibleListBoxEntry> pAccEntry = xListBox->implGetAccessible(*pEntry); tools::Rectangle aRect = pAccEntry->GetBoundingBox_Impl(); - if (aRect.Contains(vcl::unohelper::ConvertToVCLPoint(_aPoint))) - xAcc = pAccEntry.get(); - return xAcc; + if (aRect.Contains(vcl::unohelper::ConvertToVCLPoint(_aPoint)) + && pAccEntry->implGetParentAccessible().get() == this) + return pAccEntry; + + return {}; } void SAL_CALL AccessibleListBoxEntry::grabFocus( ) @@ -513,7 +508,7 @@ awt::Rectangle SAL_CALL AccessibleListBoxEntry::getCharacterBounds( sal_Int32 nI SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if ( !implIsValidIndex( nIndex, implGetText().getLength() ) ) throw IndexOutOfBoundsException(); @@ -537,7 +532,7 @@ sal_Int32 SAL_CALL AccessibleListBoxEntry::getIndexAtPoint( const awt::Point& aP { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if(aPoint.X==0 && aPoint.Y==0) return 0; sal_Int32 nIndex = -1; @@ -559,7 +554,7 @@ sal_Bool SAL_CALL AccessibleListBoxEntry::copyText( sal_Int32 nStartIndex, sal_I { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); OUString sText = implGetText(); if ( ( 0 > nStartIndex ) || ( sText.getLength() <= nStartIndex ) @@ -610,7 +605,7 @@ sal_Bool SAL_CALL AccessibleListBoxEntry::doAccessibleAction( sal_Int32 nIndex ) bool bRet = false; CheckActionIndex(nIndex); - EnsureIsAlive(); + ensureAlive(); SvTreeFlags treeFlag = m_pTreeListBox->GetTreeFlags(); if( nIndex == 0 && (treeFlag & SvTreeFlags::CHKBTN) ) @@ -647,7 +642,7 @@ OUString SAL_CALL AccessibleListBoxEntry::getAccessibleActionDescription( sal_In ::osl::MutexGuard aGuard( m_aMutex ); CheckActionIndex(nIndex); - EnsureIsAlive(); + ensureAlive(); SvTreeListEntry* pEntry = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); SvButtonState state = m_pTreeListBox->GetCheckButtonState( pEntry ); @@ -694,7 +689,7 @@ void SAL_CALL AccessibleListBoxEntry::selectAccessibleChild( sal_Int64 nChildInd SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount()) throw IndexOutOfBoundsException(); @@ -711,7 +706,7 @@ sal_Bool SAL_CALL AccessibleListBoxEntry::isAccessibleChildSelected( sal_Int64 n SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount()) throw IndexOutOfBoundsException(); @@ -729,7 +724,7 @@ void SAL_CALL AccessibleListBoxEntry::clearAccessibleSelection( ) SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); SvTreeListEntry* pParent = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) @@ -748,7 +743,7 @@ void SAL_CALL AccessibleListBoxEntry::selectAllAccessibleChildren( ) SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); SvTreeListEntry* pParent = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) @@ -767,7 +762,7 @@ sal_Int64 SAL_CALL AccessibleListBoxEntry::getSelectedAccessibleChildCount( ) SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); sal_Int64 nSelCount = 0; @@ -790,7 +785,7 @@ Reference< XAccessible > SAL_CALL AccessibleListBoxEntry::getSelectedAccessibleC SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if ( nSelectedChildIndex < 0 || nSelectedChildIndex >= getSelectedAccessibleChildCount() ) throw IndexOutOfBoundsException(); @@ -825,7 +820,7 @@ void SAL_CALL AccessibleListBoxEntry::deselectAccessibleChild( sal_Int64 nSelect SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if (nSelectedChildIndex < 0 || nSelectedChildIndex >= getAccessibleChildCount()) throw IndexOutOfBoundsException(); @@ -845,7 +840,7 @@ sal_Bool SAL_CALL AccessibleListBoxEntry::setCaretPosition ( sal_Int32 nIndex ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) ) throw IndexOutOfBoundsException(); @@ -856,14 +851,14 @@ sal_Unicode SAL_CALL AccessibleListBoxEntry::getCharacter( sal_Int32 nIndex ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return OCommonAccessibleText::implGetCharacter( implGetText(), nIndex ); } css::uno::Sequence< css::beans::PropertyValue > SAL_CALL AccessibleListBoxEntry::getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); OUString sText( implGetText() ); @@ -876,7 +871,7 @@ sal_Int32 SAL_CALL AccessibleListBoxEntry::getCharacterCount( ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return implGetText().getLength(); } @@ -884,28 +879,28 @@ OUString SAL_CALL AccessibleListBoxEntry::getSelectedText( ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return OUString(); } sal_Int32 SAL_CALL AccessibleListBoxEntry::getSelectionStart( ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return 0; } sal_Int32 SAL_CALL AccessibleListBoxEntry::getSelectionEnd( ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return 0; } sal_Bool SAL_CALL AccessibleListBoxEntry::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) ) throw IndexOutOfBoundsException(); @@ -916,35 +911,35 @@ OUString SAL_CALL AccessibleListBoxEntry::getText( ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return implGetText( ); } OUString SAL_CALL AccessibleListBoxEntry::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return OCommonAccessibleText::implGetTextRange( implGetText(), nStartIndex, nEndIndex ); } css::accessibility::TextSegment SAL_CALL AccessibleListBoxEntry::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return OCommonAccessibleText::getTextAtIndex( nIndex ,aTextType); } css::accessibility::TextSegment SAL_CALL AccessibleListBoxEntry::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return OCommonAccessibleText::getTextBeforeIndex( nIndex ,aTextType); } css::accessibility::TextSegment SAL_CALL AccessibleListBoxEntry::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - EnsureIsAlive(); + ensureAlive(); return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType); } @@ -999,7 +994,6 @@ Any AccessibleListBoxEntry::getMaximumValue( ) ::osl::MutexGuard aGuard( m_aMutex ); Any aValue; - // SvTreeListBox* pBox = m_pTreeListBox; switch(getAccessibleRole()) { case AccessibleRole::CHECK_BOX: @@ -1019,7 +1013,6 @@ Any AccessibleListBoxEntry::getMinimumValue( ) ::osl::MutexGuard aGuard( m_aMutex ); Any aValue; - // SvTreeListBox* pBox = m_pTreeListBox; switch(getAccessibleRole()) { case AccessibleRole::CHECK_BOX: diff --git a/vcl/source/accessibility/accessiblemenubasecomponent.cxx b/vcl/source/accessibility/accessiblemenubasecomponent.cxx index 83be8e57ca8b..1d700e20b062 100644 --- a/vcl/source/accessibility/accessiblemenubasecomponent.cxx +++ b/vcl/source/accessibility/accessiblemenubasecomponent.cxx @@ -641,14 +641,10 @@ sal_Int64 OAccessibleMenuBaseComponent::getAccessibleStateSet( ) sal_Int64 nStateSet = 0; - if ( !rBHelper.bDisposed && !rBHelper.bInDispose ) - { + if (isAlive()) FillAccessibleStateSet( nStateSet ); - } else - { nStateSet |= AccessibleStateType::DEFUNC; - } return nStateSet; } diff --git a/vcl/source/accessibility/vclxaccessibleheaderbaritem.cxx b/vcl/source/accessibility/vclxaccessibleheaderbaritem.cxx index d320a5e21255..64b4cae7502c 100644 --- a/vcl/source/accessibility/vclxaccessibleheaderbaritem.cxx +++ b/vcl/source/accessibility/vclxaccessibleheaderbaritem.cxx @@ -176,14 +176,10 @@ sal_Int64 VCLXAccessibleHeaderBarItem::getAccessibleStateSet( ) sal_Int64 nStateSet = 0; - if ( !rBHelper.bDisposed && !rBHelper.bInDispose ) - { + if (isAlive()) FillAccessibleStateSet( nStateSet ); - } else - { nStateSet |= AccessibleStateType::DEFUNC; - } return nStateSet; } diff --git a/vcl/source/accessibility/vclxaccessiblelistitem.cxx b/vcl/source/accessibility/vclxaccessiblelistitem.cxx index 9e43e32d80ed..fe03be301248 100644 --- a/vcl/source/accessibility/vclxaccessiblelistitem.cxx +++ b/vcl/source/accessibility/vclxaccessiblelistitem.cxx @@ -164,7 +164,6 @@ sal_Bool VCLXAccessibleListItem::supportsService( const OUString& rServiceName ) Sequence< OUString > VCLXAccessibleListItem::getSupportedServiceNames() { return {u"com.sun.star.accessibility.AccessibleContext"_ustr, - u"com.sun.star.accessibility.AccessibleComponent"_ustr, u"com.sun.star.accessibility.AccessibleListItem"_ustr}; } diff --git a/vcl/source/accessibility/vclxaccessiblestatusbaritem.cxx b/vcl/source/accessibility/vclxaccessiblestatusbaritem.cxx index 0548ec387fe5..f497b0320ff4 100644 --- a/vcl/source/accessibility/vclxaccessiblestatusbaritem.cxx +++ b/vcl/source/accessibility/vclxaccessiblestatusbaritem.cxx @@ -290,14 +290,10 @@ sal_Int64 VCLXAccessibleStatusBarItem::getAccessibleStateSet( ) sal_Int64 nStateSet = 0; - if ( !rBHelper.bDisposed && !rBHelper.bInDispose ) - { + if (isAlive()) FillAccessibleStateSet( nStateSet ); - } else - { nStateSet |= AccessibleStateType::DEFUNC; - } return nStateSet; } diff --git a/vcl/source/accessibility/vclxaccessibletabpage.cxx b/vcl/source/accessibility/vclxaccessibletabpage.cxx index dda56ad202b5..f30a05a48f5c 100644 --- a/vcl/source/accessibility/vclxaccessibletabpage.cxx +++ b/vcl/source/accessibility/vclxaccessibletabpage.cxx @@ -357,14 +357,10 @@ sal_Int64 VCLXAccessibleTabPage::getAccessibleStateSet( ) sal_Int64 nStateSet = 0; - if ( !rBHelper.bDisposed && !rBHelper.bInDispose ) - { + if (isAlive()) FillAccessibleStateSet( nStateSet ); - } else - { nStateSet |= AccessibleStateType::DEFUNC; - } return nStateSet; } diff --git a/vcl/source/accessibility/vclxaccessibletoolboxitem.cxx b/vcl/source/accessibility/vclxaccessibletoolboxitem.cxx index 61090ced9420..c971fb98e88e 100644 --- a/vcl/source/accessibility/vclxaccessibletoolboxitem.cxx +++ b/vcl/source/accessibility/vclxaccessibletoolboxitem.cxx @@ -268,7 +268,6 @@ sal_Bool VCLXAccessibleToolBoxItem::supportsService( const OUString& rServiceNam Sequence< OUString > VCLXAccessibleToolBoxItem::getSupportedServiceNames() { return {u"com.sun.star.accessibility.AccessibleContext"_ustr, - u"com.sun.star.accessibility.AccessibleComponent"_ustr, u"com.sun.star.accessibility.AccessibleExtendedComponent"_ustr, u"com.sun.star.accessibility.AccessibleToolBoxItem"_ustr}; } @@ -373,7 +372,7 @@ sal_Int64 SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleStateSet( ) sal_Int64 nStateSet = 0; - if ( m_pToolBox && !rBHelper.bDisposed && !rBHelper.bInDispose ) + if (m_pToolBox && isAlive()) { nStateSet |= AccessibleStateType::FOCUSABLE; if (m_pToolBox->GetItemBits(m_nItemId) & ToolBoxItemBits::CHECKABLE) diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 4035f772c5bd..408fb4bb658b 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3018,13 +3018,6 @@ void SalInstanceMenuButton::set_active(bool active) bool SalInstanceMenuButton::get_active() const { return m_xMenuButton->InPopupMode(); } -void SalInstanceMenuButton::set_inconsistent(bool /*inconsistent*/) -{ - //not available -} - -bool SalInstanceMenuButton::get_inconsistent() const { return false; } - void SalInstanceMenuButton::insert_item(int pos, const OUString& rId, const OUString& rStr, const OUString* pIconName, VirtualDevice* pImageSurface, TriState eCheckRadioFalse) @@ -3213,28 +3206,15 @@ SalInstanceCheckButton::SalInstanceCheckButton(CheckBox* pButton, SalInstanceBui m_xCheckButton->SetToggleHdl(LINK(this, SalInstanceCheckButton, ToggleHdl)); } -void SalInstanceCheckButton::set_active(bool active) +void SalInstanceCheckButton::set_state(TriState eState) { disable_notify_events(); - m_xCheckButton->EnableTriState(false); - m_xCheckButton->Check(active); + m_xCheckButton->EnableTriState(eState == TRISTATE_INDET); + m_xCheckButton->SetState(eState); enable_notify_events(); } -bool SalInstanceCheckButton::get_active() const { return m_xCheckButton->IsChecked(); } - -void SalInstanceCheckButton::set_inconsistent(bool inconsistent) -{ - disable_notify_events(); - m_xCheckButton->EnableTriState(true); - m_xCheckButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE); - enable_notify_events(); -} - -bool SalInstanceCheckButton::get_inconsistent() const -{ - return m_xCheckButton->GetState() == TRISTATE_INDET; -} +TriState SalInstanceCheckButton::get_state() const { return m_xCheckButton->GetState(); } void SalInstanceCheckButton::set_label_wrap(bool bWrap) { diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx index 51a933cab74a..70b742f91e58 100644 --- a/vcl/source/app/weldutils.cxx +++ b/vcl/source/app/weldutils.cxx @@ -95,7 +95,7 @@ Dialog* AssistantController::getDialog() { return m_xAssistant.get(); } AssistantController::~AssistantController() {} -void TriStateEnabled::ButtonToggled(weld::Toggleable& rToggle) +void TriStateEnabled::CheckButtonToggled(weld::CheckButton& rToggle) { if (bTriStateEnabled) { diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx index a366541e8da8..02da01d79b66 100644 --- a/vcl/source/bitmap/BitmapEx.cxx +++ b/vcl/source/bitmap/BitmapEx.cxx @@ -104,9 +104,18 @@ void BitmapEx::loadFromIconTheme( const OUString& rIconName ) } BitmapEx::BitmapEx( const Bitmap& rBmp ) : - maBitmap ( rBmp ), - maBitmapSize ( maBitmap.GetSizePixel() ) + maBitmapSize ( rBmp.GetSizePixel() ) { + if (rBmp.getPixelFormat() == vcl::PixelFormat::N32_BPP) + { + std::pair<Bitmap, AlphaMask> aPair = rBmp.SplitIntoColorAndAlpha(); + maBitmap = std::move(aPair.first); + maAlphaMask = std::move(aPair.second); + } + else + { + maBitmap = rBmp; + } } BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) : diff --git a/vcl/source/bitmap/BitmapReadAccess.cxx b/vcl/source/bitmap/BitmapReadAccess.cxx index b009534cd6f4..e39823c4d611 100644 --- a/vcl/source/bitmap/BitmapReadAccess.cxx +++ b/vcl/source/bitmap/BitmapReadAccess.cxx @@ -53,8 +53,6 @@ BitmapReadAccess::BitmapReadAccess(const Bitmap& rBitmap, BitmapAccessMode nMode BitmapReadAccess::~BitmapReadAccess() {} -bool Bitmap32IsPreMultipled() { return ImplGetSVData()->mpDefInst->supportsBitmap32(); } - FncGetPixel BitmapReadAccess::GetPixelFunction(ScanlineFormat nFormat) { switch (nFormat) @@ -68,28 +66,20 @@ FncGetPixel BitmapReadAccess::GetPixelFunction(ScanlineFormat nFormat) case ScanlineFormat::N24BitTcRgb: return GetPixelForN24BitTcRgb; case ScanlineFormat::N32BitTcAbgr: - assert(Bitmap32IsPreMultipled()); return GetPixelForN32BitTcAbgr; case ScanlineFormat::N32BitTcXbgr: - assert(!Bitmap32IsPreMultipled()); return GetPixelForN32BitTcXbgr; case ScanlineFormat::N32BitTcArgb: - assert(Bitmap32IsPreMultipled()); return GetPixelForN32BitTcArgb; case ScanlineFormat::N32BitTcXrgb: - assert(!Bitmap32IsPreMultipled()); return GetPixelForN32BitTcXrgb; case ScanlineFormat::N32BitTcBgra: - assert(Bitmap32IsPreMultipled()); return GetPixelForN32BitTcBgra; case ScanlineFormat::N32BitTcBgrx: - assert(!Bitmap32IsPreMultipled()); return GetPixelForN32BitTcBgrx; case ScanlineFormat::N32BitTcRgba: - assert(Bitmap32IsPreMultipled()); return GetPixelForN32BitTcRgba; case ScanlineFormat::N32BitTcRgbx: - assert(!Bitmap32IsPreMultipled()); return GetPixelForN32BitTcRgbx; default: @@ -110,28 +100,20 @@ FncSetPixel BitmapReadAccess::SetPixelFunction(ScanlineFormat nFormat) case ScanlineFormat::N24BitTcRgb: return SetPixelForN24BitTcRgb; case ScanlineFormat::N32BitTcAbgr: - assert(Bitmap32IsPreMultipled()); return SetPixelForN32BitTcAbgr; case ScanlineFormat::N32BitTcXbgr: - assert(!Bitmap32IsPreMultipled()); return SetPixelForN32BitTcXbgr; case ScanlineFormat::N32BitTcArgb: - assert(Bitmap32IsPreMultipled()); return SetPixelForN32BitTcArgb; case ScanlineFormat::N32BitTcXrgb: - assert(!Bitmap32IsPreMultipled()); return SetPixelForN32BitTcXrgb; case ScanlineFormat::N32BitTcBgra: - assert(Bitmap32IsPreMultipled()); return SetPixelForN32BitTcBgra; case ScanlineFormat::N32BitTcBgrx: - assert(!Bitmap32IsPreMultipled()); return SetPixelForN32BitTcBgrx; case ScanlineFormat::N32BitTcRgba: - assert(Bitmap32IsPreMultipled()); return SetPixelForN32BitTcRgba; case ScanlineFormat::N32BitTcRgbx: - assert(!Bitmap32IsPreMultipled()); return SetPixelForN32BitTcRgbx; default: diff --git a/vcl/source/bitmap/BitmapWriteAccess.cxx b/vcl/source/bitmap/BitmapWriteAccess.cxx index cf5686e031fe..842819c254ef 100644 --- a/vcl/source/bitmap/BitmapWriteAccess.cxx +++ b/vcl/source/bitmap/BitmapWriteAccess.cxx @@ -101,35 +101,27 @@ void BitmapWriteAccess::CopyScanline(tools::Long nY, ConstScanline aSrcScanline, pFncGetPixel = GetPixelForN24BitTcRgb; break; case ScanlineFormat::N32BitTcAbgr: - assert(Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcAbgr; break; case ScanlineFormat::N32BitTcXbgr: - assert(!Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcXbgr; break; case ScanlineFormat::N32BitTcArgb: - assert(Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcArgb; break; case ScanlineFormat::N32BitTcXrgb: - assert(!Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcXrgb; break; case ScanlineFormat::N32BitTcBgra: - assert(Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcBgra; break; case ScanlineFormat::N32BitTcBgrx: - assert(!Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcBgrx; break; case ScanlineFormat::N32BitTcRgba: - assert(Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcRgba; break; case ScanlineFormat::N32BitTcRgbx: - assert(!Bitmap32IsPreMultipled()); pFncGetPixel = GetPixelForN32BitTcRgbx; break; diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index 9423d7a70d09..bfcc06f169ba 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -1777,4 +1777,40 @@ const basegfx::SystemDependentDataHolder* Bitmap::accessSystemDependentDataHolde return mxSalBmp.get(); } +std::pair<Bitmap, AlphaMask> Bitmap::SplitIntoColorAndAlpha() const +{ + assert(getPixelFormat() == vcl::PixelFormat::N32_BPP && "only valid to call this when this is a 32-bit combined color+alpha bitmap"); + Bitmap aColorBmp(GetSizePixel(), vcl::PixelFormat::N24_BPP); + AlphaMask aAlphaBmp(GetSizePixel()); + + // We will probably need to make this more efficient by pushing it down to the *SalBitmap implementations, + // but for now, do the simple and safe thing. + { + BitmapScopedReadAccess pThisAcc(*this); + BitmapScopedWriteAccess pColorAcc(aColorBmp); + BitmapScopedWriteAccess pAlphaAcc(aAlphaBmp); + + const tools::Long nHeight(pThisAcc->Height()); + const tools::Long nWidth(pThisAcc->Width()); + + for (tools::Long y = 0; y < nHeight; ++y) + { + Scanline pScanlineRead = pThisAcc->GetScanline( y ); + Scanline pScanlineColor = pColorAcc->GetScanline( y ); + Scanline pScanlineAlpha = pAlphaAcc->GetScanline( y ); + for (tools::Long x = 0; x < nWidth; ++x) + { + BitmapColor aColor = pThisAcc->GetPixelFromData(pScanlineRead, x); + + // write result back + pColorAcc->SetPixelOnData(pScanlineColor, x, aColor); + pAlphaAcc->SetPixelOnData(pScanlineAlpha, x, BitmapColor(aColor.GetAlpha())); + } + } + } + + return { std::move(aColorBmp), std::move(aAlphaBmp) }; +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 563e6b63d485..9db38b9e571e 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1381,106 +1381,104 @@ ErrCode GraphicFilter::ImportGraphic(Graphic& rGraphic, std::u16string_view rPat } // read graphic + if (aFilterName.equalsIgnoreAsciiCase(IMP_GIF)) { - if (aFilterName.equalsIgnoreAsciiCase(IMP_GIF)) - { - nStatus = readGIF(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PNG)) - { - nStatus = readPNG(rIStream, rGraphic, eLinkType, aGraphicContent); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_JPEG)) - { - nStatus = readJPEG(rIStream, rGraphic, eLinkType, nImportFlags); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG) || aFilterName.equalsIgnoreAsciiCase(IMP_SVGZ)) - { - nStatus = readSVG(rIStream, rGraphic, eLinkType, aGraphicContent); - } - else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) ) - { - nStatus = readXBM(rIStream, rGraphic); - } - else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) ) - { - nStatus = readXPM(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_BMP)) - { - nStatus = readBMP(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVMETAFILE)) - { - nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, aFilterName); - } - else if( aFilterName.equalsIgnoreAsciiCase(IMP_MOV)) - { - nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, aFilterName); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_WMF) || aFilterName.equalsIgnoreAsciiCase(IMP_WMZ)) - { - nStatus = readWMF(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_EMF) || aFilterName.equalsIgnoreAsciiCase(IMP_EMZ)) - { - nStatus = readEMF(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PDF)) - { - nStatus = readPDF(rIStream, rGraphic, eLinkType, nPageIndex, xInteractionHandler, aGraphicContent); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_TIFF) ) - { - nStatus = readTIFF(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_TGA) ) - { - nStatus = readTGA(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PICT)) - { - nStatus = readPICT(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_MET)) - { - nStatus = readMET(rIStream, rGraphic, eLinkType); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_RAS)) - { - nStatus = readRAS(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCX)) - { - nStatus = readPCX(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_EPS)) - { - nStatus = readEPS(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PSD)) - { - nStatus = readPSD(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCD)) - { - nStatus = readPCD(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_PBM)) - { - nStatus = readPBM(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_DXF)) - { - nStatus = readDXF(rIStream, rGraphic); - } - else if (aFilterName.equalsIgnoreAsciiCase(IMP_WEBP)) - { - nStatus = readWEBP(rIStream, rGraphic, eLinkType); - } - else - nStatus = ERRCODE_GRFILTER_FILTERERROR; + nStatus = readGIF(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PNG)) + { + nStatus = readPNG(rIStream, rGraphic, eLinkType, aGraphicContent); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_JPEG)) + { + nStatus = readJPEG(rIStream, rGraphic, eLinkType, nImportFlags); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG) || aFilterName.equalsIgnoreAsciiCase(IMP_SVGZ)) + { + nStatus = readSVG(rIStream, rGraphic, eLinkType, aGraphicContent); + } + else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) ) + { + nStatus = readXBM(rIStream, rGraphic); + } + else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) ) + { + nStatus = readXPM(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_BMP)) + { + nStatus = readBMP(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVMETAFILE)) + { + nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, aFilterName); + } + else if( aFilterName.equalsIgnoreAsciiCase(IMP_MOV)) + { + nStatus = readWithTypeSerializer(rIStream, rGraphic, eLinkType, aFilterName); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_WMF) || aFilterName.equalsIgnoreAsciiCase(IMP_WMZ)) + { + nStatus = readWMF(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_EMF) || aFilterName.equalsIgnoreAsciiCase(IMP_EMZ)) + { + nStatus = readEMF(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PDF)) + { + nStatus = readPDF(rIStream, rGraphic, eLinkType, nPageIndex, xInteractionHandler, aGraphicContent); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_TIFF) ) + { + nStatus = readTIFF(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_TGA) ) + { + nStatus = readTGA(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PICT)) + { + nStatus = readPICT(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_MET)) + { + nStatus = readMET(rIStream, rGraphic, eLinkType); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_RAS)) + { + nStatus = readRAS(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCX)) + { + nStatus = readPCX(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_EPS)) + { + nStatus = readEPS(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PSD)) + { + nStatus = readPSD(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PCD)) + { + nStatus = readPCD(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_PBM)) + { + nStatus = readPBM(rIStream, rGraphic); + } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_DXF)) + { + nStatus = readDXF(rIStream, rGraphic); } + else if (aFilterName.equalsIgnoreAsciiCase(IMP_WEBP)) + { + nStatus = readWEBP(rIStream, rGraphic, eLinkType); + } + else + nStatus = ERRCODE_GRFILTER_FILTERERROR; if (nStatus == ERRCODE_NONE && eLinkType != GfxLinkType::NONE && !bLinkSet) { diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index 1af01a71610e..977787e90e95 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -364,7 +364,6 @@ bool reader(SvStream& rStream, ImportOutput& rImportOutput, BitmapScopedWriteAccess pWriteAccessInstance; BitmapScopedWriteAccess pWriteAccessAlphaInstance; const bool bFuzzing = comphelper::IsFuzzing(); - const bool bSupportsBitmap32 = bFuzzing || ImplGetSVData()->mpDefInst->supportsBitmap32(); const bool bOnlyCreateBitmap = static_cast<bool>(nImportFlags & GraphicFilterImportFlags::OnlyCreateBitmap); const bool bUseExistingBitmap @@ -462,14 +461,9 @@ bool reader(SvStream& rStream, ImportOutput& rImportOutput, aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N24_BPP); break; case PNG_COLOR_TYPE_RGBA: - if (bSupportsBitmap32) - aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N32_BPP); - else - { - aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N24_BPP); - aBitmapAlpha = AlphaMask(Size(width, height), nullptr); - aBitmapAlpha.Erase(0); // opaque - } + aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N24_BPP); + aBitmapAlpha = AlphaMask(Size(width, height), nullptr); + aBitmapAlpha.Erase(0); // opaque break; case PNG_COLOR_TYPE_GRAY: aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N8_BPP, @@ -551,81 +545,43 @@ bool reader(SvStream& rStream, ImportOutput& rImportOutput, else if (colorType == PNG_COLOR_TYPE_RGB_ALPHA) { size_t aRowSizeBytes = png_get_rowbytes(pPng, pInfo); + ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat(); + if (eFormat == ScanlineFormat::N24BitTcBgr) + png_set_bgr(pPng); - if (bSupportsBitmap32) + if (nNumberOfPasses == 1) { - ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat(); - if (eFormat == ScanlineFormat::N32BitTcAbgr || eFormat == ScanlineFormat::N32BitTcBgra) - png_set_bgr(pPng); - - for (int pass = 0; pass < nNumberOfPasses; pass++) + // optimise the common case, where we can use a buffer of only a single row + std::vector<png_byte> aRow(aRowSizeBytes, 0); + for (png_uint_32 y = 0; y < height; y++) { - for (png_uint_32 y = 0; y < height; y++) - { - Scanline pScanline = pWriteAccess->GetScanline(y); - png_read_row(pPng, pScanline, nullptr); - } - } -#if !ENABLE_WASM_STRIP_PREMULTIPLY - const vcl::bitmap::lookup_table& premultiply = vcl::bitmap::get_premultiply_table(); -#endif - if (eFormat == ScanlineFormat::N32BitTcAbgr || eFormat == ScanlineFormat::N32BitTcArgb) - { // alpha first and premultiply - for (png_uint_32 y = 0; y < height; y++) - { - Scanline pScanline = pWriteAccess->GetScanline(y); - for (size_t i = 0; i < aRowSizeBytes; i += 4) - { - const sal_uInt8 alpha = pScanline[i + 3]; -#if ENABLE_WASM_STRIP_PREMULTIPLY - pScanline[i + 3] = vcl::bitmap::premultiply(pScanline[i + 2], alpha); - pScanline[i + 2] = vcl::bitmap::premultiply(pScanline[i + 1], alpha); - pScanline[i + 1] = vcl::bitmap::premultiply(pScanline[i], alpha); -#else - pScanline[i + 3] = premultiply[alpha][pScanline[i + 2]]; - pScanline[i + 2] = premultiply[alpha][pScanline[i + 1]]; - pScanline[i + 1] = premultiply[alpha][pScanline[i]]; -#endif - pScanline[i] = alpha; - } - } - } - else - { // keep alpha last, only premultiply - for (png_uint_32 y = 0; y < height; y++) + Scanline pScanline = pWriteAccess->GetScanline(y); + Scanline pScanAlpha = pWriteAccessAlpha->GetScanline(y); + png_bytep pRow = aRow.data(); + png_read_row(pPng, pRow, nullptr); + size_t iAlpha = 0; + size_t iColor = 0; + for (size_t i = 0; i < aRowSizeBytes; i += 4) { - Scanline pScanline = pWriteAccess->GetScanline(y); - for (size_t i = 0; i < aRowSizeBytes; i += 4) - { - const sal_uInt8 alpha = pScanline[i + 3]; -#if ENABLE_WASM_STRIP_PREMULTIPLY - pScanline[i] = vcl::bitmap::premultiply(pScanline[i], alpha); - pScanline[i + 1] = vcl::bitmap::premultiply(pScanline[i + 1], alpha); - pScanline[i + 2] = vcl::bitmap::premultiply(pScanline[i + 2], alpha); -#else - pScanline[i] = premultiply[alpha][pScanline[i]]; - pScanline[i + 1] = premultiply[alpha][pScanline[i + 1]]; - pScanline[i + 2] = premultiply[alpha][pScanline[i + 2]]; -#endif - } + pScanline[iColor++] = pRow[i + 0]; + pScanline[iColor++] = pRow[i + 1]; + pScanline[iColor++] = pRow[i + 2]; + pScanAlpha[iAlpha++] = pRow[i + 3]; } } } else { - ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat(); - if (eFormat == ScanlineFormat::N24BitTcBgr) - png_set_bgr(pPng); - - if (nNumberOfPasses == 1) + std::vector<std::vector<png_byte>> aRows(height); + for (auto& rRow : aRows) + rRow.resize(aRowSizeBytes, 0); + for (int pass = 0; pass < nNumberOfPasses; pass++) { - // optimise the common case, where we can use a buffer of only a single row - std::vector<png_byte> aRow(aRowSizeBytes, 0); for (png_uint_32 y = 0; y < height; y++) { Scanline pScanline = pWriteAccess->GetScanline(y); Scanline pScanAlpha = pWriteAccessAlpha->GetScanline(y); - png_bytep pRow = aRow.data(); + png_bytep pRow = aRows[y].data(); png_read_row(pPng, pRow, nullptr); size_t iAlpha = 0; size_t iColor = 0; @@ -638,31 +594,6 @@ bool reader(SvStream& rStream, ImportOutput& rImportOutput, } } } - else - { - std::vector<std::vector<png_byte>> aRows(height); - for (auto& rRow : aRows) - rRow.resize(aRowSizeBytes, 0); - for (int pass = 0; pass < nNumberOfPasses; pass++) - { - for (png_uint_32 y = 0; y < height; y++) - { - Scanline pScanline = pWriteAccess->GetScanline(y); - Scanline pScanAlpha = pWriteAccessAlpha->GetScanline(y); - png_bytep pRow = aRows[y].data(); - png_read_row(pPng, pRow, nullptr); - size_t iAlpha = 0; - size_t iColor = 0; - for (size_t i = 0; i < aRowSizeBytes; i += 4) - { - pScanline[iColor++] = pRow[i + 0]; - pScanline[iColor++] = pRow[i + 1]; - pScanline[iColor++] = pRow[i + 2]; - pScanAlpha[iAlpha++] = pRow[i + 3]; - } - } - } - } } } else if (colorType == PNG_COLOR_TYPE_GRAY) diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index aa2468c11d1d..01a9dd30d6ea 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -718,12 +718,9 @@ rtl::Reference<MetaAction> SvmReader::TextArrayHandler(const ImplMetaReadData* p // aKashidaArray, if not empty, must be the same size as aArray std::vector<sal_Bool> aKashidaArray(pAction->GetDXArray().size(), 0); - // [-loplugin:fakebool] false positive: - sal_Bool val(sal_False); for (sal_uInt32 i = 0; i < nTmpLen; i++) { - mrStream.ReadUChar(val); - aKashidaArray[i] = val; + mrStream.ReadUChar(aKashidaArray[i]); } pAction->SetKashidaArray(std::move(aKashidaArray)); } diff --git a/vcl/source/filter/webp/reader.cxx b/vcl/source/filter/webp/reader.cxx index 901974a92b9b..d9cff9997ada 100644 --- a/vcl/source/filter/webp/reader.cxx +++ b/vcl/source/filter/webp/reader.cxx @@ -72,21 +72,10 @@ static bool readWebp(SvStream& stream, Graphic& graphic) if (width > SAL_MAX_INT32 / 8 || height > SAL_MAX_INT32 / 8) return false; // avoid overflows later - const bool bFuzzing = comphelper::IsFuzzing(); - const bool bSupportsBitmap32 = bFuzzing || ImplGetSVData()->mpDefInst->supportsBitmap32(); - - Bitmap bitmap; AlphaMask bitmapAlpha; - if (bSupportsBitmap32 && has_alpha) - { - bitmap = Bitmap(Size(width, height), vcl::PixelFormat::N32_BPP); - } - else - { - bitmap = Bitmap(Size(width, height), vcl::PixelFormat::N24_BPP); - if (has_alpha) - bitmapAlpha = AlphaMask(Size(width, height)); - } + Bitmap bitmap(Size(width, height), vcl::PixelFormat::N24_BPP); + if (has_alpha) + bitmapAlpha = AlphaMask(Size(width, height)); BitmapScopedWriteAccess access(bitmap); if (!access) @@ -104,25 +93,17 @@ static bool readWebp(SvStream& stream, Graphic& graphic) config.output.width = width; config.output.height = height; config.output.is_external_memory = 1; - if (bSupportsBitmap32 && has_alpha) + if (has_alpha) { switch (access->GetScanlineFormat()) { - // Our bitmap32 code expects premultiplied. - case ScanlineFormat::N32BitTcRgba: - case ScanlineFormat::N32BitTcRgbx: - config.output.colorspace = MODE_rgbA; - pixelMode = PixelMode::DirectRead; - break; - case ScanlineFormat::N32BitTcBgra: - case ScanlineFormat::N32BitTcBgrx: - config.output.colorspace = MODE_bgrA; - pixelMode = PixelMode::DirectRead; + case ScanlineFormat::N24BitTcRgb: + config.output.colorspace = MODE_RGBA; + pixelMode = PixelMode::Split; break; - case ScanlineFormat::N32BitTcArgb: - case ScanlineFormat::N32BitTcXrgb: - config.output.colorspace = MODE_Argb; - pixelMode = PixelMode::DirectRead; + case ScanlineFormat::N24BitTcBgr: + config.output.colorspace = MODE_BGRA; + pixelMode = PixelMode::Split; break; default: config.output.colorspace = MODE_RGBA; @@ -132,43 +113,23 @@ static bool readWebp(SvStream& stream, Graphic& graphic) } else { - if (has_alpha) - { - switch (access->GetScanlineFormat()) - { - case ScanlineFormat::N24BitTcRgb: - config.output.colorspace = MODE_RGBA; - pixelMode = PixelMode::Split; - break; - case ScanlineFormat::N24BitTcBgr: - config.output.colorspace = MODE_BGRA; - pixelMode = PixelMode::Split; - break; - default: - config.output.colorspace = MODE_RGBA; - pixelMode = PixelMode::SetPixel; - break; - } - } - else + switch (access->GetScanlineFormat()) { - switch (access->GetScanlineFormat()) - { - case ScanlineFormat::N24BitTcRgb: - config.output.colorspace = MODE_RGB; - pixelMode = PixelMode::DirectRead; - break; - case ScanlineFormat::N24BitTcBgr: - config.output.colorspace = MODE_BGR; - pixelMode = PixelMode::DirectRead; - break; - default: - config.output.colorspace = MODE_RGB; - pixelMode = PixelMode::SetPixel; - break; - } + case ScanlineFormat::N24BitTcRgb: + config.output.colorspace = MODE_RGB; + pixelMode = PixelMode::DirectRead; + break; + case ScanlineFormat::N24BitTcBgr: + config.output.colorspace = MODE_BGR; + pixelMode = PixelMode::DirectRead; + break; + default: + config.output.colorspace = MODE_RGB; + pixelMode = PixelMode::SetPixel; + break; } } + if (pixelMode == PixelMode::DirectRead) { config.output.u.RGBA.rgba = access->GetBuffer(); @@ -286,15 +247,10 @@ static bool readWebp(SvStream& stream, Graphic& graphic) } access.reset(); // Flush BitmapScopedWriteAccess. - if (bSupportsBitmap32 && has_alpha) - graphic = BitmapEx(bitmap); + if (has_alpha) + graphic = BitmapEx(bitmap, bitmapAlpha); else - { - if (has_alpha) - graphic = BitmapEx(bitmap, bitmapAlpha); - else - graphic = BitmapEx(bitmap); - } + graphic = BitmapEx(bitmap); return success; } diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx index 24585bea784b..42326393b0a6 100644 --- a/vcl/source/gdi/WidgetDefinitionReader.cxx +++ b/vcl/source/gdi/WidgetDefinitionReader.cxx @@ -8,6 +8,10 @@ * */ +#include <frozen/bits/defines.h> +#include <frozen/bits/elsa_std.h> +#include <frozen/unordered_map.h> + #include <utility> #include <widgetdraw/WidgetDefinitionReader.hxx> @@ -16,7 +20,6 @@ #include <tools/stream.hxx> #include <o3tl/string_view.hxx> #include <o3tl/numeric.hxx> -#include <unordered_map> namespace vcl { @@ -120,7 +123,7 @@ ControlPart xmlStringToControlPart(std::string_view sPart) bool getControlTypeForXmlString(std::string_view rString, ControlType& reType) { - static std::unordered_map<std::string_view, ControlType> aPartMap = { + static constexpr auto aPartMap = frozen::make_unordered_map<std::string_view, ControlType>({ { "pushbutton", ControlType::Pushbutton }, { "radiobutton", ControlType::Radiobutton }, { "checkbox", ControlType::Checkbox }, @@ -146,7 +149,7 @@ bool getControlTypeForXmlString(std::string_view rString, ControlType& reType) { "menubar", ControlType::Menubar }, { "menupopup", ControlType::MenuPopup }, { "tooltip", ControlType::Tooltip }, - }; + }); auto const aIterator = aPartMap.find(rString); if (aIterator != aPartMap.end()) @@ -338,7 +341,7 @@ bool WidgetDefinitionReader::read(WidgetDefinition& rWidgetDefinition) rWidgetDefinition.mpStyle = std::make_shared<WidgetDefinitionStyle>(); - std::unordered_map<std::string_view, Color*> aStyleColorMap = { + auto aStyleColorMap = frozen::make_unordered_map<std::string_view, Color*>({ { "faceColor", &rWidgetDefinition.mpStyle->maFaceColor }, { "checkedColor", &rWidgetDefinition.mpStyle->maCheckedColor }, { "lightColor", &rWidgetDefinition.mpStyle->maLightColor }, @@ -393,11 +396,11 @@ bool WidgetDefinitionReader::read(WidgetDefinition& rWidgetDefinition) { "linkColor", &rWidgetDefinition.mpStyle->maLinkColor }, { "visitedLinkColor", &rWidgetDefinition.mpStyle->maVisitedLinkColor }, { "toolTextColor", &rWidgetDefinition.mpStyle->maToolTextColor }, - }; + }); rWidgetDefinition.mpSettings = std::make_shared<WidgetDefinitionSettings>(); - std::unordered_map<std::string_view, OString*> aSettingMap = { + auto aSettingMap = frozen::make_unordered_map<std::string_view, OString*>({ { "noActiveTabTextRaise", &rWidgetDefinition.mpSettings->msNoActiveTabTextRaise }, { "centeredTabs", &rWidgetDefinition.mpSettings->msCenteredTabs }, { "listBoxEntryMargin", &rWidgetDefinition.mpSettings->msListBoxEntryMargin }, @@ -408,7 +411,7 @@ bool WidgetDefinitionReader::read(WidgetDefinition& rWidgetDefinition) &rWidgetDefinition.mpSettings->msListBoxPreviewDefaultLogicWidth }, { "listBoxPreviewDefaultLogicHeight", &rWidgetDefinition.mpSettings->msListBoxPreviewDefaultLogicHeight }, - }; + }); SvFileStream aFileStream(m_rDefinitionFile, StreamMode::READ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 2f54037e7b09..a6afc521b72a 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -446,6 +446,18 @@ void ImpGraphic::setPrepared(bool bAnimated, const Size* pSizeHint) if (maVectorGraphicData) maSwapInfo.mnPageIndex = maVectorGraphicData->getPageIndex(); + + // tdf#167007 Add animated graphic to cache when prepared + // For some reason, after an animation has been swapped out by + // MemoryManager::loopAndReduceMemory(), the animation repeatedly + // creates a new ImpGraphic instance, swaps it in, but it never + // gets registered in the cache. Since it is not in the cache, new + // ImpGraphic instances get deleted almost immediately after they + // are created. + // So prevent immediate deletion by ensuring that animated + // ImpGraphic instances are registered when they are prepared. + if (maSwapInfo.mbIsAnimated) + registerIntoManager(); } void ImpGraphic::clear() diff --git a/vcl/source/gdi/pdfbuildin_fonts.cxx b/vcl/source/gdi/pdfbuildin_fonts.cxx index 85a9a6d5343b..823c429a5977 100644 --- a/vcl/source/gdi/pdfbuildin_fonts.cxx +++ b/vcl/source/gdi/pdfbuildin_fonts.cxx @@ -43,13 +43,13 @@ OString BuildinFont::getNameObject() const return aBuf.makeStringAndClear(); } -const FontCharMapRef& BuildinFont::GetFontCharMap() const +FontCharMapRef BuildinFontFace::GetFontCharMap() const { assert(false && "pdf::BuildinFont doesn't provide correct char maps!"); if (m_xFontCharMap.is()) return m_xFontCharMap; - m_xFontCharMap = FontCharMap::GetDefaultMap(m_eCharSet != RTL_TEXTENCODING_MS_1252); + m_xFontCharMap = FontCharMap::GetDefaultMap(mrBuildin.m_eCharSet != RTL_TEXTENCODING_MS_1252); return m_xFontCharMap; } @@ -70,665 +70,679 @@ FontAttributes BuildinFont::GetFontAttributes() const } const BuildinFont BuildinFontFace::m_aBuildinFonts[14] - = { { u"Courier"_ustr, // family name - u"Normal"_ustr, // style - "Courier", // PSName - 629, - -157, // ascend, descend - FAMILY_MODERN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_FIXED, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 - 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 - 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 - 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 - 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 - 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 - 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 - 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 - 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 - 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 - 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 - 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 - 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 - 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 - 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 - 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 - 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 - 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 - 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 - 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 - 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 - 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 - 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 - 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 - 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 - 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 - 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 - 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 - }, - FontCharMapRef() }, + = { { + u"Courier"_ustr, // family name + u"Normal"_ustr, // style + "Courier", // PSName + 629, + -157, // ascend, descend + FAMILY_MODERN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_FIXED, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 + 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 + 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 + 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 + 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 + 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 + 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 + 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 + 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 + 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 + 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 + 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 + 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 + 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 + 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 + 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 + 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 + 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 + 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 + 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 + 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 + 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 + 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 + 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 + 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 + 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 + 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 + 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 + }, + }, - { u"Courier"_ustr, // family name - u"Italic"_ustr, // style - "Courier-Oblique", // PSName - 629, - -157, // ascend, descend - FAMILY_MODERN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_FIXED, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NORMAL, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 - 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 - 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 - 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 - 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 - 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 - 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 - 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 - 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 - 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 - 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 - 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 - 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 - 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 - 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 - 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 - 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 - 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 - 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 - 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 - 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 - 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 - 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 - 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 - 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 - 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 - 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 - 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Courier"_ustr, // family name + u"Italic"_ustr, // style + "Courier-Oblique", // PSName + 629, + -157, // ascend, descend + FAMILY_MODERN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_FIXED, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NORMAL, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 + 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 + 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 + 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 + 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 + 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 + 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 + 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 + 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 + 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 + 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 + 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 + 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 + 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 + 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 + 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 + 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 + 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 + 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 + 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 + 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 + 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 + 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 + 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 + 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 + 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 + 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 + 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 + }, + }, - { u"Courier"_ustr, // family name - u"Bold"_ustr, // style - "Courier-Bold", // PSName - 629, - -157, // ascend, descend - FAMILY_MODERN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_FIXED, // pitch - WIDTH_NORMAL, // width type - WEIGHT_BOLD, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 - 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 - 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 - 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 - 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 - 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 - 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 - 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 - 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 - 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 - 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 - 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 - 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 - 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 - 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 - 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 - 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 - 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 - 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 - 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 - 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 - 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 - 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 - 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 - 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 - 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 - 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 - 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Courier"_ustr, // family name + u"Bold"_ustr, // style + "Courier-Bold", // PSName + 629, + -157, // ascend, descend + FAMILY_MODERN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_FIXED, // pitch + WIDTH_NORMAL, // width type + WEIGHT_BOLD, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 + 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 + 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 + 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 + 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 + 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 + 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 + 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 + 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 + 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 + 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 + 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 + 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 + 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 + 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 + 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 + 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 + 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 + 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 + 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 + 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 + 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 + 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 + 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 + 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 + 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 + 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 + 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 + }, + }, - { u"Courier"_ustr, // family name - u"Bold Italic"_ustr, // style - "Courier-BoldOblique", // PSName - 629, - -157, // ascend, descend - FAMILY_MODERN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_FIXED, // pitch - WIDTH_NORMAL, // width type - WEIGHT_BOLD, // weight type - ITALIC_NORMAL, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 - 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 - 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 - 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 - 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 - 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 - 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 - 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 - 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 - 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 - 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 - 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 - 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 - 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 - 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 - 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 - 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 - 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 - 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 - 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 - 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 - 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 - 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 - 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 - 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 - 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 - 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 - 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Courier"_ustr, // family name + u"Bold Italic"_ustr, // style + "Courier-BoldOblique", // PSName + 629, + -157, // ascend, descend + FAMILY_MODERN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_FIXED, // pitch + WIDTH_NORMAL, // width type + WEIGHT_BOLD, // weight type + ITALIC_NORMAL, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 600, 600, 600, 600, 600, 600, 600, 600, // 32 - 39 + 600, 600, 600, 600, 600, 600, 600, 600, // 40 - 47 + 600, 600, 600, 600, 600, 600, 600, 600, // 48 - 55 + 600, 600, 600, 600, 600, 600, 600, 600, // 56 - 63 + 600, 600, 600, 600, 600, 600, 600, 600, // 64 - 71 + 600, 600, 600, 600, 600, 600, 600, 600, // 72 - 79 + 600, 600, 600, 600, 600, 600, 600, 600, // 80 - 87 + 600, 600, 600, 600, 600, 600, 600, 600, // 88 - 95 + 600, 600, 600, 600, 600, 600, 600, 600, // 96 - 103 + 600, 600, 600, 600, 600, 600, 600, 600, // 104 - 111 + 600, 600, 600, 600, 600, 600, 600, 600, // 112 - 119 + 600, 600, 600, 600, 600, 600, 600, 0, // 120 - 127 + 600, 0, 600, 600, 600, 600, 600, 600, // 128 - 135 + 600, 600, 600, 600, 600, 0, 600, 0, // 136 - 143 + 0, 600, 600, 600, 600, 600, 600, 600, // 144 - 151 + 600, 600, 600, 600, 600, 0, 600, 600, // 152 - 159 + 600, 600, 600, 600, 600, 600, 600, 600, // 160 - 167 + 600, 600, 600, 600, 600, 600, 600, 600, // 168 - 175 + 600, 600, 600, 600, 600, 600, 600, 600, // 176 - 183 + 600, 600, 600, 600, 600, 600, 600, 600, // 184 - 191 + 600, 600, 600, 600, 600, 600, 600, 600, // 192 - 199 + 600, 600, 600, 600, 600, 600, 600, 600, // 200 - 207 + 600, 600, 600, 600, 600, 600, 600, 600, // 208 - 215 + 600, 600, 600, 600, 600, 600, 600, 600, // 216 - 223 + 600, 600, 600, 600, 600, 600, 600, 600, // 224 - 231 + 600, 600, 600, 600, 600, 600, 600, 600, // 232 - 239 + 600, 600, 600, 600, 600, 600, 600, 600, // 240 - 247 + 600, 600, 600, 600, 600, 600, 600, 600 // 248 - 255 + }, + }, - { u"Helvetica"_ustr, // family name - u"Normal"_ustr, // style - "Helvetica", // PSName - 718, - -207, // ascend, descend - FAMILY_SWISS, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 278, 278, 355, 556, 556, 889, 667, 191, // 32 - 39 - 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 - 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 - 556, 556, 278, 278, 584, 584, 584, 556, // 56 - 63 - 1015, 667, 667, 722, 722, 667, 611, 778, // 64 - 71 - 722, 278, 500, 667, 556, 833, 722, 778, // 72 - 79 - 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 - 667, 667, 611, 278, 278, 278, 469, 556, // 88 - 95 - 333, 556, 556, 500, 556, 556, 278, 556, // 96 - 103 - 556, 222, 222, 500, 222, 833, 556, 556, // 104 - 111 - 556, 556, 333, 500, 278, 556, 500, 722, // 112 - 119 - 500, 500, 500, 334, 260, 334, 584, 0, // 120 - 127 - 556, 0, 222, 556, 333, 1000, 556, 556, // 128 - 135 - 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 - 0, 222, 222, 333, 333, 350, 556, 1000, // 144 - 151 - 333, 1000, 500, 333, 944, 0, 500, 667, // 152 - 159 - 278, 333, 556, 556, 556, 556, 260, 556, // 160 - 167 - 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 - 400, 584, 333, 333, 333, 556, 537, 278, // 176 - 183 - 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 - 667, 667, 667, 667, 667, 667, 1000, 722, // 192 - 199 - 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 - 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 - 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 - 556, 556, 556, 556, 556, 556, 889, 500, // 224 - 231 - 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 - 556, 556, 556, 556, 556, 556, 556, 584, // 240 - 247 - 611, 556, 556, 556, 556, 500, 556, 500 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Helvetica"_ustr, // family name + u"Normal"_ustr, // style + "Helvetica", // PSName + 718, + -207, // ascend, descend + FAMILY_SWISS, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 278, 278, 355, 556, 556, 889, 667, 191, // 32 - 39 + 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 + 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 + 556, 556, 278, 278, 584, 584, 584, 556, // 56 - 63 + 1015, 667, 667, 722, 722, 667, 611, 778, // 64 - 71 + 722, 278, 500, 667, 556, 833, 722, 778, // 72 - 79 + 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 + 667, 667, 611, 278, 278, 278, 469, 556, // 88 - 95 + 333, 556, 556, 500, 556, 556, 278, 556, // 96 - 103 + 556, 222, 222, 500, 222, 833, 556, 556, // 104 - 111 + 556, 556, 333, 500, 278, 556, 500, 722, // 112 - 119 + 500, 500, 500, 334, 260, 334, 584, 0, // 120 - 127 + 556, 0, 222, 556, 333, 1000, 556, 556, // 128 - 135 + 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 + 0, 222, 222, 333, 333, 350, 556, 1000, // 144 - 151 + 333, 1000, 500, 333, 944, 0, 500, 667, // 152 - 159 + 278, 333, 556, 556, 556, 556, 260, 556, // 160 - 167 + 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 + 400, 584, 333, 333, 333, 556, 537, 278, // 176 - 183 + 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 + 667, 667, 667, 667, 667, 667, 1000, 722, // 192 - 199 + 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 + 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 + 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 + 556, 556, 556, 556, 556, 556, 889, 500, // 224 - 231 + 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 + 556, 556, 556, 556, 556, 556, 556, 584, // 240 - 247 + 611, 556, 556, 556, 556, 500, 556, 500 // 248 - 255 + }, + }, - { u"Helvetica"_ustr, // family name - u"Italic"_ustr, // style - "Helvetica-Oblique", // PSName - 718, - -207, // ascend, descend - FAMILY_SWISS, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NORMAL, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 278, 278, 355, 556, 556, 889, 667, 191, // 32 - 39 - 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 - 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 - 556, 556, 278, 278, 584, 584, 584, 556, // 56 - 63 - 1015, 667, 667, 722, 722, 667, 611, 778, // 64 - 71 - 722, 278, 500, 667, 556, 833, 722, 778, // 72 - 79 - 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 - 667, 667, 611, 278, 278, 278, 469, 556, // 88 - 95 - 333, 556, 556, 500, 556, 556, 278, 556, // 96 - 103 - 556, 222, 222, 500, 222, 833, 556, 556, // 104 - 111 - 556, 556, 333, 500, 278, 556, 500, 722, // 112 - 119 - 500, 500, 500, 334, 260, 334, 584, 0, // 120 - 127 - 556, 0, 222, 556, 333, 1000, 556, 556, // 128 - 135 - 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 - 0, 222, 222, 333, 333, 350, 556, 1000, // 144 - 151 - 333, 1000, 500, 333, 944, 0, 500, 667, // 152 - 159 - 278, 333, 556, 556, 556, 556, 260, 556, // 160 - 167 - 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 - 400, 584, 333, 333, 333, 556, 537, 278, // 176 - 183 - 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 - 667, 667, 667, 667, 667, 667, 1000, 722, // 192 - 199 - 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 - 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 - 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 - 556, 556, 556, 556, 556, 556, 889, 500, // 224 - 231 - 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 - 556, 556, 556, 556, 556, 556, 556, 584, // 240 - 247 - 611, 556, 556, 556, 556, 500, 556, 500 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Helvetica"_ustr, // family name + u"Italic"_ustr, // style + "Helvetica-Oblique", // PSName + 718, + -207, // ascend, descend + FAMILY_SWISS, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NORMAL, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 278, 278, 355, 556, 556, 889, 667, 191, // 32 - 39 + 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 + 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 + 556, 556, 278, 278, 584, 584, 584, 556, // 56 - 63 + 1015, 667, 667, 722, 722, 667, 611, 778, // 64 - 71 + 722, 278, 500, 667, 556, 833, 722, 778, // 72 - 79 + 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 + 667, 667, 611, 278, 278, 278, 469, 556, // 88 - 95 + 333, 556, 556, 500, 556, 556, 278, 556, // 96 - 103 + 556, 222, 222, 500, 222, 833, 556, 556, // 104 - 111 + 556, 556, 333, 500, 278, 556, 500, 722, // 112 - 119 + 500, 500, 500, 334, 260, 334, 584, 0, // 120 - 127 + 556, 0, 222, 556, 333, 1000, 556, 556, // 128 - 135 + 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 + 0, 222, 222, 333, 333, 350, 556, 1000, // 144 - 151 + 333, 1000, 500, 333, 944, 0, 500, 667, // 152 - 159 + 278, 333, 556, 556, 556, 556, 260, 556, // 160 - 167 + 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 + 400, 584, 333, 333, 333, 556, 537, 278, // 176 - 183 + 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 + 667, 667, 667, 667, 667, 667, 1000, 722, // 192 - 199 + 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 + 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 + 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 + 556, 556, 556, 556, 556, 556, 889, 500, // 224 - 231 + 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 + 556, 556, 556, 556, 556, 556, 556, 584, // 240 - 247 + 611, 556, 556, 556, 556, 500, 556, 500 // 248 - 255 + }, + }, - { u"Helvetica"_ustr, // family name - u"Bold"_ustr, // style - "Helvetica-Bold", // PSName - 718, - -207, // ascend, descend - FAMILY_SWISS, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_BOLD, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 278, 333, 474, 556, 556, 889, 722, 238, // 32 - 39 - 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 - 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 - 556, 556, 333, 333, 584, 584, 584, 611, // 56 - 63 - 975, 722, 722, 722, 722, 667, 611, 778, // 64 - 71 - 722, 278, 556, 722, 611, 833, 722, 778, // 72 - 79 - 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 - 667, 667, 611, 333, 278, 333, 584, 556, // 88 - 95 - 333, 556, 611, 556, 611, 556, 333, 611, // 96 - 103 - 611, 278, 278, 556, 278, 889, 611, 611, // 104 - 111 - 611, 611, 389, 556, 333, 611, 556, 778, // 112 - 119 - 556, 556, 500, 389, 280, 389, 584, 0, // 120 - 127 - 556, 0, 278, 556, 500, 1000, 556, 556, // 128 - 135 - 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 - 0, 278, 278, 500, 500, 350, 556, 1000, // 144 - 151 - 333, 1000, 556, 333, 944, 0, 500, 667, // 152 - 159 - 278, 333, 556, 556, 556, 556, 280, 556, // 160 - 167 - 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 - 400, 584, 333, 333, 333, 611, 556, 278, // 176 - 183 - 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 - 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199 - 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 - 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 - 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 - 556, 556, 556, 556, 556, 556, 889, 556, // 224 - 231 - 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 - 611, 611, 611, 611, 611, 611, 611, 584, // 240 - 247 - 611, 611, 611, 611, 611, 556, 611, 556 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Helvetica"_ustr, // family name + u"Bold"_ustr, // style + "Helvetica-Bold", // PSName + 718, + -207, // ascend, descend + FAMILY_SWISS, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_BOLD, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 278, 333, 474, 556, 556, 889, 722, 238, // 32 - 39 + 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 + 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 + 556, 556, 333, 333, 584, 584, 584, 611, // 56 - 63 + 975, 722, 722, 722, 722, 667, 611, 778, // 64 - 71 + 722, 278, 556, 722, 611, 833, 722, 778, // 72 - 79 + 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 + 667, 667, 611, 333, 278, 333, 584, 556, // 88 - 95 + 333, 556, 611, 556, 611, 556, 333, 611, // 96 - 103 + 611, 278, 278, 556, 278, 889, 611, 611, // 104 - 111 + 611, 611, 389, 556, 333, 611, 556, 778, // 112 - 119 + 556, 556, 500, 389, 280, 389, 584, 0, // 120 - 127 + 556, 0, 278, 556, 500, 1000, 556, 556, // 128 - 135 + 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 + 0, 278, 278, 500, 500, 350, 556, 1000, // 144 - 151 + 333, 1000, 556, 333, 944, 0, 500, 667, // 152 - 159 + 278, 333, 556, 556, 556, 556, 280, 556, // 160 - 167 + 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 + 400, 584, 333, 333, 333, 611, 556, 278, // 176 - 183 + 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 + 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199 + 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 + 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 + 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 + 556, 556, 556, 556, 556, 556, 889, 556, // 224 - 231 + 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 + 611, 611, 611, 611, 611, 611, 611, 584, // 240 - 247 + 611, 611, 611, 611, 611, 556, 611, 556 // 248 - 255 + }, + }, - { u"Helvetica"_ustr, // family name - u"Bold Italic"_ustr, // style - "Helvetica-BoldOblique", // PSName - 718, - -207, // ascend, descend - FAMILY_SWISS, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_BOLD, // weight type - ITALIC_NORMAL, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 278, 333, 474, 556, 556, 889, 722, 238, // 32 - 39 - 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 - 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 - 556, 556, 333, 333, 584, 584, 584, 611, // 56 - 63 - 975, 722, 722, 722, 722, 667, 611, 778, // 64 - 71 - 722, 278, 556, 722, 611, 833, 722, 778, // 72 - 79 - 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 - 667, 667, 611, 333, 278, 333, 584, 556, // 88 - 95 - 333, 556, 611, 556, 611, 556, 333, 611, // 96 - 103 - 611, 278, 278, 556, 278, 889, 611, 611, // 104 - 111 - 611, 611, 389, 556, 333, 611, 556, 778, // 112 - 119 - 556, 556, 500, 389, 280, 389, 584, 0, // 120 - 127 - 556, 0, 278, 556, 500, 1000, 556, 556, // 128 - 135 - 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 - 0, 278, 278, 500, 500, 350, 556, 1000, // 144 - 151 - 333, 1000, 556, 333, 944, 0, 500, 667, // 152 - 159 - 278, 333, 556, 556, 556, 556, 280, 556, // 160 - 167 - 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 - 400, 584, 333, 333, 333, 611, 556, 278, // 176 - 183 - 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 - 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199 - 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 - 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 - 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 - 556, 556, 556, 556, 556, 556, 889, 556, // 224 - 231 - 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 - 611, 611, 611, 611, 611, 611, 611, 584, // 240 - 247 - 611, 611, 611, 611, 611, 556, 611, 556 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Helvetica"_ustr, // family name + u"Bold Italic"_ustr, // style + "Helvetica-BoldOblique", // PSName + 718, + -207, // ascend, descend + FAMILY_SWISS, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_BOLD, // weight type + ITALIC_NORMAL, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 278, 333, 474, 556, 556, 889, 722, 238, // 32 - 39 + 333, 333, 389, 584, 278, 333, 278, 278, // 40 - 47 + 556, 556, 556, 556, 556, 556, 556, 556, // 48 - 55 + 556, 556, 333, 333, 584, 584, 584, 611, // 56 - 63 + 975, 722, 722, 722, 722, 667, 611, 778, // 64 - 71 + 722, 278, 556, 722, 611, 833, 722, 778, // 72 - 79 + 667, 778, 722, 667, 611, 722, 667, 944, // 80 - 87 + 667, 667, 611, 333, 278, 333, 584, 556, // 88 - 95 + 333, 556, 611, 556, 611, 556, 333, 611, // 96 - 103 + 611, 278, 278, 556, 278, 889, 611, 611, // 104 - 111 + 611, 611, 389, 556, 333, 611, 556, 778, // 112 - 119 + 556, 556, 500, 389, 280, 389, 584, 0, // 120 - 127 + 556, 0, 278, 556, 500, 1000, 556, 556, // 128 - 135 + 333, 1000, 667, 333, 1000, 0, 500, 0, // 136 - 143 + 0, 278, 278, 500, 500, 350, 556, 1000, // 144 - 151 + 333, 1000, 556, 333, 944, 0, 500, 667, // 152 - 159 + 278, 333, 556, 556, 556, 556, 280, 556, // 160 - 167 + 333, 737, 370, 556, 584, 333, 737, 333, // 168 - 175 + 400, 584, 333, 333, 333, 611, 556, 278, // 176 - 183 + 333, 333, 365, 556, 834, 834, 834, 611, // 184 - 191 + 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199 + 667, 667, 667, 667, 278, 278, 278, 278, // 200 - 207 + 722, 722, 778, 778, 778, 778, 778, 584, // 208 - 215 + 778, 722, 722, 722, 722, 667, 667, 611, // 216 - 223 + 556, 556, 556, 556, 556, 556, 889, 556, // 224 - 231 + 556, 556, 556, 556, 278, 278, 278, 278, // 232 - 239 + 611, 611, 611, 611, 611, 611, 611, 584, // 240 - 247 + 611, 611, 611, 611, 611, 556, 611, 556 // 248 - 255 + }, + }, - { u"Times"_ustr, // family name - u"Normal"_ustr, // style - "Times-Roman", // PSName - 683, - -217, // ascend, descend - FAMILY_ROMAN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 250, 333, 408, 500, 500, 833, 778, 180, // 32 - 39 - 333, 333, 500, 564, 250, 333, 250, 278, // 40 - 47 - 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 - 500, 500, 278, 278, 564, 564, 564, 444, // 56 - 63 - 921, 722, 667, 667, 722, 611, 556, 722, // 64 - 71 - 722, 333, 389, 722, 611, 889, 722, 722, // 72 - 79 - 556, 722, 667, 556, 611, 722, 722, 944, // 80 - 87 - 722, 722, 611, 333, 278, 333, 469, 500, // 88 - 95 - 333, 444, 500, 444, 500, 444, 333, 500, // 96 - 103 - 500, 278, 278, 500, 278, 778, 500, 500, // 104 - 111 - 500, 500, 333, 389, 278, 500, 500, 722, // 112 - 119 - 500, 500, 444, 480, 200, 480, 541, 0, // 120 - 127 - 500, 0, 333, 500, 444, 1000, 500, 500, // 128 - 135 - 333, 1000, 556, 333, 889, 0, 444, 0, // 136 - 143 - 0, 333, 333, 444, 444, 350, 500, 1000, // 144 - 151 - 333, 980, 389, 333, 722, 0, 444, 722, // 152 - 159 - 250, 333, 500, 500, 500, 500, 200, 500, // 160 - 167 - 333, 760, 276, 500, 564, 333, 760, 333, // 168 - 175 - 400, 564, 300, 300, 333, 500, 453, 250, // 176 - 183 - 333, 300, 310, 500, 750, 750, 750, 444, // 184 - 191 - 722, 722, 722, 722, 722, 722, 889, 667, // 192 - 199 - 611, 611, 611, 611, 333, 333, 333, 333, // 200 - 207 - 722, 722, 722, 722, 722, 722, 722, 564, // 208 - 215 - 722, 722, 722, 722, 722, 722, 556, 500, // 216 - 223 - 444, 444, 444, 444, 444, 444, 667, 444, // 224 - 231 - 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 - 500, 500, 500, 500, 500, 500, 500, 564, // 240 - 247 - 500, 500, 500, 500, 500, 500, 500, 500 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Times"_ustr, // family name + u"Normal"_ustr, // style + "Times-Roman", // PSName + 683, + -217, // ascend, descend + FAMILY_ROMAN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 250, 333, 408, 500, 500, 833, 778, 180, // 32 - 39 + 333, 333, 500, 564, 250, 333, 250, 278, // 40 - 47 + 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 + 500, 500, 278, 278, 564, 564, 564, 444, // 56 - 63 + 921, 722, 667, 667, 722, 611, 556, 722, // 64 - 71 + 722, 333, 389, 722, 611, 889, 722, 722, // 72 - 79 + 556, 722, 667, 556, 611, 722, 722, 944, // 80 - 87 + 722, 722, 611, 333, 278, 333, 469, 500, // 88 - 95 + 333, 444, 500, 444, 500, 444, 333, 500, // 96 - 103 + 500, 278, 278, 500, 278, 778, 500, 500, // 104 - 111 + 500, 500, 333, 389, 278, 500, 500, 722, // 112 - 119 + 500, 500, 444, 480, 200, 480, 541, 0, // 120 - 127 + 500, 0, 333, 500, 444, 1000, 500, 500, // 128 - 135 + 333, 1000, 556, 333, 889, 0, 444, 0, // 136 - 143 + 0, 333, 333, 444, 444, 350, 500, 1000, // 144 - 151 + 333, 980, 389, 333, 722, 0, 444, 722, // 152 - 159 + 250, 333, 500, 500, 500, 500, 200, 500, // 160 - 167 + 333, 760, 276, 500, 564, 333, 760, 333, // 168 - 175 + 400, 564, 300, 300, 333, 500, 453, 250, // 176 - 183 + 333, 300, 310, 500, 750, 750, 750, 444, // 184 - 191 + 722, 722, 722, 722, 722, 722, 889, 667, // 192 - 199 + 611, 611, 611, 611, 333, 333, 333, 333, // 200 - 207 + 722, 722, 722, 722, 722, 722, 722, 564, // 208 - 215 + 722, 722, 722, 722, 722, 722, 556, 500, // 216 - 223 + 444, 444, 444, 444, 444, 444, 667, 444, // 224 - 231 + 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 + 500, 500, 500, 500, 500, 500, 500, 564, // 240 - 247 + 500, 500, 500, 500, 500, 500, 500, 500 // 248 - 255 + }, + }, - { u"Times"_ustr, // family name - u"Italic"_ustr, // style - "Times-Italic", // PSName - 683, - -217, // ascend, descend - FAMILY_ROMAN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NORMAL, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 250, 333, 420, 500, 500, 833, 778, 214, // 32 - 39 - 333, 333, 500, 675, 250, 333, 250, 278, // 40 - 47 - 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 - 500, 500, 333, 333, 675, 675, 675, 500, // 56 - 63 - 920, 611, 611, 667, 722, 611, 611, 722, // 64 - 71 - 722, 333, 444, 667, 556, 833, 667, 722, // 72 - 79 - 611, 722, 611, 500, 556, 722, 611, 833, // 80 - 87 - 611, 556, 556, 389, 278, 389, 422, 500, // 88 - 95 - 333, 500, 500, 444, 500, 444, 278, 500, // 96 - 103 - 500, 278, 278, 444, 278, 722, 500, 500, // 104 - 111 - 500, 500, 389, 389, 278, 500, 444, 667, // 112 - 119 - 444, 444, 389, 400, 275, 400, 541, 0, // 120 - 127 - 500, 0, 333, 500, 556, 889, 500, 500, // 128 - 135 - 333, 1000, 500, 333, 944, 0, 389, 0, // 136 - 143 - 0, 333, 333, 556, 556, 350, 500, 889, // 144 - 151 - 333, 980, 389, 333, 667, 0, 389, 556, // 152 - 159 - 250, 389, 500, 500, 500, 500, 275, 500, // 160 - 167 - 333, 760, 276, 500, 675, 333, 760, 333, // 168 - 175 - 400, 675, 300, 300, 333, 500, 523, 250, // 176 - 183 - 333, 300, 310, 500, 750, 750, 750, 500, // 184 - 191 - 611, 611, 611, 611, 611, 611, 889, 667, // 192 - 199 - 611, 611, 611, 611, 333, 333, 333, 333, // 200 - 207 - 722, 667, 722, 722, 722, 722, 722, 675, // 208 - 215 - 722, 722, 722, 722, 722, 556, 611, 500, // 216 - 223 - 500, 500, 500, 500, 500, 500, 667, 444, // 224 - 231 - 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 - 500, 500, 500, 500, 500, 500, 500, 675, // 240 - 247 - 500, 500, 500, 500, 500, 444, 500, 444 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Times"_ustr, // family name + u"Italic"_ustr, // style + "Times-Italic", // PSName + 683, + -217, // ascend, descend + FAMILY_ROMAN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NORMAL, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 250, 333, 420, 500, 500, 833, 778, 214, // 32 - 39 + 333, 333, 500, 675, 250, 333, 250, 278, // 40 - 47 + 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 + 500, 500, 333, 333, 675, 675, 675, 500, // 56 - 63 + 920, 611, 611, 667, 722, 611, 611, 722, // 64 - 71 + 722, 333, 444, 667, 556, 833, 667, 722, // 72 - 79 + 611, 722, 611, 500, 556, 722, 611, 833, // 80 - 87 + 611, 556, 556, 389, 278, 389, 422, 500, // 88 - 95 + 333, 500, 500, 444, 500, 444, 278, 500, // 96 - 103 + 500, 278, 278, 444, 278, 722, 500, 500, // 104 - 111 + 500, 500, 389, 389, 278, 500, 444, 667, // 112 - 119 + 444, 444, 389, 400, 275, 400, 541, 0, // 120 - 127 + 500, 0, 333, 500, 556, 889, 500, 500, // 128 - 135 + 333, 1000, 500, 333, 944, 0, 389, 0, // 136 - 143 + 0, 333, 333, 556, 556, 350, 500, 889, // 144 - 151 + 333, 980, 389, 333, 667, 0, 389, 556, // 152 - 159 + 250, 389, 500, 500, 500, 500, 275, 500, // 160 - 167 + 333, 760, 276, 500, 675, 333, 760, 333, // 168 - 175 + 400, 675, 300, 300, 333, 500, 523, 250, // 176 - 183 + 333, 300, 310, 500, 750, 750, 750, 500, // 184 - 191 + 611, 611, 611, 611, 611, 611, 889, 667, // 192 - 199 + 611, 611, 611, 611, 333, 333, 333, 333, // 200 - 207 + 722, 667, 722, 722, 722, 722, 722, 675, // 208 - 215 + 722, 722, 722, 722, 722, 556, 611, 500, // 216 - 223 + 500, 500, 500, 500, 500, 500, 667, 444, // 224 - 231 + 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 + 500, 500, 500, 500, 500, 500, 500, 675, // 240 - 247 + 500, 500, 500, 500, 500, 444, 500, 444 // 248 - 255 + }, + }, - { u"Times"_ustr, // family name - u"Bold"_ustr, // style - "Times-Bold", // PSName - 683, - -217, // ascend, descend - FAMILY_ROMAN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_BOLD, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 250, 333, 555, 500, 500, 1000, 833, 278, // 32 - 39 - 333, 333, 500, 570, 250, 333, 250, 278, // 40 - 47 - 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 - 500, 500, 333, 333, 570, 570, 570, 500, // 56 - 63 - 930, 722, 667, 722, 722, 667, 611, 778, // 64 - 71 - 778, 389, 500, 778, 667, 944, 722, 778, // 72 - 79 - 611, 778, 722, 556, 667, 722, 722, 1000, // 80 - 87 - 722, 722, 667, 333, 278, 333, 581, 500, // 88 - 95 - 333, 500, 556, 444, 556, 444, 333, 500, // 96 - 103 - 556, 278, 333, 556, 278, 833, 556, 500, // 104 - 111 - 556, 556, 444, 389, 333, 556, 500, 722, // 112 - 119 - 500, 500, 444, 394, 220, 394, 520, 0, // 120 - 127 - 500, 0, 333, 500, 500, 1000, 500, 500, // 128 - 135 - 333, 1000, 556, 333, 1000, 0, 444, 0, // 136 - 143 - 0, 333, 333, 500, 500, 350, 500, 1000, // 144 - 151 - 333, 1000, 389, 333, 722, 0, 444, 722, // 152 - 159 - 250, 333, 500, 500, 500, 500, 220, 500, // 160 - 167 - 333, 747, 300, 500, 570, 333, 747, 333, // 168 - 175 - 400, 570, 300, 300, 333, 556, 540, 250, // 176 - 183 - 333, 300, 330, 500, 750, 750, 750, 500, // 184 - 191 - 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199 - 667, 667, 667, 667, 389, 389, 389, 389, // 200 - 207 - 722, 722, 778, 778, 778, 778, 778, 570, // 208 - 215 - 778, 722, 722, 722, 722, 722, 611, 556, // 216 - 223 - 500, 500, 500, 500, 500, 500, 722, 444, // 224 - 231 - 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 - 500, 556, 500, 500, 500, 500, 500, 570, // 240 - 247 - 500, 556, 556, 556, 556, 500, 556, 500 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Times"_ustr, // family name + u"Bold"_ustr, // style + "Times-Bold", // PSName + 683, + -217, // ascend, descend + FAMILY_ROMAN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_BOLD, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 250, 333, 555, 500, 500, 1000, 833, 278, // 32 - 39 + 333, 333, 500, 570, 250, 333, 250, 278, // 40 - 47 + 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 + 500, 500, 333, 333, 570, 570, 570, 500, // 56 - 63 + 930, 722, 667, 722, 722, 667, 611, 778, // 64 - 71 + 778, 389, 500, 778, 667, 944, 722, 778, // 72 - 79 + 611, 778, 722, 556, 667, 722, 722, 1000, // 80 - 87 + 722, 722, 667, 333, 278, 333, 581, 500, // 88 - 95 + 333, 500, 556, 444, 556, 444, 333, 500, // 96 - 103 + 556, 278, 333, 556, 278, 833, 556, 500, // 104 - 111 + 556, 556, 444, 389, 333, 556, 500, 722, // 112 - 119 + 500, 500, 444, 394, 220, 394, 520, 0, // 120 - 127 + 500, 0, 333, 500, 500, 1000, 500, 500, // 128 - 135 + 333, 1000, 556, 333, 1000, 0, 444, 0, // 136 - 143 + 0, 333, 333, 500, 500, 350, 500, 1000, // 144 - 151 + 333, 1000, 389, 333, 722, 0, 444, 722, // 152 - 159 + 250, 333, 500, 500, 500, 500, 220, 500, // 160 - 167 + 333, 747, 300, 500, 570, 333, 747, 333, // 168 - 175 + 400, 570, 300, 300, 333, 556, 540, 250, // 176 - 183 + 333, 300, 330, 500, 750, 750, 750, 500, // 184 - 191 + 722, 722, 722, 722, 722, 722, 1000, 722, // 192 - 199 + 667, 667, 667, 667, 389, 389, 389, 389, // 200 - 207 + 722, 722, 778, 778, 778, 778, 778, 570, // 208 - 215 + 778, 722, 722, 722, 722, 722, 611, 556, // 216 - 223 + 500, 500, 500, 500, 500, 500, 722, 444, // 224 - 231 + 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 + 500, 556, 500, 500, 500, 500, 500, 570, // 240 - 247 + 500, 556, 556, 556, 556, 500, 556, 500 // 248 - 255 + }, + }, - { u"Times"_ustr, // family name - u"Bold Italic"_ustr, // style - "Times-BoldItalic", // PSName - 683, - -217, // ascend, descend - FAMILY_ROMAN, // family style - RTL_TEXTENCODING_MS_1252, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_BOLD, // weight type - ITALIC_NORMAL, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 250, 389, 555, 500, 500, 833, 778, 278, // 32 - 39 - 333, 333, 500, 570, 250, 333, 250, 278, // 40 - 47 - 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 - 500, 500, 333, 333, 570, 570, 570, 500, // 56 - 63 - 832, 667, 667, 667, 722, 667, 667, 722, // 64 - 71 - 778, 389, 500, 667, 611, 889, 722, 722, // 72 - 79 - 611, 722, 667, 556, 611, 722, 667, 889, // 80 - 87 - 667, 611, 611, 333, 278, 333, 570, 500, // 88 - 95 - 333, 500, 500, 444, 500, 444, 333, 500, // 96 - 103 - 556, 278, 278, 500, 278, 778, 556, 500, // 104 - 111 - 500, 500, 389, 389, 278, 556, 444, 667, // 112 - 119 - 500, 444, 389, 348, 220, 348, 570, 0, // 120 - 127 - 500, 0, 333, 500, 500, 1000, 500, 500, // 128 - 135 - 333, 1000, 556, 333, 944, 0, 389, 0, // 136 - 143 - 0, 333, 333, 500, 500, 350, 500, 1000, // 144 - 151 - 333, 1000, 389, 333, 722, 0, 389, 611, // 152 - 159 - 250, 389, 500, 500, 500, 500, 220, 500, // 160 - 167 - 333, 747, 266, 500, 606, 333, 747, 333, // 168 - 175 - 400, 570, 300, 300, 333, 576, 500, 250, // 176 - 183 - 333, 300, 300, 500, 750, 750, 750, 500, // 184 - 191 - 667, 667, 667, 667, 667, 667, 944, 667, // 192 - 199 - 667, 667, 667, 667, 389, 389, 389, 389, // 200 - 207 - 722, 722, 722, 722, 722, 722, 722, 570, // 208 - 215 - 722, 722, 722, 722, 722, 611, 611, 500, // 216 - 223 - 500, 500, 500, 500, 500, 500, 722, 444, // 224 - 231 - 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 - 500, 556, 500, 500, 500, 500, 500, 570, // 240 - 247 - 500, 556, 556, 556, 556, 444, 500, 444 // 248 - 255 - }, - FontCharMapRef() }, + { + u"Times"_ustr, // family name + u"Bold Italic"_ustr, // style + "Times-BoldItalic", // PSName + 683, + -217, // ascend, descend + FAMILY_ROMAN, // family style + RTL_TEXTENCODING_MS_1252, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_BOLD, // weight type + ITALIC_NORMAL, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 250, 389, 555, 500, 500, 833, 778, 278, // 32 - 39 + 333, 333, 500, 570, 250, 333, 250, 278, // 40 - 47 + 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 + 500, 500, 333, 333, 570, 570, 570, 500, // 56 - 63 + 832, 667, 667, 667, 722, 667, 667, 722, // 64 - 71 + 778, 389, 500, 667, 611, 889, 722, 722, // 72 - 79 + 611, 722, 667, 556, 611, 722, 667, 889, // 80 - 87 + 667, 611, 611, 333, 278, 333, 570, 500, // 88 - 95 + 333, 500, 500, 444, 500, 444, 333, 500, // 96 - 103 + 556, 278, 278, 500, 278, 778, 556, 500, // 104 - 111 + 500, 500, 389, 389, 278, 556, 444, 667, // 112 - 119 + 500, 444, 389, 348, 220, 348, 570, 0, // 120 - 127 + 500, 0, 333, 500, 500, 1000, 500, 500, // 128 - 135 + 333, 1000, 556, 333, 944, 0, 389, 0, // 136 - 143 + 0, 333, 333, 500, 500, 350, 500, 1000, // 144 - 151 + 333, 1000, 389, 333, 722, 0, 389, 611, // 152 - 159 + 250, 389, 500, 500, 500, 500, 220, 500, // 160 - 167 + 333, 747, 266, 500, 606, 333, 747, 333, // 168 - 175 + 400, 570, 300, 300, 333, 576, 500, 250, // 176 - 183 + 333, 300, 300, 500, 750, 750, 750, 500, // 184 - 191 + 667, 667, 667, 667, 667, 667, 944, 667, // 192 - 199 + 667, 667, 667, 667, 389, 389, 389, 389, // 200 - 207 + 722, 722, 722, 722, 722, 722, 722, 570, // 208 - 215 + 722, 722, 722, 722, 722, 611, 611, 500, // 216 - 223 + 500, 500, 500, 500, 500, 500, 722, 444, // 224 - 231 + 444, 444, 444, 444, 278, 278, 278, 278, // 232 - 239 + 500, 556, 500, 500, 500, 500, 500, 570, // 240 - 247 + 500, 556, 556, 556, 556, 444, 500, 444 // 248 - 255 + }, + }, // The font name "Symbol" is too generic and causes plenty of trouble. // To ensure WYSIWIG the PDF-Base14 variant gets a not-confusable name - { u"PDF_Base14_Symbol"_ustr, // family name - u"Normal"_ustr, // style - "Symbol", // PSName - 1010, - -293, // ascend, descend - FAMILY_DONTKNOW, // family style - RTL_TEXTENCODING_ADOBE_SYMBOL, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 250, 333, 713, 500, 549, 833, 778, 439, // 32 - 39 - 333, 333, 500, 549, 250, 549, 250, 278, // 40 - 47 - 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 - 500, 500, 278, 278, 549, 549, 549, 444, // 56 - 63 - 549, 722, 667, 722, 612, 611, 763, 603, // 64 - 71 - 722, 333, 631, 722, 686, 889, 722, 722, // 72 - 79 - 768, 741, 556, 592, 611, 690, 439, 768, // 80 - 87 - 645, 795, 611, 333, 863, 333, 658, 500, // 88 - 95 - 500, 631, 549, 549, 494, 439, 521, 411, // 96 - 103 - 603, 329, 603, 549, 549, 576, 521, 549, // 104 - 111 - 549, 521, 549, 603, 439, 576, 713, 686, // 112 - 119 - 493, 686, 494, 480, 200, 480, 549, 0, // 120 - 127 - 0, 0, 0, 0, 0, 0, 0, 0, // 128 - 135 - 0, 0, 0, 0, 0, 0, 0, 0, // 136 - 143 - 0, 0, 0, 0, 0, 0, 0, 0, // 144 - 151 - 0, 0, 0, 0, 0, 0, 0, 0, // 152 - 159 - 750, 620, 247, 549, 167, 713, 500, 753, // 160 - 167 - 753, 753, 753, 1042, 987, 603, 987, 603, // 168 - 175 - 400, 549, 411, 549, 549, 713, 494, 460, // 176 - 183 - 549, 549, 549, 549, 1000, 603, 1000, 658, // 184 - 191 - 823, 686, 795, 987, 768, 768, 823, 768, // 192 - 199 - 768, 713, 713, 713, 713, 713, 713, 713, // 200 - 207 - 768, 713, 790, 790, 890, 823, 549, 250, // 208 - 215 - 713, 603, 603, 1042, 987, 603, 987, 603, // 216 - 223 - 494, 329, 790, 790, 786, 713, 384, 384, // 224 - 231 - 384, 384, 384, 384, 494, 494, 494, 494, // 232 - 239 - 0, 329, 274, 686, 686, 686, 384, 384, // 240 - 247 - 384, 384, 384, 384, 494, 494, 494, 0 // 248 - 255 - }, - FontCharMapRef() }, + { + u"PDF_Base14_Symbol"_ustr, // family name + u"Normal"_ustr, // style + "Symbol", // PSName + 1010, + -293, // ascend, descend + FAMILY_DONTKNOW, // family style + RTL_TEXTENCODING_ADOBE_SYMBOL, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 250, 333, 713, 500, 549, 833, 778, 439, // 32 - 39 + 333, 333, 500, 549, 250, 549, 250, 278, // 40 - 47 + 500, 500, 500, 500, 500, 500, 500, 500, // 48 - 55 + 500, 500, 278, 278, 549, 549, 549, 444, // 56 - 63 + 549, 722, 667, 722, 612, 611, 763, 603, // 64 - 71 + 722, 333, 631, 722, 686, 889, 722, 722, // 72 - 79 + 768, 741, 556, 592, 611, 690, 439, 768, // 80 - 87 + 645, 795, 611, 333, 863, 333, 658, 500, // 88 - 95 + 500, 631, 549, 549, 494, 439, 521, 411, // 96 - 103 + 603, 329, 603, 549, 549, 576, 521, 549, // 104 - 111 + 549, 521, 549, 603, 439, 576, 713, 686, // 112 - 119 + 493, 686, 494, 480, 200, 480, 549, 0, // 120 - 127 + 0, 0, 0, 0, 0, 0, 0, 0, // 128 - 135 + 0, 0, 0, 0, 0, 0, 0, 0, // 136 - 143 + 0, 0, 0, 0, 0, 0, 0, 0, // 144 - 151 + 0, 0, 0, 0, 0, 0, 0, 0, // 152 - 159 + 750, 620, 247, 549, 167, 713, 500, 753, // 160 - 167 + 753, 753, 753, 1042, 987, 603, 987, 603, // 168 - 175 + 400, 549, 411, 549, 549, 713, 494, 460, // 176 - 183 + 549, 549, 549, 549, 1000, 603, 1000, 658, // 184 - 191 + 823, 686, 795, 987, 768, 768, 823, 768, // 192 - 199 + 768, 713, 713, 713, 713, 713, 713, 713, // 200 - 207 + 768, 713, 790, 790, 890, 823, 549, 250, // 208 - 215 + 713, 603, 603, 1042, 987, 603, 987, 603, // 216 - 223 + 494, 329, 790, 790, 786, 713, 384, 384, // 224 - 231 + 384, 384, 384, 384, 494, 494, 494, 494, // 232 - 239 + 0, 329, 274, 686, 686, 686, 384, 384, // 240 - 247 + 384, 384, 384, 384, 494, 494, 494, 0 // 248 - 255 + }, + }, - { u"ZapfDingbats"_ustr, // family name - u"Normal"_ustr, // style - "ZapfDingbats", // PSName - 820, - -143, // ascend, descend - FAMILY_DONTKNOW, // family style - RTL_TEXTENCODING_ADOBE_DINGBATS, // charset - PITCH_VARIABLE, // pitch - WIDTH_NORMAL, // width type - WEIGHT_NORMAL, // weight type - ITALIC_NONE, // italic type - { - 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 - 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 - 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 - 278, 974, 961, 974, 980, 719, 789, 790, // 32 - 39 - 791, 690, 960, 939, 549, 855, 911, 933, // 40 - 47 - 911, 945, 974, 755, 846, 762, 761, 571, // 48 - 55 - 677, 763, 760, 759, 754, 494, 552, 537, // 56 - 63 - 577, 692, 786, 788, 788, 790, 793, 794, // 64 - 71 - 816, 823, 789, 841, 823, 833, 816, 831, // 72 - 79 - 923, 744, 723, 749, 790, 792, 695, 776, // 80 - 87 - 768, 792, 759, 707, 708, 682, 701, 826, // 88 - 95 - 815, 789, 789, 707, 687, 696, 689, 786, // 96 - 103 - 787, 713, 791, 785, 791, 873, 761, 762, // 104 - 111 - 762, 759, 759, 892, 892, 788, 784, 438, // 112 - 119 - 138, 277, 415, 392, 392, 668, 668, 0, // 120 - 127 - 390, 390, 317, 317, 276, 276, 509, 509, // 128 - 135 - 410, 410, 234, 234, 334, 334, 0, 0, // 136 - 143 - 0, 0, 0, 0, 0, 0, 0, 0, // 144 - 151 - 0, 0, 0, 0, 0, 0, 0, 0, // 152 - 159 - 0, 732, 544, 544, 910, 667, 760, 760, // 160 - 167 - 776, 595, 694, 626, 788, 788, 788, 788, // 168 - 175 - 788, 788, 788, 788, 788, 788, 788, 788, // 176 - 183 - 788, 788, 788, 788, 788, 788, 788, 788, // 184 - 191 - 788, 788, 788, 788, 788, 788, 788, 788, // 192 - 199 - 788, 788, 788, 788, 788, 788, 788, 788, // 200 - 207 - 788, 788, 788, 788, 894, 838, 1016, 458, // 208 - 215 - 748, 924, 748, 918, 927, 928, 928, 834, // 216 - 223 - 873, 828, 924, 924, 917, 930, 931, 463, // 224 - 231 - 883, 836, 836, 867, 867, 696, 696, 874, // 232 - 239 - 0, 874, 760, 946, 771, 865, 771, 888, // 240 - 247 - 967, 888, 831, 873, 927, 970, 918, 0 // 248 - 255 - }, - FontCharMapRef() } + { + u"ZapfDingbats"_ustr, // family name + u"Normal"_ustr, // style + "ZapfDingbats", // PSName + 820, + -143, // ascend, descend + FAMILY_DONTKNOW, // family style + RTL_TEXTENCODING_ADOBE_DINGBATS, // charset + PITCH_VARIABLE, // pitch + WIDTH_NORMAL, // width type + WEIGHT_NORMAL, // weight type + ITALIC_NONE, // italic type + { + 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 7 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 23 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 - 31 + 278, 974, 961, 974, 980, 719, 789, 790, // 32 - 39 + 791, 690, 960, 939, 549, 855, 911, 933, // 40 - 47 + 911, 945, 974, 755, 846, 762, 761, 571, // 48 - 55 + 677, 763, 760, 759, 754, 494, 552, 537, // 56 - 63 + 577, 692, 786, 788, 788, 790, 793, 794, // 64 - 71 + 816, 823, 789, 841, 823, 833, 816, 831, // 72 - 79 + 923, 744, 723, 749, 790, 792, 695, 776, // 80 - 87 + 768, 792, 759, 707, 708, 682, 701, 826, // 88 - 95 + 815, 789, 789, 707, 687, 696, 689, 786, // 96 - 103 + 787, 713, 791, 785, 791, 873, 761, 762, // 104 - 111 + 762, 759, 759, 892, 892, 788, 784, 438, // 112 - 119 + 138, 277, 415, 392, 392, 668, 668, 0, // 120 - 127 + 390, 390, 317, 317, 276, 276, 509, 509, // 128 - 135 + 410, 410, 234, 234, 334, 334, 0, 0, // 136 - 143 + 0, 0, 0, 0, 0, 0, 0, 0, // 144 - 151 + 0, 0, 0, 0, 0, 0, 0, 0, // 152 - 159 + 0, 732, 544, 544, 910, 667, 760, 760, // 160 - 167 + 776, 595, 694, 626, 788, 788, 788, 788, // 168 - 175 + 788, 788, 788, 788, 788, 788, 788, 788, // 176 - 183 + 788, 788, 788, 788, 788, 788, 788, 788, // 184 - 191 + 788, 788, 788, 788, 788, 788, 788, 788, // 192 - 199 + 788, 788, 788, 788, 788, 788, 788, 788, // 200 - 207 + 788, 788, 788, 788, 894, 838, 1016, 458, // 208 - 215 + 748, 924, 748, 918, 927, 928, 928, 834, // 216 - 223 + 873, 828, 924, 924, 917, 930, 931, 463, // 224 - 231 + 883, 836, 836, 867, 867, 696, 696, 874, // 232 - 239 + 0, 874, 760, 946, 771, 865, 771, 888, // 240 - 247 + 967, 888, 831, 873, 927, 970, 918, 0 // 248 - 255 + }, + } }; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index bf564d0571e0..4d5ffe83c18a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3593,6 +3593,8 @@ bool PDFWriterImpl::emitLinkAnnotations() const PDFLink& rLink = m_aLinks[i]; if( ! updateObject( rLink.m_nObject ) ) continue; + if( m_aContext.DefaultLinkAction == PDFWriter::RemoveExternalLinks && rLink.m_nDest < 0 ) + continue; OStringBuffer aLine( 1024 ); COSWriter aWriter(aLine, m_aContext.Encryption.getParams(), m_pPDFEncryptor); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index daebda8fb0d4..0e598df58baa 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -221,13 +221,6 @@ void Printer::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize, void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) { - // #110958# Disable alpha VDev, we perform the necessary - VirtualDevice* pOldAlphaVDev = mpAlphaVDev; - - // operation explicitly further below. - if( mpAlphaVDev ) - mpAlphaVDev = nullptr; - GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = nullptr; @@ -285,9 +278,6 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, Pop(); mpMetaFile = pOldMetaFile; - - // #110958# Restore disabled alpha VDev - mpAlphaVDev = pOldAlphaVDev; } void Printer::DrawOutDev( const Point& /*rDestPt*/, const Size& /*rDestSize*/, diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 2b465ce19c38..939b8c5b0dbb 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -681,11 +681,11 @@ void SalGraphics::DrawMask( const SalTwoRect& rPosAry, drawMask( rPosAry, rSalBitmap, nMaskColor ); } -std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev ) +std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev, bool bWithoutAlpha ) { if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() ) mirror( nX, nWidth, rOutDev ); - return getBitmap( nX, nY, nWidth, nHeight ); + return getBitmap( nX, nY, nWidth, nHeight, bWithoutAlpha ); } Color SalGraphics::GetPixel( tools::Long nX, tools::Long nY, const OutputDevice& rOutDev ) diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 40977754b31b..906311e89cec 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -203,21 +203,6 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, if ( mpNext ) mpNext->mpPrev = this; pSVData->maGDIData.mpFirstVirDev = this; - - // initialise alpha layer - if (meFormatAndAlpha != DeviceFormat::WITHOUT_ALPHA) - { - mpAlphaVDev = VclPtr<VirtualDevice>::Create(*this, DeviceFormat::WITHOUT_ALPHA); - mpAlphaVDev->InnerImplSetOutputSizePixel(Size(nDX, nDY), bErase); - mpAlphaVDev->SetBackground( Wallpaper(COL_ALPHA_OPAQUE) ); - mpAlphaVDev->Erase(); - if( GetLineColor() != COL_TRANSPARENT ) - mpAlphaVDev->SetLineColor( COL_ALPHA_OPAQUE ); - if( GetFillColor() != COL_TRANSPARENT ) - mpAlphaVDev->SetFillColor( COL_ALPHA_OPAQUE ); - mpAlphaVDev->SetMapMode( GetMapMode() ); - mpAlphaVDev->SetAntialiasing( GetAntialiasing() ); - } } VirtualDevice::VirtualDevice(const OutputDevice* pCompDev, DeviceFormat eFormatAndAlpha, @@ -269,7 +254,7 @@ void VirtualDevice::dispose() OutputDevice::dispose(); } -bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase) +bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, bool bAlphaMaskTransparent) { SAL_INFO( "vcl.virdev", "VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.Width() << ", " @@ -296,7 +281,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra if ( bErase ) { - bRet = mpVirDev->SetSize( nNewWidth, nNewHeight ); + bRet = mpVirDev->SetSize( nNewWidth, nNewHeight, bAlphaMaskTransparent ); if ( bRet ) { mnOutWidth = rNewSize.Width(); @@ -315,7 +300,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra assert(mpGraphics); - pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice(*mpGraphics, nNewWidth, nNewHeight, meFormatAndAlpha); + pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice(*mpGraphics, nNewWidth, nNewHeight, meFormatAndAlpha, bAlphaMaskTransparent); if ( pNewVirDev ) { SalGraphics* pGraphics = pNewVirDev->AcquireGraphics(); @@ -368,40 +353,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const tools::Rectangle& rRect ) bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase, bool bAlphaMaskTransparent ) { - if( InnerImplSetOutputSizePixel(rNewSize, bErase) ) - { - if (meFormatAndAlpha != DeviceFormat::WITHOUT_ALPHA) - { - // #110958# Setup alpha bitmap - if(mpAlphaVDev && mpAlphaVDev->GetOutputSizePixel() != rNewSize) - { - mpAlphaVDev.disposeAndClear(); - } - - if( !mpAlphaVDev ) - { - mpAlphaVDev = VclPtr<VirtualDevice>::Create(*this, DeviceFormat::WITHOUT_ALPHA); - mpAlphaVDev->InnerImplSetOutputSizePixel(rNewSize, bErase); - mpAlphaVDev->SetBackground( Wallpaper(bAlphaMaskTransparent ? COL_ALPHA_TRANSPARENT : COL_ALPHA_OPAQUE) ); - mpAlphaVDev->Erase(); - } - - // TODO: copy full outdev state to new one, here. Also needed in outdev2.cxx:DrawOutDev - if( GetLineColor() != COL_TRANSPARENT ) - mpAlphaVDev->SetLineColor( COL_ALPHA_OPAQUE ); - - if( GetFillColor() != COL_TRANSPARENT ) - mpAlphaVDev->SetFillColor( COL_ALPHA_OPAQUE ); - - mpAlphaVDev->SetMapMode( GetMapMode() ); - - mpAlphaVDev->SetAntialiasing( GetAntialiasing() ); - } - - return true; - } - - return false; + return InnerImplSetOutputSizePixel(rNewSize, bErase, bAlphaMaskTransparent); } void VirtualDevice::EnableRTL( bool bEnable ) diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx index bafa2711cbff..fddfb842a5ca 100644 --- a/vcl/source/graphic/Manager.cxx +++ b/vcl/source/graphic/Manager.cxx @@ -86,25 +86,34 @@ void MemoryManager::registerObject(MemoryManaged* pMemoryManaged) // Insert and update the used size (bytes) assert(aGuard.owns_lock() && aGuard.mutex() == &maMutex); // coverity[missing_lock: FALSE] - as above assert - mnTotalSize += pMemoryManaged->getCurrentSizeInBytes(); - maObjectList.insert(pMemoryManaged); + // Related: tdf#167007 Only add object bytes if the object is + // actually inserted into the cache + if (maObjectList.insert(pMemoryManaged).second) + mnTotalSize += pMemoryManaged->getCurrentSizeInBytes(); checkStartReduceTimer(); } void MemoryManager::unregisterObject(MemoryManaged* pMemoryManaged) { std::unique_lock aGuard(maMutex); - mnTotalSize -= pMemoryManaged->getCurrentSizeInBytes(); - maObjectList.erase(pMemoryManaged); + // Related: tdf#167007 Only remove object size if the object is + // actually removed from the cache + if (maObjectList.erase(pMemoryManaged)) + mnTotalSize -= pMemoryManaged->getCurrentSizeInBytes(); checkStartReduceTimer(); } void MemoryManager::changeExisting(MemoryManaged* pMemoryManaged, sal_Int64 nNewSize) { std::scoped_lock aGuard(maMutex); - sal_Int64 nOldSize = pMemoryManaged->getCurrentSizeInBytes(); - mnTotalSize -= nOldSize; - mnTotalSize += nNewSize; + // Related: tdf#167007 Only change total cache bytes if the object + // actually exists in the cache + if (maObjectList.find(pMemoryManaged) != maObjectList.end()) + { + sal_Int64 nOldSize = pMemoryManaged->getCurrentSizeInBytes(); + mnTotalSize -= nOldSize; + mnTotalSize += nNewSize; + } pMemoryManaged->setCurrentSizeInBytes(nNewSize); checkStartReduceTimer(); } diff --git a/vcl/source/outdev/background.cxx b/vcl/source/outdev/background.cxx index d73cb786682d..4271399ddc6b 100644 --- a/vcl/source/outdev/background.cxx +++ b/vcl/source/outdev/background.cxx @@ -26,51 +26,18 @@ Color OutputDevice::GetBackgroundColor() const void OutputDevice::SetBackground() { - maBackground = Wallpaper(); mbBackground = false; - - if( mpAlphaVDev ) - mpAlphaVDev->SetBackground(); } void OutputDevice::SetBackground( const Wallpaper& rBackground ) { - maBackground = rBackground; if( rBackground.GetStyle() == WallpaperStyle::NONE ) mbBackground = false; else mbBackground = true; - - if( !mpAlphaVDev ) - return; - - // Some of these are probably wrong (e.g. if the gradient has transparency), - // but hopefully nobody uses that. If you do, feel free to implement it properly. - if( rBackground.GetStyle() == WallpaperStyle::NONE ) - { - mpAlphaVDev->SetBackground( rBackground ); - } - else if( rBackground.IsBitmap()) - { - const BitmapEx& bitmap = rBackground.GetBitmap(); - if( bitmap.IsAlpha()) - mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( bitmap.GetAlphaMask().GetBitmap() ) ) ); - else - mpAlphaVDev->SetBackground( Wallpaper( COL_ALPHA_OPAQUE )); - } - else if( rBackground.IsGradient()) - { - mpAlphaVDev->SetBackground( Wallpaper( COL_ALPHA_OPAQUE )); - } - else - { - // Color background. - int alpha = rBackground.GetColor().GetAlpha(); - mpAlphaVDev->SetBackground( Wallpaper( Color( alpha, alpha, alpha ))); - } } diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 1a23db131a77..441e2f370eeb 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -180,12 +180,6 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, } } } - - if( mpAlphaVDev ) - { - // #i32109#: Make bitmap area opaque - mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); - } } Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const @@ -271,7 +265,12 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const if ( !bClipped ) { - std::shared_ptr<SalBitmap> pSalBmp = mpGraphics->GetBitmap( nX, nY, nWidth, nHeight, *this ); + std::shared_ptr<SalBitmap> pSalBmp; + // if we are a virtual device, we might need to remove the unused alpha channel + bool bWithoutAlpha = false; + if (OUTDEV_VIRDEV == GetOutDevType()) + bWithoutAlpha = static_cast<const VirtualDevice*>(this)->IsWithoutAlpha(); + pSalBmp = mpGraphics->GetBitmap( nX, nY, nWidth, nHeight, *this, bWithoutAlpha ); if( pSalBmp ) { @@ -333,36 +332,14 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r SalBitmap* pSalSrcBmp = bitmap.ImplGetSalBitmap().get(); SalBitmap* pSalAlphaBmp = alpha.GetBitmap().ImplGetSalBitmap().get(); - // #i83087# Naturally, system alpha blending (SalGraphics::DrawAlphaBitmap) cannot work - // with separate alpha VDev - - // try to blend the alpha bitmap with the alpha virtual device - if (mpAlphaVDev) - { - if (ImplLogicToDevicePixel(aOutSz).IsEmpty()) // nothing to draw - return; - Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aRelPt, aOutSz ) ); - if (SalBitmap* pSalAlphaBmp2 = aAlphaBitmap.ImplGetSalBitmap().get()) - { - if (mpGraphics->BlendAlphaBitmap(aTR, *pSalSrcBmp, *pSalAlphaBmp, *pSalAlphaBmp2, *this)) - { - mpAlphaVDev->BlendBitmap(aTR, rAlpha.GetBitmap()); - return; - } - } - } - else - { - if (mpGraphics->DrawAlphaBitmap(aTR, *pSalSrcBmp, *pSalAlphaBmp, *this)) - return; - } + if (mpGraphics->DrawAlphaBitmap(aTR, *pSalSrcBmp, *pSalAlphaBmp, *this)) + return; // we need to make sure Skia never reaches this slow code path // (but do not fail in no-op cases) assert(!SkiaHelper::isVCLSkiaEnabled() || !SkiaHelper::isAlphaMaskBlendingEnabled() || tools::Rectangle(Point(), rBmp.GetSizePixel()) - .Intersection(tools::Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty() - || mpAlphaVDev->LogicToPixel(mpAlphaVDev->GetOutputSizePixel()).IsEmpty()); + .Intersection(tools::Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty()); } tools::Rectangle aBmpRect(Point(), rBmp.GetSizePixel()); @@ -375,7 +352,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r // HACK: The function is broken with alpha vdev and mirroring, mirror here. Bitmap bitmap(rBmp); AlphaMask alpha(rAlpha); - if(mpAlphaVDev && (bHMirr || bVMirr)) + if(bHMirr || bVMirr) { bitmap.Mirror(mirrorFlags); alpha.Mirror(mirrorFlags); @@ -388,173 +365,6 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r namespace { -struct LinearScaleContext -{ - std::unique_ptr<sal_Int32[]> mpMapX; - std::unique_ptr<sal_Int32[]> mpMapY; - - std::unique_ptr<sal_Int32[]> mpMapXOffset; - std::unique_ptr<sal_Int32[]> mpMapYOffset; - - LinearScaleContext(tools::Rectangle const & aDstRect, tools::Rectangle const & aBitmapRect, - Size const & aOutSize, tools::Long nOffX, tools::Long nOffY) - - : mpMapX(new sal_Int32[aDstRect.GetWidth()]) - , mpMapY(new sal_Int32[aDstRect.GetHeight()]) - , mpMapXOffset(new sal_Int32[aDstRect.GetWidth()]) - , mpMapYOffset(new sal_Int32[aDstRect.GetHeight()]) - { - const tools::Long nSrcWidth = aBitmapRect.GetWidth(); - const tools::Long nSrcHeight = aBitmapRect.GetHeight(); - - generateSimpleMap( - nSrcWidth, aDstRect.GetWidth(), aBitmapRect.Left(), - aOutSize.Width(), nOffX, mpMapX.get(), mpMapXOffset.get()); - - generateSimpleMap( - nSrcHeight, aDstRect.GetHeight(), aBitmapRect.Top(), - aOutSize.Height(), nOffY, mpMapY.get(), mpMapYOffset.get()); - } - -private: - - static void generateSimpleMap(tools::Long nSrcDimension, tools::Long nDstDimension, tools::Long nDstLocation, - tools::Long nOutDimension, tools::Long nOffset, sal_Int32* pMap, sal_Int32* pMapOffset) - { - - const double fReverseScale = (std::abs(nOutDimension) > 1) ? (nSrcDimension - 1) / double(std::abs(nOutDimension) - 1) : 0.0; - - tools::Long nSampleRange = std::max(tools::Long(0), nSrcDimension - 2); - - for (tools::Long i = 0; i < nDstDimension; i++) - { - double fTemp = std::abs((nOffset + i) * fReverseScale); - - pMap[i] = std::clamp(nDstLocation + tools::Long(fTemp), tools::Long(0), nSampleRange); - pMapOffset[i] = static_cast<tools::Long>((fTemp - pMap[i]) * 128.0); - } - } - -public: - bool blendBitmap( - const BitmapWriteAccess* pDestination, - const BitmapReadAccess* pSource, - const BitmapReadAccess* pSourceAlpha, - const tools::Long nDstWidth, - const tools::Long nDstHeight) - { - if (!pSource || !pSourceAlpha || !pDestination) - return false; - - ScanlineFormat nSourceFormat = pSource->GetScanlineFormat(); - ScanlineFormat nDestinationFormat = pDestination->GetScanlineFormat(); - - switch (nSourceFormat) - { - case ScanlineFormat::N24BitTcRgb: - case ScanlineFormat::N24BitTcBgr: - { - if ( (nSourceFormat == ScanlineFormat::N24BitTcBgr && nDestinationFormat == ScanlineFormat::N32BitTcBgra) - || (nSourceFormat == ScanlineFormat::N24BitTcRgb && nDestinationFormat == ScanlineFormat::N32BitTcRgba)) - { - blendBitmap24(pDestination, pSource, pSourceAlpha, nDstWidth, nDstHeight); - return true; - } - } - break; - default: break; - } - return false; - } - - void blendBitmap24( - const BitmapWriteAccess* pDestination, - const BitmapReadAccess* pSource, - const BitmapReadAccess* pSourceAlpha, - const tools::Long nDstWidth, - const tools::Long nDstHeight) - { - Scanline pLine0, pLine1; - Scanline pLineAlpha0, pLineAlpha1; - Scanline pColorSample1, pColorSample2; - Scanline pDestScanline; - - tools::Long nColor1Line1, nColor2Line1, nColor3Line1; - tools::Long nColor1Line2, nColor2Line2, nColor3Line2; - tools::Long nAlphaLine1, nAlphaLine2; - - sal_uInt8 nColor1, nColor2, nColor3, nAlpha; - - for (tools::Long nY = 0; nY < nDstHeight; nY++) - { - const tools::Long nMapY = mpMapY[nY]; - const tools::Long nMapFY = mpMapYOffset[nY]; - - pLine0 = pSource->GetScanline(nMapY); - // tdf#95481 guard nMapY + 1 to be within bounds - pLine1 = (nMapY + 1 < pSource->Height()) ? pSource->GetScanline(nMapY + 1) : pLine0; - - pLineAlpha0 = pSourceAlpha->GetScanline(nMapY); - // tdf#95481 guard nMapY + 1 to be within bounds - pLineAlpha1 = (nMapY + 1 < pSourceAlpha->Height()) ? pSourceAlpha->GetScanline(nMapY + 1) : pLineAlpha0; - - pDestScanline = pDestination->GetScanline(nY); - - for (tools::Long nX = 0; nX < nDstWidth; nX++) - { - const tools::Long nMapX = mpMapX[nX]; - const tools::Long nMapFX = mpMapXOffset[nX]; - - pColorSample1 = pLine0 + 3 * nMapX; - pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1; - nColor1Line1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1++; - pColorSample2++; - nColor2Line1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1++; - pColorSample2++; - nColor3Line1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1 = pLine1 + 3 * nMapX; - pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1; - nColor1Line2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1++; - pColorSample2++; - nColor2Line2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1++; - pColorSample2++; - nColor3Line2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1 = pLineAlpha0 + nMapX; - pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1; - nAlphaLine1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - pColorSample1 = pLineAlpha1 + nMapX; - pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1; - nAlphaLine2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1); - - nColor1 = (nColor1Line1 + nMapFY * ((nColor1Line2 >> 7) - (nColor1Line1 >> 7))) >> 7; - nColor2 = (nColor2Line1 + nMapFY * ((nColor2Line2 >> 7) - (nColor2Line1 >> 7))) >> 7; - nColor3 = (nColor3Line1 + nMapFY * ((nColor3Line2 >> 7) - (nColor3Line1 >> 7))) >> 7; - - nAlpha = (nAlphaLine1 + nMapFY * ((nAlphaLine2 >> 7) - (nAlphaLine1 >> 7))) >> 7; - - *pDestScanline = color::ColorChannelMerge(*pDestScanline, nColor1, nAlpha); - pDestScanline++; - *pDestScanline = color::ColorChannelMerge(*pDestScanline, nColor2, nAlpha); - pDestScanline++; - *pDestScanline = color::ColorChannelMerge(*pDestScanline, nColor3, nAlpha); - pDestScanline++; - pDestScanline++; - } - } - } -}; - struct TradScaleContext { std::unique_ptr<sal_Int32[]> mpMapX; @@ -608,11 +418,6 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, { assert(!is_double_buffered_window()); - VirtualDevice* pOldVDev = mpAlphaVDev; - - const bool bHMirr = aOutSize.Width() < 0; - const bool bVMirr = aOutSize.Height() < 0; - // The scaling in this code path produces really ugly results - it // does the most trivial scaling with no smoothing. GDIMetaFile* pOldMetaFile = mpMetaFile; @@ -661,45 +466,12 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, { Bitmap aNewBitmap; - if (mpAlphaVDev) - { - aNewBitmap = BlendBitmapWithAlpha( - aBmp, pBitmapReadAccess.get(), pAlphaReadAccess.get(), - aDstRect, - nOffY, nDstHeight, - nOffX, nDstWidth, - aTradContext.mpMapX.get(), aTradContext.mpMapY.get() ); - } - else - { - LinearScaleContext aLinearContext(aDstRect, aBmpRect, aOutSize, nOffX, nOffY); - - if (aLinearContext.blendBitmap( BitmapScopedWriteAccess(aBmp).get(), pBitmapReadAccess.get(), pAlphaReadAccess.get(), - nDstWidth, nDstHeight)) - { - aNewBitmap = std::move(aBmp); - } - else - { - aNewBitmap = BlendBitmap( - aBmp, pBitmapReadAccess.get(), pAlphaReadAccess.get(), - nOffY, nDstHeight, - nOffX, nDstWidth, - aBmpRect, aOutSize, - bHMirr, bVMirr, - aTradContext.mpMapX.get(), aTradContext.mpMapY.get() ); - } - } - - // #110958# Disable alpha VDev, we're doing the necessary - // stuff explicitly further below - if (mpAlphaVDev) - mpAlphaVDev = nullptr; - + aNewBitmap = BlendBitmapWithAlpha( + aBmp, pBitmapReadAccess.get(), pAlphaReadAccess.get(), + nDstHeight, + nDstWidth, + aTradContext.mpMapX.get(), aTradContext.mpMapY.get() ); DrawBitmap(aDstRect.TopLeft(), aNewBitmap); - - // #110958# Enable alpha VDev again - mpAlphaVDev = pOldVDev; } mbMap = bOldMap; @@ -759,23 +531,22 @@ namespace const tools::Long nMapY, BitmapReadAccess const * pP, BitmapReadAccess const * pA, - BitmapReadAccess const * pB, - BitmapWriteAccess const * pAlphaW, - sal_uInt8& nResAlpha ) + BitmapReadAccess const * pB) { BitmapColor aDstCol,aSrcCol; aSrcCol = pP->GetColor( nMapY, nMapX ); aDstCol = pB->GetColor( nY, nX ); const sal_uInt8 nSrcAlpha = pA->GetPixelIndex( nMapY, nMapX ); - const sal_uInt8 nDstAlpha = pAlphaW->GetPixelIndex( nY, nX ); + const sal_uInt8 nDstAlpha = aDstCol.GetAlpha(); // Perform porter-duff compositing 'over' operation // Co = Cs + Cd*(1-As) // Ad = As + Ad*(1-As) - nResAlpha = static_cast<int>(nSrcAlpha) + static_cast<int>(nDstAlpha) - static_cast<int>(nDstAlpha)*nSrcAlpha/255; - + sal_uInt8 nResAlpha = static_cast<int>(nSrcAlpha) + static_cast<int>(nDstAlpha) + - static_cast<int>(nDstAlpha) * nSrcAlpha / 255; + aDstCol.SetAlpha(nResAlpha); aDstCol.SetRed( CalcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) ); aDstCol.SetBlue( CalcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) ); aDstCol.SetGreen( CalcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) ); @@ -795,88 +566,29 @@ Bitmap OutputDevice::BlendBitmapWithAlpha( Bitmap& aBmp, BitmapReadAccess const * pP, BitmapReadAccess const * pA, - const tools::Rectangle& aDstRect, - const sal_Int32 nOffY, const sal_Int32 nDstHeight, - const sal_Int32 nOffX, const sal_Int32 nDstWidth, const sal_Int32* pMapX, const sal_Int32* pMapY ) { - BitmapColor aDstCol; Bitmap res; - int nX, nY; - sal_uInt8 nResAlpha; - SAL_WARN_IF( !mpAlphaVDev, "vcl.gdi", "BlendBitmapWithAlpha(): call me only with valid alpha VirtualDevice!" ); - - bool bOldMapMode( mpAlphaVDev->IsMapModeEnabled() ); - mpAlphaVDev->EnableMapMode(false); - - Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) ); - BitmapScopedWriteAccess pAlphaW(aAlphaBitmap); - - if( GetBitCount() <= 8 ) - { - Bitmap aDither(aBmp.GetSizePixel(), vcl::PixelFormat::N8_BPP); - BitmapColor aIndex( 0 ); - BitmapScopedReadAccess pB(aBmp); - BitmapScopedWriteAccess pW(aDither); - - if (pB && pP && pA && pW && pAlphaW) - { - int nOutY; - - for( nY = 0, nOutY = nOffY; nY < nDstHeight; nY++, nOutY++ ) - { - const tools::Long nMapY = pMapY[ nY ]; - const tools::Long nModY = ( nOutY & 0x0FL ) << 4; - int nOutX; - - Scanline pScanline = pW->GetScanline(nY); - Scanline pScanlineAlpha = pAlphaW->GetScanline(nY); - for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ ) - { - const tools::Long nMapX = pMapX[ nX ]; - const sal_uLong nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ]; - - aDstCol = AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB.get(), pAlphaW.get(), nResAlpha ); - - aIndex.SetIndex( static_cast<sal_uInt8>( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16 ] + - nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16 ] + - nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16 ] ) ); - pW->SetPixelOnData( pScanline, nX, aIndex ); - - aIndex.SetIndex( static_cast<sal_uInt8>( nVCLRLut[ ( nVCLLut[ nResAlpha ] + nD ) >> 16 ] + - nVCLGLut[ ( nVCLLut[ nResAlpha ] + nD ) >> 16 ] + - nVCLBLut[ ( nVCLLut[ nResAlpha ] + nD ) >> 16 ] ) ); - pAlphaW->SetPixelOnData( pScanlineAlpha, nX, aIndex ); - } - } - } - pB.reset(); - pW.reset(); - res = std::move(aDither); - } - else { BitmapScopedWriteAccess pB(aBmp); - if (pB && pP && pA && pAlphaW) + if (pB && pP && pA) { - for( nY = 0; nY < nDstHeight; nY++ ) + for( int nY = 0; nY < nDstHeight; nY++ ) { const tools::Long nMapY = pMapY[ nY ]; Scanline pScanlineB = pB->GetScanline(nY); - Scanline pScanlineAlpha = pAlphaW->GetScanline(nY); - for( nX = 0; nX < nDstWidth; nX++ ) + for( int nX = 0; nX < nDstWidth; nX++ ) { const tools::Long nMapX = pMapX[ nX ]; - aDstCol = AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB.get(), pAlphaW.get(), nResAlpha ); + BitmapColor aDstCol = AlphaBlend(nX, nY, nMapX, nMapY, pP, pA, pB.get()); - pB->SetPixelOnData(pScanlineB, nX, pB->GetBestMatchingColor(aDstCol)); - pAlphaW->SetPixelOnData(pScanlineAlpha, nX, pB->GetBestMatchingColor(Color(nResAlpha, nResAlpha, nResAlpha))); + pB->SetPixelOnData(pScanlineB, nX, aDstCol); } } } @@ -884,10 +596,6 @@ Bitmap OutputDevice::BlendBitmapWithAlpha( res = aBmp; } - pAlphaW.reset(); - mpAlphaVDev->DrawBitmap( aDstRect.TopLeft(), aAlphaBitmap ); - mpAlphaVDev->EnableMapMode( bOldMapMode ); - return res; } diff --git a/vcl/source/outdev/bitmapex.cxx b/vcl/source/outdev/bitmapex.cxx index 2fcc8792474c..8e65756d58b9 100644 --- a/vcl/source/outdev/bitmapex.cxx +++ b/vcl/source/outdev/bitmapex.cxx @@ -150,16 +150,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, BitmapEx OutputDevice::GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const { - if (!mpAlphaVDev) - return BitmapEx(GetBitmap(rSrcPt, rSize)); - - // #110958# Extract alpha value from VDev, if any - Bitmap aAlphaBitmap(mpAlphaVDev->GetBitmap(rSrcPt, rSize)); - - if (aAlphaBitmap.getPixelFormat() > vcl::PixelFormat::N8_BPP) - aAlphaBitmap.Convert(BmpConversion::N8BitNoConversion); - - return BitmapEx(GetBitmap(rSrcPt, rSize), AlphaMask(aAlphaBitmap)); + return BitmapEx(GetBitmap( rSrcPt, rSize )); } void OutputDevice::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize, @@ -198,12 +189,6 @@ void OutputDevice::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSi && "I removed some code here that will need to be restored"); mpGraphics->DrawBitmap(aPosAry, *pSalSrcBmp, *this); - - if (mpAlphaVDev) - { - // #i32109#: Make bitmap area opaque - mpAlphaVDev->ImplFillOpaqueRectangle(tools::Rectangle(rDestPt, rDestSize)); - } } bool OutputDevice::DrawTransformBitmapExDirect( @@ -224,33 +209,17 @@ bool OutputDevice::DrawTransformBitmapExDirect( { aAlphaBitmap = rBitmapEx.GetAlphaMask(); } - else if (mpAlphaVDev) - { - aAlphaBitmap = AlphaMask(rBitmapEx.GetSizePixel()); - aAlphaBitmap.Erase(0); // opaque - } SalBitmap* pSalAlphaBmp = aAlphaBitmap.GetBitmap().ImplGetSalBitmap().get(); - if (!mpGraphics->DrawTransformedBitmap( + return mpGraphics->DrawTransformedBitmap( aNull, aTopX, aTopY, *pSalSrcBmp, pSalAlphaBmp, fAlpha, - *this)) - return false; - - if (mpAlphaVDev) - { - // Merge bitmap alpha to alpha device - AlphaMask aAlpha(rBitmapEx.GetSizePixel()); - aAlpha.Erase( ( 1 - fAlpha ) * 255 ); - mpAlphaVDev->DrawTransformBitmapExDirect(aFullTransform, BitmapEx(aAlpha.GetBitmap(), aAlphaBitmap)); - } - - return true; + *this); }; bool OutputDevice::TransformAndReduceBitmapExToTargetRange( diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx index 6efc9df9d052..74c30d0ae0b5 100644 --- a/vcl/source/outdev/clipping.cxx +++ b/vcl/source/outdev/clipping.cxx @@ -45,9 +45,6 @@ void OutputDevice::SetClipRegion() mpMetaFile->AddAction( new MetaClipRegionAction( vcl::Region(), false ) ); SetDeviceClipRegion( nullptr ); - - if( mpAlphaVDev ) - mpAlphaVDev->SetClipRegion(); } void OutputDevice::SetClipRegion( const vcl::Region& rRegion ) @@ -65,9 +62,6 @@ void OutputDevice::SetClipRegion( const vcl::Region& rRegion ) vcl::Region aRegion = LogicToPixel( rRegion ); SetDeviceClipRegion( &aRegion ); } - - if( mpAlphaVDev ) - mpAlphaVDev->SetClipRegion( rRegion ); } bool OutputDevice::SelectClipRegion( const vcl::Region& rRegion, SalGraphics* pGraphics ) @@ -88,7 +82,6 @@ bool OutputDevice::SelectClipRegion( const vcl::Region& rRegion, SalGraphics* pG void OutputDevice::MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove ) { - if ( mbClipRegion ) { if( mpMetaFile ) @@ -98,14 +91,10 @@ void OutputDevice::MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove ImplLogicHeightToDevicePixel( nVertMove ) ); mbInitClipRegion = true; } - - if( mpAlphaVDev ) - mpAlphaVDev->MoveClipRegion( nHorzMove, nVertMove ); } void OutputDevice::IntersectClipRegion( const tools::Rectangle& rRect ) { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaISectRectClipRegionAction( rRect ) ); @@ -113,14 +102,10 @@ void OutputDevice::IntersectClipRegion( const tools::Rectangle& rRect ) maRegion.Intersect( aRect ); mbClipRegion = true; mbInitClipRegion = true; - - if( mpAlphaVDev ) - mpAlphaVDev->IntersectClipRegion( rRect ); } void OutputDevice::IntersectClipRegion( const vcl::Region& rRegion ) { - if(!rRegion.IsNull()) { if ( mpMetaFile ) @@ -131,9 +116,6 @@ void OutputDevice::IntersectClipRegion( const vcl::Region& rRegion ) mbClipRegion = true; mbInitClipRegion = true; } - - if( mpAlphaVDev ) - mpAlphaVDev->IntersectClipRegion( rRegion ); } void OutputDevice::InitClipRegion() diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx index b5a13fb721d9..884587dcac50 100644 --- a/vcl/source/outdev/curvedshapes.cxx +++ b/vcl/source/outdev/curvedshapes.cxx @@ -64,9 +64,6 @@ void OutputDevice::DrawEllipse( const tools::Rectangle& rRect ) mpGraphics->DrawPolygon( aRectPoly.GetSize(), pPtAry, *this ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawEllipse( rRect ); } void OutputDevice::DrawArc( const tools::Rectangle& rRect, @@ -106,9 +103,6 @@ void OutputDevice::DrawArc( const tools::Rectangle& rRect, Point* pPtAry = aArcPoly.GetPointAry(); mpGraphics->DrawPolyLine( aArcPoly.GetSize(), pPtAry, *this ); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawArc( rRect, rStartPt, rEndPt ); } void OutputDevice::DrawPie( const tools::Rectangle& rRect, @@ -155,9 +149,6 @@ void OutputDevice::DrawPie( const tools::Rectangle& rRect, mpGraphics->DrawPolygon( aPiePoly.GetSize(), pPtAry, *this ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawPie( rRect, rStartPt, rEndPt ); } void OutputDevice::DrawChord( const tools::Rectangle& rRect, @@ -204,9 +195,6 @@ void OutputDevice::DrawChord( const tools::Rectangle& rRect, mpGraphics->DrawPolygon( aChordPoly.GetSize(), pPtAry, *this ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawChord( rRect, rStartPt, rEndPt ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/outdev/eps.cxx b/vcl/source/outdev/eps.cxx index 3f436ee327c9..4d529d11919b 100644 --- a/vcl/source/outdev/eps.cxx +++ b/vcl/source/outdev/eps.cxx @@ -75,9 +75,6 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, } } - if( mpAlphaVDev ) - mpAlphaVDev->DrawEPS( rPoint, rSize, rGfxLink, pSubst ); - return bDrawn; } diff --git a/vcl/source/outdev/fill.cxx b/vcl/source/outdev/fill.cxx index 067762d17838..b108328e3d8b 100644 --- a/vcl/source/outdev/fill.cxx +++ b/vcl/source/outdev/fill.cxx @@ -28,7 +28,6 @@ void OutputDevice::SetFillColor() { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaFillColorAction( Color(), false ) ); @@ -38,9 +37,6 @@ void OutputDevice::SetFillColor() mbFillColor = false; maFillColor = COL_TRANSPARENT; } - - if( mpAlphaVDev ) - mpAlphaVDev->SetFillColor(); } void OutputDevice::SetFillColor( const Color& rColor ) @@ -56,12 +52,6 @@ void OutputDevice::SetFillColor( const Color& rColor ) mbFillColor = true; maFillColor = aColor; } - - if( mpAlphaVDev ) - { - sal_uInt8 nAlpha = rColor.GetAlpha(); - mpAlphaVDev->SetFillColor( Color(nAlpha, nAlpha, nAlpha) ); - } } void OutputDevice::InitFillColor() diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index b3d4022eb53b..7b45f7782893 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -82,21 +82,6 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont ) } maFont = aFont; mbNewFont = true; - - if( !mpAlphaVDev ) - return; - - // #i30463# - // Since SetFont might change the text color, apply that only - // selectively to alpha vdev (which normally paints opaque text - // with COL_BLACK) - if( aFont.GetColor() != COL_TRANSPARENT ) - { - mpAlphaVDev->SetTextColor( COL_ALPHA_OPAQUE ); - aFont.SetColor( COL_TRANSPARENT ); - } - - mpAlphaVDev->SetFont( aFont ); } FontMetric OutputDevice::GetFontMetricFromCollection(int nDevFontIndex) const @@ -148,9 +133,6 @@ bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFo if( !bRC ) return false; - if( mpAlphaVDev ) - mpAlphaVDev->AddTempDevFont( rFileURL, rFontName ); - return true; } diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 1a2c3c7c00bd..d2251799b7e0 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -143,14 +143,6 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, } } } - - if( mpAlphaVDev ) - { - mpAlphaVDev->Push(vcl::PushFlags::FILLCOLOR); - mpAlphaVDev->SetFillColor( COL_ALPHA_OPAQUE ); - mpAlphaVDev->DrawPolyPolygon( rPolyPoly ); - mpAlphaVDev->Pop(); - } } void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ) diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 09629d7eedcc..ccf148d43b9e 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -92,9 +92,6 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& EnableMapMode( bOldMap ); mpMetaFile = pOldMetaFile; } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawHatch( rPolyPoly, rHatch ); } void OutputDevice::AddHatchActions( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index e4387a3498ed..f4d590fe5311 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -36,7 +36,6 @@ void OutputDevice::SetLineColor() { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); @@ -46,9 +45,6 @@ void OutputDevice::SetLineColor() mbLineColor = false; maLineColor = COL_TRANSPARENT; } - - if( mpAlphaVDev ) - mpAlphaVDev->SetLineColor(); } void OutputDevice::SetLineColor( const Color& rColor ) @@ -76,9 +72,6 @@ void OutputDevice::SetLineColor( const Color& rColor ) maLineColor = aColor; } } - - if( mpAlphaVDev ) - mpAlphaVDev->SetLineColor( COL_ALPHA_OPAQUE ); } void OutputDevice::InitLineColor() @@ -152,9 +145,6 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt, { mpGraphics->DrawLine( aStartPt.X(), aStartPt.Y(), aEndPt.X(), aEndPt.Y(), *this ); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawLine( rStartPt, rEndPt, rLineInfo ); } void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) @@ -214,9 +204,6 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) const Point aEndPt(ImplLogicToDevicePixel(rEndPt)); mpGraphics->DrawLine( aStartPt.X(), aStartPt.Y(), aEndPt.X(), aEndPt.Y(), *this ); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawLine( rStartPt, rEndPt ); } void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo ) diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 8edf0f3be14a..5ef6e922e6aa 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -620,14 +620,10 @@ vcl::Region OutputDevice::ImplPixelToDevicePixel( const vcl::Region& rRegion ) c void OutputDevice::EnableMapMode( bool bEnable ) { mbMap = bEnable; - - if( mpAlphaVDev ) - mpAlphaVDev->EnableMapMode( bEnable ); } void OutputDevice::SetMapMode() { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaMapModeAction( MapMode() ) ); @@ -648,9 +644,6 @@ void OutputDevice::SetMapMode() // #i75163# ImplInvalidateViewTransform(); } - - if( mpAlphaVDev ) - mpAlphaVDev->SetMapMode(); } void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) @@ -667,9 +660,6 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) if ( maMapMode == rNewMapMode ) return; - if( mpAlphaVDev ) - mpAlphaVDev->SetMapMode( rNewMapMode ); - // if default MapMode calculate nothing bool bOldMap = mbMap; mbMap = !rNewMapMode.IsDefault(); @@ -815,9 +805,6 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX ); mnOutOffLogicY = ImplPixelToLogic( mnOutOffOrigY, mnDPIY, maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY ); - - if( mpAlphaVDev ) - mpAlphaVDev->SetRelativeMapMode( rNewMapMode ); } // #i75163# @@ -1867,9 +1854,6 @@ void OutputDevice::SetPixelOffset( const Size& rOffset ) maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX ); mnOutOffLogicY = ImplPixelToLogic( mnOutOffOrigY, mnDPIY, maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY ); - - if( mpAlphaVDev ) - mpAlphaVDev->SetPixelOffset( rOffset ); } diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx index 9a7b57c6b3bb..cd07b33ae0dd 100644 --- a/vcl/source/outdev/mask.cxx +++ b/vcl/source/outdev/mask.cxx @@ -140,23 +140,6 @@ void OutputDevice::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, } } - - // TODO: Use mask here - if( !mpAlphaVDev ) - return; - - const Bitmap aAlphaMask( rMask.CreateMask( rMaskColor ) ); - - // #i25167# Restrict mask painting to _opaque_ areas - // of the mask, otherwise we spoil areas where no - // bitmap content was ever visible. Interestingly - // enough, this can be achieved by taking the mask as - // the transparency mask of itself - mpAlphaVDev->DrawBitmapEx( rDestPt, - rDestSize, - rSrcPtPixel, - rSrcSizePixel, - BitmapEx( aAlphaMask, rMask ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 43b6650ce4e8..288d25ab8a3a 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -70,7 +70,6 @@ OutputDevice::OutputDevice(OutDevType eOutDevType) : mpFontInstance = nullptr; mpForcedFallbackInstance = nullptr; mpFontFaceCollection = nullptr; - mpAlphaVDev = nullptr; mpExtOutDevData = nullptr; mnOutOffX = 0; mnOutOffY = 0; @@ -178,7 +177,6 @@ void OutputDevice::dispose() // release ImplFontList specific to this OutputDevice mxFontCollection.reset(); - mpAlphaVDev.disposeAndClear(); mpPrevGraphics.reset(); mpNextGraphics.reset(); VclReferenceBase::dispose(); @@ -217,9 +215,6 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) void OutputDevice::SetSettings( const AllSettings& rSettings ) { *moSettings = rSettings; - - if( mpAlphaVDev ) - mpAlphaVDev->SetSettings( rSettings ); } SystemGraphicsData OutputDevice::GetSystemGfxData() const @@ -307,9 +302,6 @@ void OutputDevice::SetRefPoint() mbRefPoint = false; maRefPoint.setX(0); maRefPoint.setY(0); - - if( mpAlphaVDev ) - mpAlphaVDev->SetRefPoint(); } void OutputDevice::SetRefPoint( const Point& rRefPoint ) @@ -319,9 +311,6 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint ) mbRefPoint = true; maRefPoint = rRefPoint; - - if( mpAlphaVDev ) - mpAlphaVDev->SetRefPoint( rRefPoint ); } void OutputDevice::SetRasterOp( RasterOp eRasterOp ) @@ -340,17 +329,11 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp ) mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp), RasterOp::Invert == meRasterOp ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->SetRasterOp( eRasterOp ); } void OutputDevice::EnableOutput( bool bEnable ) { mbOutput = bEnable; - - if( mpAlphaVDev ) - mpAlphaVDev->EnableOutput( bEnable ); } void OutputDevice::SetAntialiasing( AntialiasingFlags nMode ) @@ -363,17 +346,11 @@ void OutputDevice::SetAntialiasing( AntialiasingFlags nMode ) if (mpGraphics) mpGraphics->setAntiAlias(bool(mnAntialiasing & AntialiasingFlags::Enable)); } - - if( mpAlphaVDev ) - mpAlphaVDev->SetAntialiasing( nMode ); } void OutputDevice::SetDrawMode(DrawModeFlags nDrawMode) { mnDrawMode = nDrawMode; - - if (mpAlphaVDev) - mpAlphaVDev->SetDrawMode(nDrawMode); } sal_uInt16 OutputDevice::GetBitCount() const @@ -469,9 +446,6 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight ) mpGraphics->CopyBits(aPosAry, *this); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawOutDev( rDestPt, rDestSize, rSrcPt, rSrcSize ); } void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, @@ -489,16 +463,8 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( mpMetaFile ) { - if (rOutDev.mpAlphaVDev) - { - const BitmapEx aBmpEx(rOutDev.GetBitmapEx(rSrcPt, rSrcSize)); - mpMetaFile->AddAction(new MetaBmpExScaleAction(rDestPt, rDestSize, aBmpEx)); - } - else - { - const Bitmap aBmp(rOutDev.GetBitmap(rSrcPt, rSrcSize)); - mpMetaFile->AddAction(new MetaBmpScaleAction(rDestPt, rDestSize, aBmp)); - } + const BitmapEx aBmpEx(rOutDev.GetBitmapEx(rSrcPt, rSrcSize)); + mpMetaFile->AddAction(new MetaBmpExScaleAction(rDestPt, rDestSize, aBmpEx)); } if ( !IsDeviceOutputNecessary() ) @@ -514,28 +480,17 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( mbOutputClipped ) return; - if (rOutDev.mpAlphaVDev) - { - // alpha-blend source over destination - DrawBitmapEx(rDestPt, rDestSize, rOutDev.GetBitmapEx(rSrcPt, rSrcSize)); - } - else - { - SalTwoRect aPosAry(rOutDev.ImplLogicXToDevicePixel(rSrcPt.X()), - rOutDev.ImplLogicYToDevicePixel(rSrcPt.Y()), - rOutDev.ImplLogicWidthToDevicePixel(rSrcSize.Width()), - rOutDev.ImplLogicHeightToDevicePixel(rSrcSize.Height()), - ImplLogicXToDevicePixel(rDestPt.X()), - ImplLogicYToDevicePixel(rDestPt.Y()), - ImplLogicWidthToDevicePixel(rDestSize.Width()), - ImplLogicHeightToDevicePixel(rDestSize.Height())); - - drawOutDevDirect(rOutDev, aPosAry); - - // #i32109#: make destination rectangle opaque - source has no alpha - if (mpAlphaVDev) - mpAlphaVDev->ImplFillOpaqueRectangle(tools::Rectangle(rDestPt, rDestSize)); - } + SalTwoRect aPosAry(rOutDev.ImplLogicXToDevicePixel(rSrcPt.X()), + rOutDev.ImplLogicYToDevicePixel(rSrcPt.Y()), + rOutDev.ImplLogicWidthToDevicePixel(rSrcSize.Width()), + rOutDev.ImplLogicHeightToDevicePixel(rSrcSize.Height()), + ImplLogicXToDevicePixel(rDestPt.X()), + ImplLogicYToDevicePixel(rDestPt.Y()), + ImplLogicWidthToDevicePixel(rDestSize.Width()), + ImplLogicHeightToDevicePixel(rDestSize.Height())); + + // if we have alpha, this will blend source over destination + drawOutDevDirect(rOutDev, aPosAry); } void OutputDevice::CopyArea( const Point& rDestPt, @@ -576,9 +531,6 @@ void OutputDevice::CopyArea( const Point& rDestPt, } SetRasterOp( eOldRop ); - - if( mpAlphaVDev ) - mpAlphaVDev->CopyArea( rDestPt, rSrcPt, rSrcSize, bWindowInvalidate ); } // Direct OutputDevice drawing protected function @@ -654,9 +606,6 @@ tools::Rectangle OutputDevice::GetBackgroundComponentBounds() const void OutputDevice::EnableRTL( bool bEnable ) { mbEnableRTL = bEnable; - - if( mpAlphaVDev ) - mpAlphaVDev->EnableRTL( bEnable ); } bool OutputDevice::ImplIsAntiparallel() const diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx index 8c97aeb43237..fa38a78005e2 100644 --- a/vcl/source/outdev/pixel.cxx +++ b/vcl/source/outdev/pixel.cxx @@ -40,12 +40,6 @@ Color OutputDevice::GetPixel(const Point& rPoint) const const tools::Long nX = ImplLogicXToDevicePixel(rPoint.X()); const tools::Long nY = ImplLogicYToDevicePixel(rPoint.Y()); aColor = mpGraphics->GetPixel(nX, nY, *this); - - if (mpAlphaVDev) - { - Color aAlphaColor = mpAlphaVDev->GetPixel(rPoint); - aColor.SetAlpha(aAlphaColor.GetBlue()); - } } } return aColor; @@ -77,9 +71,6 @@ void OutputDevice::DrawPixel( const Point& rPt ) InitLineColor(); mpGraphics->DrawPixel( aPt.X(), aPt.Y(), *this ); - - if( mpAlphaVDev ) - mpAlphaVDev->DrawPixel( rPt ); } void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor ) @@ -107,12 +98,6 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor ) return; mpGraphics->DrawPixel( aPt.X(), aPt.Y(), aColor, *this ); - - if (mpAlphaVDev) - { - Color aAlphaColor(rColor.GetAlpha(), rColor.GetAlpha(), rColor.GetAlpha()); - mpAlphaVDev->DrawPixel(rPt, aAlphaColor); - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index e764e6b66dbe..6aa164037dd6 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -105,11 +105,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) } if(bSuccess) - { - if( mpAlphaVDev ) - mpAlphaVDev->DrawPolyPolygon( rPolyPoly ); return; - } } if ( nPoly == 1 ) @@ -133,8 +129,6 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) // ImplLogicToDevicePixel calls ImplDrawPolyPolygon( nPoly, ImplLogicToDevicePixel( rPolyPoly ) ); } - if( mpAlphaVDev ) - mpAlphaVDev->DrawPolyPolygon( rPolyPoly ); } void OutputDevice::DrawPolygon( const basegfx::B2DPolygon& rB2DPolygon) @@ -218,11 +212,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) } if(bSuccess) - { - if( mpAlphaVDev ) - mpAlphaVDev->DrawPolygon( rPoly ); return; - } } tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly ); @@ -243,8 +233,6 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) { mpGraphics->DrawPolygon( nPoints, pPtAry, *this ); } - if( mpAlphaVDev ) - mpAlphaVDev->DrawPolygon( rPoly ); } // Caution: This method is nearly the same as @@ -338,9 +326,6 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP const tools::PolyPolygon aPixelPolyPolygon = ImplLogicToDevicePixel(aToolsPolyPolygon); ImplDrawPolyPolygon(aPixelPolyPolygon.Count(), aPixelPolyPolygon); } - - if (mpAlphaVDev) - mpAlphaVDev->ImplDrawPolyPolygonWithB2DPolyPolygon(rB2DPolyPoly); } // #100127# Extracted from OutputDevice::DrawPolyPolygon() diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index 75e8252f4ae2..63dafcbb4308 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -99,9 +99,6 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly ) mpGraphics->DrawPolyLine( nPoints, pPtAry, *this ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawPolyLine( rPoly ); } void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rLineInfo ) @@ -298,9 +295,6 @@ void OutputDevice::drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLi mpGraphics->DrawPolyLine(nPoints, aPoly.GetPointAry(), *this); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawPolyLine( rPoly, rLineInfo ); } bool OutputDevice::DrawPolyLineDirect( @@ -374,12 +368,11 @@ bool OutputDevice::DrawPolyLineDirectInternal( const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation() * rObjectTransform); const bool bPixelSnapHairline((mnAntialiasing & AntialiasingFlags::PixelSnapHairline) && rB2DPolygon.count() < 1000); - const double fAdjustedTransparency = mpAlphaVDev ? 0 : fTransparency; // draw the polyline - bool bDrawSuccess = mpGraphics->DrawPolyLine( + return mpGraphics->DrawPolyLine( aTransform, rB2DPolygon, - fAdjustedTransparency, + fTransparency, fLineWidth, // tdf#124848 use LineWidth direct, do not try to solve for zero-case (aka hairline) pStroke, // MM01 eLineJoin, @@ -387,16 +380,6 @@ bool OutputDevice::DrawPolyLineDirectInternal( fMiterMinimumAngle, bPixelSnapHairline, *this); - - if( bDrawSuccess ) - { - if (mpAlphaVDev) - mpAlphaVDev->DrawPolyLineDirect(rObjectTransform, rB2DPolygon, fLineWidth, - fTransparency, pStroke, eLineJoin, eLineCap, - fMiterMinimumAngle); - - return true; - } } return false; } diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 227263f23fdf..efd693e13c82 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -81,9 +81,6 @@ void OutputDevice::DrawRect( const tools::Rectangle& rRect ) InitFillColor(); mpGraphics->DrawRect( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), *this ); - - if( mpAlphaVDev ) - mpAlphaVDev->DrawRect( rRect ); } void OutputDevice::DrawRect( const tools::Rectangle& rRect, @@ -140,9 +137,6 @@ void OutputDevice::DrawRect( const tools::Rectangle& rRect, mpGraphics->DrawPolygon( aRoundRectPoly.GetSize(), pPtAry, *this ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawRect( rRect, nHorzRound, nVertRound ); } void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags ) @@ -332,9 +326,6 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D } EnableMapMode( bOldMap ); - - if( mpAlphaVDev ) - mpAlphaVDev->DrawGrid( rRect, rDist, nFlags ); } BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ) diff --git a/vcl/source/outdev/stack.cxx b/vcl/source/outdev/stack.cxx index 72ef63af551d..9b32d4c5b7c8 100644 --- a/vcl/source/outdev/stack.cxx +++ b/vcl/source/outdev/stack.cxx @@ -83,9 +83,6 @@ void OutputDevice::Push(vcl::PushFlags nFlags) if (nFlags & vcl::PushFlags::REFPOINT && mbRefPoint) rState.mpRefPoint = maRefPoint; - - if (mpAlphaVDev) - mpAlphaVDev->Push(); } void OutputDevice::Pop() @@ -103,9 +100,6 @@ void OutputDevice::Pop() } const vcl::State& rState = maOutDevStateStack.back(); - if( mpAlphaVDev ) - mpAlphaVDev->Pop(); - if ( rState.mnFlags & vcl::PushFlags::LINECOLOR ) { if ( rState.mpLineColor ) diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 7941d4a1399d..4bef5eef1ce2 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -56,9 +56,6 @@ void OutputDevice::SetLayoutMode( vcl::text::ComplexTextLayoutFlags nTextLayoutM mpMetaFile->AddAction( new MetaLayoutModeAction( nTextLayoutMode ) ); mnTextLayoutMode = nTextLayoutMode; - - if( mpAlphaVDev ) - mpAlphaVDev->SetLayoutMode( nTextLayoutMode ); } void OutputDevice::SetDigitLanguage( LanguageType eTextLanguage ) @@ -67,9 +64,6 @@ void OutputDevice::SetDigitLanguage( LanguageType eTextLanguage ) mpMetaFile->AddAction( new MetaTextLanguageAction( eTextLanguage ) ); meTextLanguage = eTextLanguage; - - if( mpAlphaVDev ) - mpAlphaVDev->SetDigitLanguage( eTextLanguage ); } void OutputDevice::ImplInitTextColor() @@ -483,14 +477,10 @@ void OutputDevice::SetTextColor( const Color& rColor ) maTextColor = aColor; mbInitTextColor = true; } - - if( mpAlphaVDev ) - mpAlphaVDev->SetTextColor( COL_ALPHA_OPAQUE ); } void OutputDevice::SetTextFillColor() { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) ); @@ -499,9 +489,6 @@ void OutputDevice::SetTextFillColor() } if ( !maFont.IsTransparent() ) maFont.SetTransparent( true ); - - if( mpAlphaVDev ) - mpAlphaVDev->SetTextFillColor(); } void OutputDevice::SetTextFillColor( const Color& rColor ) @@ -515,9 +502,6 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) maFont.SetFillColor( aColor ); if ( maFont.IsTransparent() != rColor.IsTransparent() ) maFont.SetTransparent( rColor.IsTransparent() ); - - if( mpAlphaVDev ) - mpAlphaVDev->SetTextFillColor( COL_ALPHA_OPAQUE ); } Color OutputDevice::GetTextFillColor() const @@ -530,7 +514,6 @@ Color OutputDevice::GetTextFillColor() const void OutputDevice::SetTextAlign( TextAlign eAlign ) { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaTextAlignAction( eAlign ) ); @@ -539,9 +522,6 @@ void OutputDevice::SetTextAlign( TextAlign eAlign ) maFont.SetAlignment( eAlign ); mbNewFont = true; } - - if( mpAlphaVDev ) - mpAlphaVDev->SetTextAlign( eAlign ); } vcl::Region OutputDevice::GetOutputBoundsClipRegion() const @@ -635,9 +615,6 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr, { ImplDrawText( *pSalLayout ); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawText( rStartPt, rStr, nIndex, nLen, pVector, pDisplayText ); } tools::Long OutputDevice::GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen, @@ -740,12 +717,6 @@ void OutputDevice::DrawPartialTextArray(const Point& rStartPt, const OUString& r { ImplDrawText(*pSalLayout); } - - if (mpAlphaVDev) - { - mpAlphaVDev->DrawPartialTextArray(rStartPt, rStr, pDXArray, pKashidaArray, nIndex, nLen, - nPartIndex, nPartLen, flags, pLayoutCache); - } } void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, @@ -778,9 +749,6 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, { ImplDrawText( *pSalLayout ); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, pKashidaAry, nIndex, nLen, flags ); } double @@ -992,9 +960,6 @@ void OutputDevice::DrawStretchText( const Point& rStartPt, sal_Int32 nWidth, { ImplDrawText( *pSalLayout ); } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawStretchText( rStartPt, nWidth, rStr, nIndex, nLen ); } vcl::text::ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, @@ -1790,9 +1755,6 @@ void OutputDevice::DrawText( const tools::Rectangle& rRect, const OUString& rOri // and enable again mpMetaFile = pMtf; - - if( mpAlphaVDev ) - mpAlphaVDev->DrawText( rRect, rOrigStr, nStyle, pVector, pDisplayText ); } tools::Rectangle OutputDevice::GetTextRect( const tools::Rectangle& rRect, @@ -2041,9 +2003,6 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, SetTextColor( *oOldTextColor ); if (oOldTextFillColor) SetTextFillColor(*oOldTextFillColor); - - if( mpAlphaVDev ) - mpAlphaVDev->DrawCtrlText( rPos, rStr, nIndex, nLen, nStyle, pVector, pDisplayText ); } tools::Long OutputDevice::GetCtrlTextWidth( const OUString& rStr, const SalLayoutGlyphs* pGlyphs ) const diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index bde74b2a494c..837870f7cd06 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -919,14 +919,10 @@ void OutputDevice::ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools:: void OutputDevice::SetTextLineColor() { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), false ) ); maTextLineColor = COL_TRANSPARENT; - - if( mpAlphaVDev ) - mpAlphaVDev->SetTextLineColor(); } void OutputDevice::SetTextLineColor( const Color& rColor ) @@ -937,21 +933,14 @@ void OutputDevice::SetTextLineColor( const Color& rColor ) mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, true ) ); maTextLineColor = aColor; - - if( mpAlphaVDev ) - mpAlphaVDev->SetTextLineColor( COL_ALPHA_OPAQUE ); } void OutputDevice::SetOverlineColor() { - if ( mpMetaFile ) mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), false ) ); maOverlineColor = COL_TRANSPARENT; - - if( mpAlphaVDev ) - mpAlphaVDev->SetOverlineColor(); } void OutputDevice::SetOverlineColor( const Color& rColor ) @@ -962,9 +951,6 @@ void OutputDevice::SetOverlineColor( const Color& rColor ) mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, true ) ); maOverlineColor = aColor; - - if( mpAlphaVDev ) - mpAlphaVDev->SetOverlineColor( COL_ALPHA_OPAQUE ); } void OutputDevice::DrawTextLine( const Point& rPos, tools::Long nWidth, @@ -1002,9 +988,6 @@ void OutputDevice::DrawTextLine( const Point& rPos, tools::Long nWidth, double fWidth = ImplLogicWidthToDeviceSubPixel(nWidth); aPos += Point( mnTextOffX, mnTextOffY ); ImplDrawTextLine( aPos.X(), aPos.X(), 0, fWidth, fWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); - - if( mpAlphaVDev ) - mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); } void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth, tools::Long nWaveHeight) @@ -1149,9 +1132,6 @@ void OutputDevice::ImplDrawWaveLineBezier(tools::Long nStartX, tools::Long nStar basegfx::deg2rad(15.0), bPixelSnapHairline, *this); - - if( mpAlphaVDev ) - mpAlphaVDev->ImplDrawWaveLineBezier(nStartX, nStartY, nEndX, nEndY, nWaveHeight, fOrientation, nLineWidth); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 8c4051087c3e..2d8dd407fc0e 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -128,14 +128,13 @@ void OutputDevice::DrawTransparent( const basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rObjectTransform); // TODO: this must not drop transparency for mpAlphaVDev case, but instead use premultiplied // alpha... but that requires using premultiplied alpha also for already drawn data - const double fAdjustedTransparency = mpAlphaVDev ? 0 : fTransparency; if (IsFillColor()) { mpGraphics->DrawPolyPolygon( aFullTransform, aB2DPolyPolygon, - fAdjustedTransparency, + fTransparency, *this); } @@ -148,7 +147,7 @@ void OutputDevice::DrawTransparent( mpGraphics->DrawPolyLine( aFullTransform, rPolygon, - fAdjustedTransparency, + fTransparency, 0.0, // tdf#124848 hairline nullptr, // MM01 basegfx::B2DLineJoin::NONE, @@ -170,9 +169,6 @@ void OutputDevice::DrawTransparent( static_cast< sal_uInt16 >(fTransparency * 100.0))); } - if (mpAlphaVDev) - mpAlphaVDev->DrawTransparent(rObjectTransform, rB2DPolyPoly, fTransparency); - return; } @@ -273,13 +269,6 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) { - // #110958# Disable alpha VDev, we perform the necessary - VirtualDevice* pOldAlphaVDev = mpAlphaVDev; - - // operation explicitly further below. - if( mpAlphaVDev ) - mpAlphaVDev = nullptr; - GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = nullptr; @@ -297,9 +286,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, // #i66849# Added fast path for exactly rectangular // polygons - // #i83087# Naturally, system alpha blending cannot - // work with separate alpha VDev - if( !mpAlphaVDev && aPolyPoly.IsRect() ) + if( aPolyPoly.IsRect() ) { // setup Graphics only here (other cases delegate // to basic OutDev methods) @@ -500,9 +487,6 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, } mpMetaFile = pOldMetaFile; - - // #110958# Restore disabled alpha VDev - mpAlphaVDev = pOldAlphaVDev; } void OutputDevice::DrawTransparent( const tools::PolyPolygon& rPolyPoly, @@ -539,18 +523,6 @@ void OutputDevice::DrawTransparent( const tools::PolyPolygon& rPolyPoly, if (!bDrawn) EmulateDrawTransparent( rPolyPoly, nTransparencePercent ); - - // #110958# Apply alpha value also to VDev alpha channel - if( mpAlphaVDev ) - { - const Color aFillCol( mpAlphaVDev->GetFillColor() ); - sal_uInt8 nAlpha = 255 - sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100); - mpAlphaVDev->SetFillColor( Color(nAlpha, nAlpha, nAlpha) ); - - mpAlphaVDev->DrawTransparent( rPolyPoly, nTransparencePercent ); - - mpAlphaVDev->SetFillColor( aFillCol ); - } } void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index b1eeb4dc2874..8d75d31ebecf 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -54,9 +54,6 @@ void OutputDevice::DrawWallpaper( const tools::Rectangle& rRect, rWallpaper ); } } - - if( mpAlphaVDev ) - mpAlphaVDev->DrawWallpaper( rRect, rWallpaper ); } void OutputDevice::DrawWallpaper( tools::Long nX, tools::Long nY, @@ -117,9 +114,6 @@ void OutputDevice::Erase() if ( eRasterOp != RasterOp::OverPaint ) SetRasterOp( eRasterOp ); } - // If we went into the "if ( mbBackground )" section, then we have already erased the mpAlphaDev. - else if( mpAlphaVDev ) - mpAlphaVDev->Erase(); } void OutputDevice::Erase(const tools::Rectangle& rRect) @@ -130,9 +124,6 @@ void OutputDevice::Erase(const tools::Rectangle& rRect) DrawWallpaper(rRect, GetBackground()); if ( eRasterOp != RasterOp::OverPaint ) SetRasterOp( eRasterOp ); - - if (mpAlphaVDev) - mpAlphaVDev->Erase(rRect); } void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY, diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index fb6af8428a41..aa56cf2c463e 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <accessibility/AccessibleIconView.hxx> - #include <vcl/filter/PngImageWriter.hxx> #include <vcl/toolkit/treelistentry.hxx> #include <vcl/toolkit/viewdataentry.hxx> @@ -232,14 +230,6 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n rRenderContext.Pop(); } -css::uno::Reference<css::accessibility::XAccessible> IconView::CreateAccessible() -{ - if (auto xAccParent = GetAccessibleParent()) - return new AccessibleIconView(*this, xAccParent); - - return {}; -} - FactoryFunction IconView::GetUITestFactory() const { return IconViewUIObject::create; } static OString extractPngString(const SvLBoxContextBmp* pBmpItem) diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 576f5b9b4a8f..98b10083934e 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -3334,7 +3334,7 @@ void SvTreeListBox::RequestHelp( const HelpEvent& rHEvt ) const Point pos(ScreenToOutputPixel(rHEvt.GetMousePosPixel())); if (SvTreeListEntry* entry = GetEntry(pos)) { - const OUString tooltip = aTooltipHdl.Call(entry); + const OUString tooltip = GetEntryTooltip(entry); if (!tooltip.isEmpty()) { const Size size(GetOutputSizePixel().Width(), GetEntryHeight()); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 0770a2526190..a26713ee8330 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1639,9 +1639,6 @@ void Window::Erase(vcl::RenderContext& rRenderContext) if (eRasterOp != RasterOp::OverPaint) rRenderContext.SetRasterOp(eRasterOp); } - - if (GetOutDev()->mpAlphaVDev) - GetOutDev()->mpAlphaVDev->Erase(); } void Window::ImplScroll( const tools::Rectangle& rRect, diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 6ac701a4b0cd..25267def4fdb 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -581,7 +581,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterControl , maNoPreviewStr( VclResId( SV_PRINT_NOPREVIEW ) ) , mnCurPage( 0 ) , mnCachedPages( 0 ) - , mbCollateAlwaysOff(false) , mbShowLayoutFrame( true ) , maUpdatePreviewIdle("Print Dialog Update Preview Idle") , maUpdatePreviewNoCacheIdle("Print Dialog Update Preview (no cache) Idle") @@ -788,17 +787,8 @@ void PrintDialog::readFromSettings() m_xDialog->set_window_state(aValue); // collate - if( officecfg::VCL::VCLSettings::PrintDialog::Collate::isReadOnly() ) - { - mbCollateAlwaysOff = true; - mxCollateBox->set_active( false ); - mxCollateBox->set_sensitive( false ); - } - else - { - mbCollateAlwaysOff = false; - mxCollateBox->set_active( officecfg::VCL::VCLSettings::PrintDialog::Collate::get() ); - } + mxCollateBox->set_sensitive( officecfg::VCL::VCLSettings::PrintDialog::Collate::isReadOnly() ); + mxCollateBox->set_active( officecfg::VCL::VCLSettings::PrintDialog::Collate::get() ); // collate single jobs mxSingleJobsBox->set_active( officecfg::VCL::VCLSettings::PrintDialog::CollateSingleJobs::get() ); @@ -1074,7 +1064,7 @@ void PrintDialog::checkControlDependencies() { if (mxCopyCountField->get_value() > 1) { - mxCollateBox->set_sensitive( !mbCollateAlwaysOff ); + mxCollateBox->set_sensitive( officecfg::VCL::VCLSettings::PrintDialog::Collate::isReadOnly() ); mxSingleJobsBox->set_sensitive( mxCollateBox->get_active() ); } else diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui index 6f0aa80d05fd..ec3e5e55ce37 100644 --- a/vcl/uiconfig/ui/printdialog.ui +++ b/vcl/uiconfig/ui/printdialog.ui @@ -615,6 +615,7 @@ <property name="halign">start</property> <property name="label" translatable="yes" context="printdialog|labelcopies">_Number of copies:</property> <property name="use-underline">True</property> + <property name="mnemonic-widget">copycount</property> <property name="xalign">1</property> </object> <packing> @@ -829,6 +830,7 @@ <property name="halign">start</property> <property name="label" translatable="yes" context="printdialog|includeevenodd">Include:</property> <property name="use-underline">True</property> + <property name="mnemonic-widget">evenoddbox</property> <property name="xalign">0</property> </object> <packing> diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 445dc8b89b59..ebb3c2d1f364 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -78,10 +78,6 @@ X11SalInstance::X11SalInstance(std::unique_ptr<SalYieldMutex> pMutex) m_bSupportsOpenGL = true; #if HAVE_FEATURE_SKIA X11SkiaSalGraphicsImpl::prepareSkia(); -#if SKIA_USE_BITMAP32 - if (SkiaHelper::isVCLSkiaEnabled()) - m_bSupportsBitmap32 = true; -#endif #endif } diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx index 9e822047f14e..aea90a9b87f4 100644 --- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx +++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx @@ -186,9 +186,10 @@ void X11CairoSalGraphicsImpl::drawMask(const SalTwoRect& rTR, const SalBitmap& r std::shared_ptr<SalBitmap> X11CairoSalGraphicsImpl::getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight) + tools::Long nHeight, + bool bWithoutAlpha) { - return mrCairoCommon.getBitmap(nX, nY, nWidth, nHeight); + return mrCairoCommon.getBitmap(nX, nY, nWidth, nHeight, bWithoutAlpha); } bool X11CairoSalGraphicsImpl::drawPolyLineBezier(sal_uInt32, const Point*, const PolyFlags*) diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx index 3a8948eedafe..d53f7994056a 100644 --- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx +++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx @@ -149,7 +149,7 @@ public: Color nMaskColor) override; std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, - tools::Long nHeight) override; + tools::Long nHeight, bool bWithoutAlpha) override; bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry) override; diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 52b87875d2e6..bd9756bd44f3 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -36,8 +36,9 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(const SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, DeviceFormat eFormat, - std::unique_ptr<X11SalGraphics> pNewGraphics) + std::unique_ptr<X11SalGraphics> pNewGraphics, bool bAlphaMaskTransparent) { + assert(!bAlphaMaskTransparent && "TODO"); (void)bAlphaMaskTransparent; assert(pNewGraphics); #if HAVE_FEATURE_SKIA if (SkiaHelper::isVCLSkiaEnabled()) @@ -61,9 +62,9 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(const S } std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphics& rGraphics, - tools::Long nDX, tools::Long nDY, DeviceFormat eFormat) + tools::Long nDX, tools::Long nDY, DeviceFormat eFormat, bool bAlphaMaskTransparent) { - return CreateX11VirtualDevice(rGraphics, nDX, nDY, eFormat, std::make_unique<X11SalGraphics>()); + return CreateX11VirtualDevice(rGraphics, nDX, nDY, eFormat, std::make_unique<X11SalGraphics>(), bAlphaMaskTransparent); } std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphics& rGraphics, @@ -72,7 +73,7 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphic return CreateX11VirtualDevice(rGraphics, nDX, nDY, eFormat, rData, std::make_unique<X11SalGraphics>()); } -void X11SalGraphics::Init(X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap) +void X11SalGraphics::Init(X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap, bool bAlphaMaskTransparent) { SalDisplay *pDisplay = pDevice->GetDisplay(); m_nXScreen = pDevice->GetXScreenNumber(); @@ -99,6 +100,12 @@ void X11SalGraphics::Init(X11SalVirtualDevice *pDevice, SalColormap* pColormap, SetDrawable(pDevice->GetDrawable(), pDevice->GetSurface(), m_nXScreen); mxImpl->UpdateX11GeometryProvider(); + + if (bAlphaMaskTransparent) + { + mxImpl->SetFillColor(COL_TRANSPARENT); + mxImpl->drawRect(0, 0, pDevice->GetWidth(), pDevice->GetHeight()); + } } X11SalVirtualDevice::X11SalVirtualDevice(const SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, @@ -229,7 +236,7 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics() void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) { bGraphics_ = false; } -bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY ) +bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY, bool bAlphaMaskTransparent ) { if( bExternPixmap_ ) return false; @@ -280,7 +287,7 @@ bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY ) } if( pGraphics_ ) - pGraphics_->Init( this ); + pGraphics_->Init( this, nullptr, false, bAlphaMaskTransparent ); return true; } diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 51eea482eea5..82c6462699a7 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -370,14 +370,15 @@ void GtkYieldMutex::ThreadsLeave() std::unique_ptr<SalVirtualDevice> GtkInstance::CreateVirtualDevice( SalGraphics &rG, tools::Long nDX, tools::Long nDY, - DeviceFormat /*eFormat*/ ) + DeviceFormat /*eFormat*/, + bool bAlphaMaskTransparent ) { EnsureInit(); SvpSalGraphics *pSvpSalGraphics = dynamic_cast<SvpSalGraphics*>(&rG); assert(pSvpSalGraphics); // tdf#127529 see SvpSalInstance::CreateVirtualDevice for the rare case of a non-null pPreExistingTarget std::unique_ptr<SalVirtualDevice> xNew(new SvpSalVirtualDevice(pSvpSalGraphics->getSurface(), /*pPreExistingTarget*/nullptr)); - if (!xNew->SetSize(nDX, nDY)) + if (!xNew->SetSize(nDX, nDY, bAlphaMaskTransparent)) xNew.reset(); return xNew; } @@ -393,7 +394,7 @@ std::unique_ptr<SalVirtualDevice> GtkInstance::CreateVirtualDevice( SalGraphics // tdf#127529 see SvpSalInstance::CreateVirtualDevice for the rare case of a non-null pPreExistingTarget cairo_surface_t* pPreExistingTarget = static_cast<cairo_surface_t*>(rGd.pSurface); std::unique_ptr<SalVirtualDevice> xNew(new SvpSalVirtualDevice(pSvpSalGraphics->getSurface(), pPreExistingTarget)); - if (!xNew->SetSize(nDX, nDY)) + if (!xNew->SetSize(nDX, nDY, /*bAlphaMaskTransparent*/false)) xNew.reset(); return xNew; } @@ -10276,7 +10277,6 @@ public: virtual void set_active(bool active) override { disable_notify_events(); - set_inconsistent(false); gtk_toggle_button_set_active(m_pToggleButton, active); enable_notify_events(); } @@ -10286,27 +10286,6 @@ public: return gtk_toggle_button_get_active(m_pToggleButton); } - virtual void set_inconsistent(bool inconsistent) override - { -#if GTK_CHECK_VERSION(4, 0, 0) - if (inconsistent) - gtk_widget_set_state_flags(GTK_WIDGET(m_pToggleButton), GTK_STATE_FLAG_INCONSISTENT, false); - else - gtk_widget_unset_state_flags(GTK_WIDGET(m_pToggleButton), GTK_STATE_FLAG_INCONSISTENT); -#else - gtk_toggle_button_set_inconsistent(m_pToggleButton, inconsistent); -#endif - } - - virtual bool get_inconsistent() const override - { -#if GTK_CHECK_VERSION(4, 0, 0) - return gtk_widget_get_state_flags(GTK_WIDGET(m_pToggleButton)) & GTK_STATE_FLAG_INCONSISTENT; -#else - return gtk_toggle_button_get_inconsistent(m_pToggleButton); -#endif - } - virtual void disable_notify_events() override { g_signal_handler_block(m_pToggleButton, m_nToggledSignalId); @@ -10958,23 +10937,9 @@ public: m_aCustomBackground.use_custom_content(pDevice); } - virtual void set_inconsistent(bool inconsistent) override - { - if (inconsistent) - gtk_widget_set_state_flags(GTK_WIDGET(m_pMenuButton), GTK_STATE_FLAG_INCONSISTENT, false); - else - gtk_widget_unset_state_flags(GTK_WIDGET(m_pMenuButton), GTK_STATE_FLAG_INCONSISTENT); - } - - virtual bool get_inconsistent() const override - { - return gtk_widget_get_state_flags(GTK_WIDGET(m_pMenuButton)) & GTK_STATE_FLAG_INCONSISTENT; - } - virtual void set_active(bool active) override { disable_notify_events(); - set_inconsistent(false); if (active) gtk_menu_button_popup(m_pMenuButton); else @@ -12144,12 +12109,8 @@ private: if (GTK_IS_BUTTON(pItem)) gtk_button_set_child(GTK_BUTTON(pItem), pImage); else if (GTK_IS_MENU_BUTTON(pItem)) - { - // TODO after gtk 4.6 is released require that version and drop this - static auto menu_button_set_child = reinterpret_cast<void (*) (GtkMenuButton*, GtkWidget*)>(dlsym(nullptr, "gtk_menu_button_set_child")); - if (menu_button_set_child) - menu_button_set_child(GTK_MENU_BUTTON(pItem), pImage); - } + gtk_menu_button_set_child(GTK_MENU_BUTTON(pItem), pImage); + // versions of gtk4 > 4.2.1 might do this on their own gtk_widget_remove_css_class(pItem, "text-button"); } @@ -12818,38 +12779,37 @@ public: { } - virtual void set_active(bool active) override + virtual void set_state(TriState eState) override { disable_notify_events(); + const bool bInconsistent = eState == TRISTATE_INDET; #if GTK_CHECK_VERSION(4, 0, 0) - gtk_check_button_set_inconsistent(m_pCheckButton, false); - gtk_check_button_set_active(m_pCheckButton, active); + gtk_check_button_set_inconsistent(m_pCheckButton, bInconsistent); + if (!bInconsistent) + gtk_check_button_set_active(m_pCheckButton, eState == TRISTATE_TRUE); #else - gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(m_pCheckButton), false); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_pCheckButton), active); + gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(m_pCheckButton), bInconsistent); + if (!bInconsistent) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_pCheckButton), + eState == TRISTATE_TRUE); #endif enable_notify_events(); } - virtual bool get_active() const override - { -#if GTK_CHECK_VERSION(4, 0, 0) - return gtk_check_button_get_active(m_pCheckButton); -#else - return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pCheckButton)); -#endif - } - - virtual void set_inconsistent(bool inconsistent) override + virtual TriState get_state() const override { + if (get_inconsistent()) + return TRISTATE_INDET; #if GTK_CHECK_VERSION(4, 0, 0) - gtk_check_button_set_inconsistent(m_pCheckButton, inconsistent); + if (gtk_check_button_get_active(m_pCheckButton)) #else - gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(m_pCheckButton), inconsistent); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pCheckButton))) #endif + return TRISTATE_TRUE; + return TRISTATE_FALSE; } - virtual bool get_inconsistent() const override + bool get_inconsistent() const { #if GTK_CHECK_VERSION(4, 0, 0) return gtk_check_button_get_inconsistent(m_pCheckButton); @@ -12914,12 +12874,17 @@ public: { } - void set_inconsistent(bool bInconsistent) override + virtual void set_label(const OUString& rText) override { - weld::RadioButton::set_inconsistent(bInconsistent); + GtkInstanceCheckButton::set_label(rText); } - bool get_inconsistent() const override { return weld::RadioButton::get_inconsistent(); } + virtual OUString get_label() const override { return GtkInstanceCheckButton::get_label(); } + + virtual void set_label_wrap(bool wrap) override + { + GtkInstanceCheckButton::set_label_wrap(wrap); + } }; } diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 8f374dbe39d2..f0b7c0f510b6 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -406,10 +406,6 @@ WinSalInstance::WinSalInstance() pSVData->maAppData.mxToolkitName = OUString("win"); m_bSupportsOpenGL = true; WinSkiaSalGraphicsImpl::prepareSkia(); -#if SKIA_USE_BITMAP32 - if (SkiaHelper::isVCLSkiaEnabled()) - m_bSupportsBitmap32 = true; -#endif } WinSalInstance::~WinSalInstance() diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index eb4ab2c18972..afa19be6941a 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -34,6 +34,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <comphelper/windowserrorstring.hxx> #include <win/wincomp.hxx> #include <win/saldata.hxx> #include <win/salgdi.h> @@ -54,6 +55,7 @@ #include <gdiplus.h> #include <gdiplusenums.h> #include <gdipluscolor.h> +#include <Gdipluspixelformats.h> #include <postwin.h> @@ -717,7 +719,7 @@ void WinSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, ImplDrawBitmap( hDC, aPosAry, rSalBitmap, false, 0x00B8074AUL );// raster operation PSDPxax } -std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) +std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY, bool bWithoutAlpha ) { SAL_WARN_IF( mrParent.isPrinter(), "vcl", "No ::GetBitmap() from printer possible!" ); @@ -727,12 +729,34 @@ std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( tools::Long nX, tools: nDY = std::abs( nDY ); HDC hDC = mrParent.getHDC(); - HBITMAP hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY ); - bool bRet; + HBITMAP hBmpBitmap; + if (bWithoutAlpha && GetBitCount() == 32) + { + BITMAPINFO aBitmapInfo; + aBitmapInfo.bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); + aBitmapInfo.bmiHeader.biWidth = nDX; + aBitmapInfo.bmiHeader.biHeight = -nDY; // negative for top down + aBitmapInfo.bmiHeader.biPlanes = 1; + aBitmapInfo.bmiHeader.biBitCount = 24; + aBitmapInfo.bmiHeader.biCompression = BI_RGB; + aBitmapInfo.bmiHeader.biSizeImage = 0; + aBitmapInfo.bmiHeader.biXPelsPerMeter = 0; + aBitmapInfo.bmiHeader.biYPelsPerMeter = 0; + aBitmapInfo.bmiHeader.biClrUsed = 0; + aBitmapInfo.bmiHeader.biClrImportant = 0; + + void* pData; + hBmpBitmap = CreateDIBSection( hDC, &aBitmapInfo, + DIB_RGB_COLORS, &pData, nullptr, + 0 ); + SAL_WARN_IF( !hBmpBitmap, "vcl", "CreateDIBSection failed: " << comphelper::WindowsErrorString( GetLastError() ) ); + } + else + hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY ); + bool bRet; { ScopedCachedHDC<CACHED_HDC_1> hBmpDC(hBmpBitmap); - bRet = BitBlt(hBmpDC.get(), 0, 0, static_cast<int>(nDX), static_cast<int>(nDY), hDC, static_cast<int>(nX), static_cast<int>(nY), SRCCOPY) ? TRUE : FALSE; @@ -758,14 +782,38 @@ std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( tools::Long nX, tools: Color WinSalGraphicsImpl::getPixel( tools::Long nX, tools::Long nY ) { - COLORREF aWinCol = ::GetPixel( mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY) ); - - if ( CLR_INVALID == aWinCol ) - return Color( 0, 0, 0 ); + // The only way to read a pixel color with alpha is via GDI+ + // This is all hideously inefficient, but we only really use it for unit tests. + Gdiplus::Bitmap screenPixel(1, 1, PixelFormat32bppARGB); + Gdiplus::Graphics gdest(&screenPixel); + auto hDestDC = gdest.GetHDC(); + BOOL retval = BitBlt(hDestDC, 0, 0, 1, 1, + mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY), + SRCCOPY); + gdest.ReleaseHDC(hDestDC); + + if (!retval) + { + SAL_WARN("vcl", "GetPixel failed1"); + return Color(0, 0, 0); + } + Gdiplus::Color nGdiColor; + if (screenPixel.GetPixel(0, 0, &nGdiColor) != Gdiplus::Ok) + { + SAL_WARN("vcl", "GetPixel failed2"); + return Color(0, 0, 0); + } + // seems to be returning premultiplied color, despite the pixel format that I pass in the constructor + if (nGdiColor.GetAlpha() == 0) + return Color(ColorAlpha, nGdiColor.GetAlpha(), + nGdiColor.GetRed(), + nGdiColor.GetGreen(), + nGdiColor.GetBlue()); else - return Color( GetRValue( aWinCol ), - GetGValue( aWinCol ), - GetBValue( aWinCol ) ); + return Color(ColorAlpha, nGdiColor.GetAlpha(), + nGdiColor.GetRed() * 255 / nGdiColor.GetAlpha(), + nGdiColor.GetGreen() * 255 / nGdiColor.GetAlpha(), + nGdiColor.GetBlue() * 255 / nGdiColor.GetAlpha()); } namespace @@ -1379,11 +1427,42 @@ void WinSalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY ) void WinSalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY, Color nColor ) { - COLORREF nCol = RGB( nColor.GetRed(), + COLORREF nColorRef = RGB( nColor.GetRed(), nColor.GetGreen(), nColor.GetBlue() ); - DrawPixelImpl( nX, nY, nCol ); + if (nColor.GetAlpha() != 255) + { + const HDC hDC = mrParent.getHDC(); + + if (!mbXORMode) + { + // the only way to draw a pixel with alpha is via GDI+ + Gdiplus::Graphics g (hDC); + g.SetCompositingMode(Gdiplus::CompositingModeSourceCopy); + Gdiplus::SolidBrush brush(Gdiplus::Color(nColor.GetAlpha(), nColor.GetRed(), nColor.GetGreen(), nColor.GetBlue())); + g.FillRectangle(&brush, static_cast<int>(nX), static_cast<int>(nY), 1, 1); + } + else + { + assert(false && "I am not even sure what it would mean to use alpha in this mode"); + ScopedSelectedHBRUSH hBrush(hDC, CreateSolidBrush(nColorRef)); + PatBlt(hDC, static_cast<int>(nX), static_cast<int>(nY), int(1), int(1), PATINVERT); + } + } + else + { + const HDC hDC = mrParent.getHDC(); + + if (!mbXORMode) + { + SetPixel(hDC, static_cast<int>(nX), static_cast<int>(nY), nColorRef); + return; + } + + ScopedSelectedHBRUSH hBrush(hDC, CreateSolidBrush(nColorRef)); + PatBlt(hDC, static_cast<int>(nX), static_cast<int>(nY), int(1), int(1), PATINVERT); + } } void WinSalGraphicsImpl::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) @@ -1403,8 +1482,24 @@ void WinSalGraphicsImpl::drawRect( tools::Long nX, tools::Long nY, tools::Long n { if ( !mrParent.isPrinter() ) { - PatBlt( mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY), static_cast<int>(nWidth), static_cast<int>(nHeight), - mbXORMode ? PATINVERT : PATCOPY ); + if (maFillColor.GetAlpha() == 255) + { + PatBlt( mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY), static_cast<int>(nWidth), static_cast<int>(nHeight), + mbXORMode ? PATINVERT : PATCOPY ); + } + else if (mbXORMode) + assert(false && "don't even know what this would mean"); + else + { + // the only way to draw with alpha is via GDI+ + Gdiplus::Graphics g(mrParent.getHDC()); + if (g.SetCompositingMode(Gdiplus::CompositingModeSourceCopy) != Gdiplus::Ok) + SAL_WARN("vcl", "SetCompositingMode failed"); + Gdiplus::SolidBrush brush( + Gdiplus::Color(maFillColor.GetAlpha(), maFillColor.GetRed(), + maFillColor.GetGreen(), maFillColor.GetBlue())); + g.FillRectangle(&brush, static_cast<int>(nX), static_cast<int>(nY), nWidth, nHeight); + } } else { @@ -1417,7 +1512,25 @@ void WinSalGraphicsImpl::drawRect( tools::Long nX, tools::Long nY, tools::Long n } } else - Rectangle( mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY), static_cast<int>(nX+nWidth), static_cast<int>(nY+nHeight) ); + { + if (maFillColor.GetAlpha() == 255) + Rectangle(mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY), + static_cast<int>(nX + nWidth), static_cast<int>(nY + nHeight)); + else if (mbXORMode) + assert(false && "don't even know what this would mean"); + else + { + // the only way to draw with alpha is via GDI+ + Gdiplus::Graphics g(mrParent.getHDC()); + if (g.SetCompositingMode(Gdiplus::CompositingModeSourceCopy) != Gdiplus::Ok) + SAL_WARN("vcl", "SetCompositingMode failed"); + Gdiplus::SolidBrush brush( + Gdiplus::Color(maFillColor.GetAlpha(), maFillColor.GetRed(), + maFillColor.GetGreen(), maFillColor.GetBlue())); + g.FillRectangle(&brush, static_cast<int>(nX), static_cast<int>(nY), nWidth, + nHeight); + } + } } void WinSalGraphicsImpl::drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) @@ -2266,30 +2379,15 @@ static void paintToGdiPlus( const SalTwoRect& rTR, Gdiplus::Bitmap& rBitmap) { - // only parts of source are used - Gdiplus::PointF aDestPoints[3]; - Gdiplus::ImageAttributes aAttributes; - - // define target region as parallelogram - aDestPoints[0].X = Gdiplus::REAL(rTR.mnDestX); - aDestPoints[0].Y = Gdiplus::REAL(rTR.mnDestY); - aDestPoints[1].X = Gdiplus::REAL(rTR.mnDestX + rTR.mnDestWidth); - aDestPoints[1].Y = Gdiplus::REAL(rTR.mnDestY); - aDestPoints[2].X = Gdiplus::REAL(rTR.mnDestX); - aDestPoints[2].Y = Gdiplus::REAL(rTR.mnDestY + rTR.mnDestHeight); - - aAttributes.SetWrapMode(Gdiplus::WrapModeTileFlipXY); + Gdiplus::Rect aDestRect{ INT(rTR.mnDestX), INT(rTR.mnDestY), + INT(rTR.mnDestWidth), INT(rTR.mnDestHeight) }; rGraphics.DrawImage( &rBitmap, - aDestPoints, - 3, - Gdiplus::REAL(rTR.mnSrcX), - Gdiplus::REAL(rTR.mnSrcY), - Gdiplus::REAL(rTR.mnSrcWidth), - Gdiplus::REAL(rTR.mnSrcHeight), + aDestRect, + rTR.mnSrcX, rTR.mnSrcY, rTR.mnSrcWidth, rTR.mnSrcHeight, Gdiplus::UnitPixel, - &aAttributes); + nullptr); } static void setInterpolationMode( @@ -2374,6 +2472,10 @@ bool WinSalGraphicsImpl::drawAlphaBitmap( if(!rTR.mnSrcWidth || !rTR.mnSrcHeight || !rTR.mnDestWidth || !rTR.mnDestHeight) return false; + // neither GDI nor GDI+ can properly blend to a surface that has alpha + if (GetBitCount() == 32) + return false; + assert(dynamic_cast<const WinSalBitmap*>(&rSrcBitmap)); assert(dynamic_cast<const WinSalBitmap*>(&rAlphaBmp)); diff --git a/vcl/win/gdi/gdiimpl.hxx b/vcl/win/gdi/gdiimpl.hxx index da0aa7672b73..7959620d5243 100644 --- a/vcl/win/gdi/gdiimpl.hxx +++ b/vcl/win/gdi/gdiimpl.hxx @@ -170,7 +170,7 @@ public: const SalBitmap& rSalBitmap, Color nMaskColor ) override; - virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override; + virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, bool bWithoutAlpha ) override; virtual Color getPixel( tools::Long nX, tools::Long nY ) override; diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index f65cd869e277..dd3fb6119377 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -748,7 +748,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ ) pBuffer->meFormat = pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal : pBIH->biBitCount == 24 ? ScanlineFormat::N24BitTcBgr : - pBIH->biBitCount == 32 ? ScanlineFormat::N32BitTcBgrx : + pBIH->biBitCount == 32 ? ScanlineFormat::N32BitTcBgra : ScanlineFormat::NONE; assert (pBuffer->meFormat != ScanlineFormat::NONE); diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx index 4dca93550041..2d1cfb2c89b5 100644 --- a/vcl/win/gdi/salgdi2.cxx +++ b/vcl/win/gdi/salgdi2.cxx @@ -212,9 +212,9 @@ void WinSalGraphics::drawMask( const SalTwoRect& rPosAry, mpImpl->drawMask( rPosAry, rSSalBitmap, nMaskColor ); } -std::shared_ptr<SalBitmap> WinSalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) +std::shared_ptr<SalBitmap> WinSalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY, bool bWithoutAlpha ) { - return mpImpl->getBitmap( nX, nY, nDX, nDY ); + return mpImpl->getBitmap( nX, nY, nDX, nDY, bWithoutAlpha ); } Color WinSalGraphics::getPixel( tools::Long nX, tools::Long nY ) diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx index 22dca8b03337..547cae8976f7 100644 --- a/vcl/win/gdi/salvd.cxx +++ b/vcl/win/gdi/salvd.cxx @@ -31,12 +31,13 @@ #include <sal/log.hxx> #include <o3tl/temporary.hxx> -HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, tools::Long nDY, sal_uInt16 nBitCount, void **ppData) +HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, tools::Long nDY, sal_uInt16 nBitCount, void **ppData, bool bAlphaMaskTransparent) { HBITMAP hBitmap; if ( nBitCount == 1 ) { + assert(!bAlphaMaskTransparent && "does not make sense here"); hBitmap = CreateBitmap( static_cast<int>(nDX), static_cast<int>(nDY), 1, 1, nullptr ); SAL_WARN_IF( !hBitmap, "vcl", "CreateBitmap failed: " << comphelper::WindowsErrorString( GetLastError() ) ); ppData = nullptr; @@ -52,7 +53,7 @@ HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, to BITMAPINFO aBitmapInfo; aBitmapInfo.bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); aBitmapInfo.bmiHeader.biWidth = nDX; - aBitmapInfo.bmiHeader.biHeight = nDY; + aBitmapInfo.bmiHeader.biHeight = -nDY; // negative for top-down bitmap aBitmapInfo.bmiHeader.biPlanes = 1; aBitmapInfo.bmiHeader.biBitCount = nBitCount; aBitmapInfo.bmiHeader.biCompression = BI_RGB; @@ -62,10 +63,23 @@ HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, to aBitmapInfo.bmiHeader.biClrUsed = 0; aBitmapInfo.bmiHeader.biClrImportant = 0; + void* pData = nullptr; hBitmap = CreateDIBSection( hDC, &aBitmapInfo, - DIB_RGB_COLORS, ppData, nullptr, + DIB_RGB_COLORS, &pData, nullptr, 0 ); SAL_WARN_IF( !hBitmap, "vcl", "CreateDIBSection failed: " << comphelper::WindowsErrorString( GetLastError() ) ); + + if (hBitmap) + { + if (bAlphaMaskTransparent) + { + assert(nBitCount == 32); + memset(pData, nDX * nDY * 4, 0); + } + + if (ppData) + *ppData = pData; + } } return hBitmap; @@ -73,7 +87,8 @@ HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, to std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( SalGraphics& rSGraphics, tools::Long nDX, tools::Long nDY, - DeviceFormat /*eFormat*/ ) + DeviceFormat eFormat, + bool bAlphaMaskTransparent ) { WinSalGraphics& rGraphics = static_cast<WinSalGraphics&>(rSGraphics); @@ -83,13 +98,14 @@ std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( SalGraphi if (!hDC) return nullptr; - const sal_uInt16 nBitCount = 0; + const sal_uInt16 nBitCount = eFormat == DeviceFormat::WITHOUT_ALPHA ? 0 : 32; // #124826# continue even if hBmp could not be created // if we would return a failure in this case, the process // would terminate which is not required HBITMAP hBmp = WinSalVirtualDevice::ImplCreateVirDevBitmap(rGraphics.getHDC(), nDX, nDY, nBitCount, - &o3tl::temporary<void*>(nullptr)); + &o3tl::temporary<void*>(nullptr), + bAlphaMaskTransparent); auto pVDev = std::make_unique<WinSalVirtualDevice>(hDC, hBmp, nBitCount, /*bForeignDC*/false, nDX, nDY, rGraphics.isScreen()); @@ -195,13 +211,13 @@ void WinSalVirtualDevice::ReleaseGraphics( SalGraphics* ) mbGraphicsAcquired = false; } -bool WinSalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY ) +bool WinSalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY, bool bAlphaMaskTransparent ) { if( mbForeignDC || !mhBmp ) return true; // ??? HBITMAP hNewBmp = ImplCreateVirDevBitmap(getHDC(), nDX, nDY, mnBitCount, - &o3tl::temporary<void*>(nullptr)); + &o3tl::temporary<void*>(nullptr), bAlphaMaskTransparent); if (!hNewBmp) { mnWidth = 0; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index d488832f9db8..00f65adc7c76 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -678,22 +678,20 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape Note: Writer documents in OpenOffice.org file format doesn't contain any names for shapes, except for group shapes. */ - { - if ( ( GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITER && - GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITERWEB && - GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITERGLOBAL ) || - ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) || - aShapeInfo.meShapeType == XmlShapeType::DrawGroupShape || - ( aShapeInfo.meShapeType == XmlShapeType::DrawCustomShape && - aShapeInfo.xCustomShapeReplacement.is() ) ) + if ( ( GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITER && + GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITERWEB && + GetExport().GetModelType() != SvtModuleOptions::EFactory::WRITERGLOBAL ) || + ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) || + aShapeInfo.meShapeType == XmlShapeType::DrawGroupShape || + ( aShapeInfo.meShapeType == XmlShapeType::DrawCustomShape && + aShapeInfo.xCustomShapeReplacement.is() ) ) + { + uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY ); + if( xNamed.is() ) { - uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY ); - if( xNamed.is() ) - { - const OUString aName( xNamed->getName() ); - if( !aName.isEmpty() ) - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName ); - } + const OUString aName( xNamed->getName() ); + if( !aName.isEmpty() ) + mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName ); } } diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 74150a1fda46..53370d3b47ed 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -1691,20 +1691,17 @@ namespace xmloff if ( FormCellBindingHelper::livesInSpreadsheetDocument( m_xProps ) ) { FormCellBindingHelper aHelper( m_xProps, nullptr ); + + if ( FormCellBindingHelper::isCellBinding( aHelper.getCurrentBinding( ) ) ) { - if ( FormCellBindingHelper::isCellBinding( aHelper.getCurrentBinding( ) ) ) - { - m_nIncludeBindings |= BAFlags::LinkedCell; - if ( m_nClassId == FormComponentType::LISTBOX ) - m_nIncludeBindings |= BAFlags::ListLinkingType; - } + m_nIncludeBindings |= BAFlags::LinkedCell; + if ( m_nClassId == FormComponentType::LISTBOX ) + m_nIncludeBindings |= BAFlags::ListLinkingType; } // is it a list-like control which uses a calc cell range as list source? - { - if ( FormCellBindingHelper::isCellRangeListSource( aHelper.getCurrentListSource( ) ) ) - m_nIncludeBindings |= BAFlags::ListCellRange; - } + if ( FormCellBindingHelper::isCellRangeListSource( aHelper.getCurrentListSource( ) ) ) + m_nIncludeBindings |= BAFlags::ListCellRange; } // is control bound to XForms? diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 5f129061318d..5c086c4dd5d0 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -317,25 +317,24 @@ bool XMLStyleExport::exportStyle( { // Written OpenDocument file format doesn't fit to the created text document (#i69627#) bool bSuppressListStyle( false ); + + if ( !GetExport().writeOutlineStyleAsNormalListStyle() ) { - if ( !GetExport().writeOutlineStyleAsNormalListStyle() ) + Reference< XChapterNumberingSupplier > xCNSupplier + (GetExport().GetModel(), UNO_QUERY); + + if (xCNSupplier.is()) { - Reference< XChapterNumberingSupplier > xCNSupplier - (GetExport().GetModel(), UNO_QUERY); - - if (xCNSupplier.is()) - { - Reference< XIndexReplace > xNumRule - ( xCNSupplier->getChapterNumberingRules() ); - assert(xNumRule.is()); - - Reference< XPropertySet > xNumRulePropSet - (xNumRule, UNO_QUERY); - OUString sOutlineName; - xNumRulePropSet->getPropertyValue(u"Name"_ustr) - >>= sOutlineName; - bSuppressListStyle = sListName == sOutlineName; - } + Reference< XIndexReplace > xNumRule + ( xCNSupplier->getChapterNumberingRules() ); + assert(xNumRule.is()); + + Reference< XPropertySet > xNumRulePropSet + (xNumRule, UNO_QUERY); + OUString sOutlineName; + xNumRulePropSet->getPropertyValue(u"Name"_ustr) + >>= sOutlineName; + bSuppressListStyle = sListName == sOutlineName; } } diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 3357c3e66527..d79d3fc1c4d6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1535,21 +1535,20 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) return; bool bChooseLastOne( false ); + + if ( GetXMLImport().IsTextDocInOOoFileFormat() ) { - if ( GetXMLImport().IsTextDocInOOoFileFormat() ) - { - bChooseLastOne = true; - } - else + bChooseLastOne = true; + } + else + { + sal_Int32 nUPD( 0 ); + sal_Int32 nBuild( 0 ); + if ( GetXMLImport().getBuildIds( nUPD, nBuild ) ) { - sal_Int32 nUPD( 0 ); - sal_Int32 nBuild( 0 ); - if ( GetXMLImport().getBuildIds( nUPD, nBuild ) ) - { - // check explicitly on certain versions - bChooseLastOne = ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0 - ( nUPD == 680 && nBuild <= 9073 ); // OOo 2.0 - OOo 2.0.4 - } + // check explicitly on certain versions + bChooseLastOne = ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0 + ( nUPD == 680 && nBuild <= 9073 ); // OOo 2.0 - OOo 2.0.4 } } diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index d83f0726ca51..bda9fa0ef1b3 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -723,89 +723,87 @@ void XSecController::exportSignature( xDocumentHandler->startElement( u"KeyInfo"_ustr, css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); + // GPG or X509 key? + if (!signatureInfo.ouGpgCertificate.isEmpty()) { - // GPG or X509 key? - if (!signatureInfo.ouGpgCertificate.isEmpty()) + pAttributeList = new comphelper::AttributeList(); + pAttributeList->AddAttribute(u"xmlns:loext"_ustr, NS_LOEXT); + /* Write PGPData element */ + xDocumentHandler->startElement( + u"PGPData"_ustr, + pAttributeList); { - pAttributeList = new comphelper::AttributeList(); - pAttributeList->AddAttribute(u"xmlns:loext"_ustr, NS_LOEXT); - /* Write PGPData element */ + /* Write keyid element */ xDocumentHandler->startElement( - u"PGPData"_ustr, - pAttributeList); + u"PGPKeyID"_ustr, + css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); + xDocumentHandler->characters(signatureInfo.ouGpgKeyID); + xDocumentHandler->endElement( u"PGPKeyID"_ustr ); + + /* Write PGPKeyPacket element */ + if (!signatureInfo.ouGpgCertificate.isEmpty()) { - /* Write keyid element */ xDocumentHandler->startElement( - u"PGPKeyID"_ustr, + u"PGPKeyPacket"_ustr, css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); - xDocumentHandler->characters(signatureInfo.ouGpgKeyID); - xDocumentHandler->endElement( u"PGPKeyID"_ustr ); - - /* Write PGPKeyPacket element */ - if (!signatureInfo.ouGpgCertificate.isEmpty()) - { - xDocumentHandler->startElement( - u"PGPKeyPacket"_ustr, - css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); - xDocumentHandler->characters( signatureInfo.ouGpgCertificate ); - xDocumentHandler->endElement( u"PGPKeyPacket"_ustr ); - } - - /* Write PGPOwner element */ - xDocumentHandler->startElement( - u"loext:PGPOwner"_ustr, - css::uno::Reference< css::xml::sax::XAttributeList >(new comphelper::AttributeList())); - xDocumentHandler->characters( signatureInfo.ouGpgOwner ); - xDocumentHandler->endElement( u"loext:PGPOwner"_ustr ); + xDocumentHandler->characters( signatureInfo.ouGpgCertificate ); + xDocumentHandler->endElement( u"PGPKeyPacket"_ustr ); } - xDocumentHandler->endElement( u"PGPData"_ustr ); + + /* Write PGPOwner element */ + xDocumentHandler->startElement( + u"loext:PGPOwner"_ustr, + css::uno::Reference< css::xml::sax::XAttributeList >(new comphelper::AttributeList())); + xDocumentHandler->characters( signatureInfo.ouGpgOwner ); + xDocumentHandler->endElement( u"loext:PGPOwner"_ustr ); } - else + xDocumentHandler->endElement( u"PGPData"_ustr ); + } + else + { + assert(signatureInfo.GetSigningCertificate()); + for (auto const& rData : signatureInfo.X509Datas) { - assert(signatureInfo.GetSigningCertificate()); - for (auto const& rData : signatureInfo.X509Datas) + /* Write X509Data element */ + xDocumentHandler->startElement( + u"X509Data"_ustr, + css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); { - /* Write X509Data element */ - xDocumentHandler->startElement( - u"X509Data"_ustr, - css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); + for (auto const& it : rData) { - for (auto const& it : rData) + /* Write X509IssuerSerial element */ + xDocumentHandler->startElement( + u"X509IssuerSerial"_ustr, + css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); + { + /* Write X509IssuerName element */ + xDocumentHandler->startElement( + u"X509IssuerName"_ustr, + css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); + xDocumentHandler->characters(it.X509IssuerName); + xDocumentHandler->endElement( u"X509IssuerName"_ustr ); + + /* Write X509SerialNumber element */ + xDocumentHandler->startElement( + u"X509SerialNumber"_ustr, + css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); + xDocumentHandler->characters(it.X509SerialNumber); + xDocumentHandler->endElement( u"X509SerialNumber"_ustr ); + } + xDocumentHandler->endElement( u"X509IssuerSerial"_ustr ); + + /* Write X509Certificate element */ + if (!it.X509Certificate.isEmpty()) { - /* Write X509IssuerSerial element */ xDocumentHandler->startElement( - u"X509IssuerSerial"_ustr, + u"X509Certificate"_ustr, css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); - { - /* Write X509IssuerName element */ - xDocumentHandler->startElement( - u"X509IssuerName"_ustr, - css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); - xDocumentHandler->characters(it.X509IssuerName); - xDocumentHandler->endElement( u"X509IssuerName"_ustr ); - - /* Write X509SerialNumber element */ - xDocumentHandler->startElement( - u"X509SerialNumber"_ustr, - css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); - xDocumentHandler->characters(it.X509SerialNumber); - xDocumentHandler->endElement( u"X509SerialNumber"_ustr ); - } - xDocumentHandler->endElement( u"X509IssuerSerial"_ustr ); - - /* Write X509Certificate element */ - if (!it.X509Certificate.isEmpty()) - { - xDocumentHandler->startElement( - u"X509Certificate"_ustr, - css::uno::Reference< css::xml::sax::XAttributeList > (new comphelper::AttributeList())); - xDocumentHandler->characters(it.X509Certificate); - xDocumentHandler->endElement( u"X509Certificate"_ustr ); - } + xDocumentHandler->characters(it.X509Certificate); + xDocumentHandler->endElement( u"X509Certificate"_ustr ); } } - xDocumentHandler->endElement( u"X509Data"_ustr ); } + xDocumentHandler->endElement( u"X509Data"_ustr ); } } xDocumentHandler->endElement( u"KeyInfo"_ustr ); |