[Libreoffice-commits] core.git: include/svx sw/inc
include/svx/svxids.hrc | 10 +- sw/inc/cmdid.h |2 +- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 70c8e6abc0a4ed4a2c7a948ee206ba9d4cffd22b Author: Miklos Vajna AuthorDate: Mon Apr 25 12:39:22 2022 +0200 Commit: Miklos Vajna CommitDate: Mon Apr 25 13:47:42 2022 +0200 sw: make it easier to look up an uno command from a slot id This way if I see a slot id 20456, then searching with git grep define.*20400 include/ */inc finds FN_FORMAT, and searching with git grep FN_FORMAT.*56 include/ */inc finds FN_FORMAT_FRAME_DLG. Change-Id: Ibda8b131f73c81221569618cda33e52b03448feb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133374 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 4f4c07f2e2d5..d50be073c40d 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -174,7 +174,7 @@ class XFillGradientItem; // Writer IDs -#define FN_EDIT (SID_SW_START + 100) +#define FN_EDIT (SID_SW_START + 100) // 20100 #define FN_NUM_BULLET_OFF (FN_EDIT + 37) // numbering off #define FN_NUM_BULLET_ON(FN_EDIT + 38) // numbering with bullets on #define FN_NUM_NUMBERING_ON (FN_EDIT + 44) // numbering on @@ -182,7 +182,7 @@ class XFillGradientItem; #define FN_NUM_NUM_RULE_INDEX (FN_EDIT + 121) #define FN_OUTLINE_RULE_INDEX (FN_EDIT + 122) -#define FN_INSERT (SID_SW_START + 300) +#define FN_INSERT (SID_SW_START + 300) // 20300 #define FN_DELETE_BOOKMARK (FN_INSERT + 1) #define FN_INSERT_BREAK (FN_INSERT + 3) #define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43)/* optional hyphen */ @@ -191,12 +191,12 @@ class XFillGradientItem; #define FN_INSERT_HARDHYPHEN(FN_INSERT + 85)/* hyphen without break*/ //!! be aware to not overwrite something that is used in sw/inc/cmdid.h already !! -#define FN_FORMAT (SID_SW_START + 400) +#define FN_FORMAT (SID_SW_START + 400) // 20400 #define FN_FORMAT_RESET (FN_FORMAT + 69) -#define FN_EXTRA(SID_SW_START + 600) +#define FN_EXTRA(SID_SW_START + 600) // 20600 -#define FN_SELECTION(SID_SW_START + 900) +#define FN_SELECTION(SID_SW_START + 900) // 20900 #define FN_END_OF_DOCUMENT (FN_SELECTION + 8) #define FN_START_DOC_DIRECT (FN_SELECTION + 78) #define FN_END_DOC_DIRECT (FN_SELECTION + 79) diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index df1321bb00e9..29adc6a580d6 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -33,7 +33,7 @@ class SwUINumRuleItem; #define FN_FILE SID_SW_START //#define FN_EDIT (SID_SW_START + 100) defined in svxids.hrc -#define FN_VIEW (SID_SW_START + 200) +#define FN_VIEW (SID_SW_START + 200) // 20200 //#define FN_INSERT (SID_SW_START + 300) defined in svxids.hrc //#define FN_FORMAT (SID_SW_START + 400) defined in svxids.hrc //#define FN_EXTRA(SID_SW_START + 600) defined in svxids.hrc
[Libreoffice-commits] core.git: include/svx sw/inc sw/source
include/svx/flagsdef.hxx|4 +++- sw/inc/swtypes.hxx | 29 ++--- sw/source/uibase/ribbar/conform.cxx |8 3 files changed, 21 insertions(+), 20 deletions(-) New commits: commit 77a192aa016279acc0b0f9df584d1ce31bde41a4 Author: Tomaž Vajngerl AuthorDate: Wed Jul 21 23:16:28 2021 +0900 Commit: Tomaž Vajngerl CommitDate: Sat Jul 24 07:10:31 2021 +0200 sw: define to constexpr, use MM50 from svx and use o3tl::convert MM50 is a constant representing 0.5cm in twips. Use o3tl::convert for to init the constant instead. It matches the constant which I checked with a static_assert. Change-Id: Ib6c37a44ef5b22258e913fd3809a37ab0d18671b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119396 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx index b098b141be11..3fbb70ca6b5e 100644 --- a/include/svx/flagsdef.hxx +++ b/include/svx/flagsdef.hxx @@ -21,6 +21,8 @@ #include #include +#include +#include // Border-Modes for SvxBorderTabPage enum class SwBorderModes @@ -99,7 +101,7 @@ enum SvxModeType // 1/2 cm in TWIPS // Is also used for minimum size of LayFrms of any kind -#define MM50 283 //from original svx/inc/paragrph.hxx +constexpr tools::Long MM50 = o3tl::convert(tools::Long(5), o3tl::Length::mm, o3tl::Length::twip); enum class TabulatorDisableFlags { TypeLeft = 0x0001, diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index e76b521b1f8b..dd15ce03bb88 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -27,6 +27,7 @@ #include #include #include +#include namespace com::sun::star { namespace linguistic2{ @@ -52,30 +53,28 @@ typedef tools::Long SwTwips; #define INVALID_TWIPS LONG_MAX #define TWIPS_MAX (LONG_MAX - 1) -#define MM50 283 // 1/2 cm in TWIPS. +constexpr sal_Int32 COMPLETE_STRING = SAL_MAX_INT32; -const sal_Int32 COMPLETE_STRING = SAL_MAX_INT32; - -const SwTwips cMinHdFtHeight = 56; +constexpr SwTwips cMinHdFtHeight = 56; #define MINFLY 23 // Minimal size for FlyFrames. #define MINLAY 23 // Minimal size for other Frames. // Default column distance of two text columns corresponds to 0.3 cm. -#define DEF_GUTTER_WIDTH (MM50 / 5 * 3) +constexpr SwTwips DEF_GUTTER_WIDTH = MM50 / 5 * 3; // Minimal distance (distance to text) for border attribute // in order not to crock up aligned lines. // 28 Twips == 0,4mm -#define MIN_BORDER_DIST 28 +constexpr SwTwips MIN_BORDER_DIST = 28; // Minimal document border: 20mm. -const SwTwips lMinBorder = 1134; +constexpr SwTwips lMinBorder = 1134; // Margin left and above document. // Half of it is gap between the pages. //TODO: Replace with SwViewOption::defDocumentBorder -#define DOCUMENTBORDER 284 +constexpr SwTwips DOCUMENTBORDER = 284; // For inserting of captions (what and where to insert). // It's here because it is not big enough to justify its own hxx @@ -88,19 +87,19 @@ enum class SwLabelType Draw // Caption for a draw object. }; -const sal_uInt8 MAXLEVEL = 10; +constexpr sal_uInt8 MAXLEVEL = 10; -const sal_uInt8 NO_NUMLEVEL = 0x20;// "or" with the levels. +constexpr sal_uInt8 NO_NUMLEVEL = 0x20;// "or" with the levels. // Values for indents at numbering and bullet lists. // (For more levels the values have to be multiplied with the levels+1; // levels 0 ..4!) -const short lBulletIndent = 1440/4; -const short lBulletFirstLineOffset = -lBulletIndent; -const sal_uInt16 lNumberIndent = 1440/4; -const short lNumberFirstLineOffset = -lNumberIndent; -const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm +constexpr short lBulletIndent = 1440 / 4; +constexpr short lBulletFirstLineOffset = -lBulletIndent; +constexpr sal_uInt16 lNumberIndent = 1440 / 4; +constexpr short lNumberFirstLineOffset = -lNumberIndent; +constexpr short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm // Count of SystemField-types of SwDoc. #define INIT_FLDTYPES 33 diff --git a/sw/source/uibase/ribbar/conform.cxx b/sw/source/uibase/ribbar/conform.cxx index 393896e22d27..f51e9123ca40 100644 --- a/sw/source/uibase/ribbar/conform.cxx +++ b/sw/source/uibase/ribbar/conform.cxx @@ -91,10 +91,10 @@ void ConstFormControl::CreateDefaultObject() { Point aStartPos(GetDefaultCenterPos()); Point aEndPos(aStartPos); -aStartPos.AdjustX( -(2 * MM50) ); -aStartPos.AdjustY( -(MM50) ); -aEndPos.AdjustX(2 * MM50 ); -aEndPos.AdjustY(MM50 ); +aStartPos.AdjustX(-(2 * MM50)); +aStartPos.AdjustY(-MM50); +aEndPos.AdjustX(2 * MM50); +aEndPos.AdjustY(MM50); if(!m_pSh->HasDrawView()) m_pSh->MakeDrawView(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx sw/inc
include/svx/strings.hrc |2 +- sw/inc/AccessibilityCheckStrings.hrc |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 750e3b2118cd5bdfe2ee6fdfb092255b9c6db728 Author: Adolfo Jayme Barrientos AuthorDate: Mon Nov 23 01:01:53 2020 -0600 Commit: Adolfo Jayme Barrientos CommitDate: Mon Nov 23 01:01:53 2020 -0600 Similarly, the proper noun “SmartArt” shouldn’t be pluralized This completes commit ab97fe1b9b988936bf96b198387eaf3ff00fed61. Change-Id: Ie73ee1ee763034cb03a5a6d7acf20f145e34056f diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 1c1f02c9dce4..95e9690b0b9e 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1292,7 +1292,7 @@ #define RID_SVXSTR_DOC_MODIFIED_NO NC_("RID_SVXSTR_DOC_MODIFIED_NO", "The document has not been modified since the last save.") #define RID_SVXSTR_DOC_LOAD NC_("RID_SVXSTR_DOC_LOAD", "Loading document...") #define RID_SVXSTR_FIT_SLIDE NC_("RID_SVXSTR_FIT_SLIDE", "Fit slide to current window.") -#define RID_SVXSTR_WARN_MISSING_SMARTART NC_("RID_SVXSTR_WARN_MISSING_SMARTART", "Could not load all SmartArts. Saving in Microsoft Office 2010 or later would avoid this issue.") +#define RID_SVXSTR_WARN_MISSING_SMARTART NC_("RID_SVXSTR_WARN_MISSING_SMARTART", "Could not load all SmartArt objects. Saving in Microsoft Office 2010 or later would avoid this issue.") #define RID_SVXSTR_ZOOMTOOL_HINT NC_("RID_SVXSTR_ZOOMTOOL_HINT", "Zoom factor. Right-click to change zoom factor or click to open Zoom dialog.") #define RID_SVXSTR_ZOOM_IN NC_("RID_SVXSTR_ZOOM_IN", "Zoom In") #define RID_SVXSTR_ZOOM_OUT NC_("RID_SVXSTR_ZOOM_OUT", "Zoom Out") diff --git a/sw/inc/AccessibilityCheckStrings.hrc b/sw/inc/AccessibilityCheckStrings.hrc index 4d5c24f298a3..97e8c2120cad 100644 --- a/sw/inc/AccessibilityCheckStrings.hrc +++ b/sw/inc/AccessibilityCheckStrings.hrc @@ -27,7 +27,7 @@ #define STR_FLOATING_TEXT NC_("STR_FLOATING_TEXT", "Avoid floating text.") #define STR_HEADING_IN_TABLENC_("STR_HEADING_IN_TABLE", "Tables must not contain headings.") #define STR_HEADING_ORDER NC_("STR_HEADING_ORDER", "Keep headings' levels ordered. Heading level %LEVEL_CURRENT% must not go after %LEVEL_PREV%.") -#define STR_FONTWORKS NC_("STR_FONTWORKS", "Avoid Fontwork objects in your documents. Make sure you use it for samples or another meaningless text.") +#define STR_FONTWORKS NC_("STR_FONTWORKS", "Avoid Fontwork objects in your documents. Make sure you use it for samples or other meaningless text.") #define STR_DOCUMENT_DEFAULT_LANGUAGE NC_("STR_DOCUMENT_DEFAULT_LANGUAGE", "Document default language is not set") #define STR_STYLE_NO_LANGUAGE NC_("STR_STYLE_NO_LANGUAGE", "Style '%STYLE_NAME%' has no language set") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx sw/inc
include/svx/svxitems.hrc |2 +- sw/inc/strings.hrc |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 2c0419b021bdb9e67dce2e0e1c29510751392aea Author: Seth Chaiklin AuthorDate: Thu Oct 22 23:12:21 2020 +0200 Commit: Seth Chaiklin CommitDate: Tue Oct 27 14:31:42 2020 +0100 Other part to resolve: tdf#127279 Change Search attribute Change-Id: I8078f14f25844facf2ec6bb4e0888c5c0f78e3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104672 Tested-by: Jenkins Reviewed-by: Seth Chaiklin diff --git a/include/svx/svxitems.hrc b/include/svx/svxitems.hrc index 052c7fbd285c..3ea7f12581ab 100644 --- a/include/svx/svxitems.hrc +++ b/include/svx/svxitems.hrc @@ -66,7 +66,7 @@ const std::pair RID_ATTR_NAMES[] = { NC_("RID_ATTR_NAMES", "Page Style") , SID_ATTR_PARA_MODEL }, { NC_("RID_ATTR_NAMES", "Keep with next paragraph"), SID_ATTR_PARA_KEEP }, { NC_("RID_ATTR_NAMES", "Blinking"), SID_ATTR_FLASH }, -{ NC_("RID_ATTR_NAMES", "Register-true") , SID_ATTR_PARA_REGISTER }, +{ NC_("RID_ATTR_NAMES", "Page line-spacing") , SID_ATTR_PARA_REGISTER }, { NC_("RID_ATTR_NAMES", "Character background"), SID_ATTR_BRUSH_CHAR }, { NC_("RID_ATTR_NAMES", "Asian font") , SID_ATTR_CHAR_CJK_FONT }, { NC_("RID_ATTR_NAMES", "Size of Asian font") , SID_ATTR_CHAR_CJK_FONTHEIGHT }, diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 6de125ea43e0..a1ba8778b14d 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -1102,8 +1102,8 @@ #define STR_LINE_TOPNC_("STR_LINE_TOP", "Top of line") #define STR_LINE_CENTER NC_("STR_LINE_CENTER", "Line centered") #define STR_LINE_BOTTOM NC_("STR_LINE_BOTTOM", "Bottom of line") -#define STR_REGISTER_ON NC_("STR_REGISTER_ON", "Register-true") -#define STR_REGISTER_OFFNC_("STR_REGISTER_OFF", "Not register-true") +#define STR_REGISTER_ON NC_("STR_REGISTER_ON", "Page line-spacing") +#define STR_REGISTER_OFFNC_("STR_REGISTER_OFF", "Not page line-spacing") #define STR_HORI_RIGHT NC_("STR_HORI_RIGHT", "at the right") #define STR_HORI_CENTER NC_("STR_HORI_CENTER", "Centered horizontally") #define STR_HORI_LEFT NC_("STR_HORI_LEFT", "at the left") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx sw/inc sw/qa sw/source
include/svx/svxids.hrc |2 ++ sw/inc/doc.hxx |2 ++ sw/inc/fmtanchr.hxx |1 - sw/inc/fmtautofmt.hxx |1 - sw/inc/fmtcol.hxx |4 ++-- sw/inc/fmtftntx.hxx |2 +- sw/inc/fmtline.hxx |2 +- sw/inc/fmtruby.hxx |1 + sw/inc/format.hxx |2 -- sw/inc/grfatr.hxx |1 - sw/inc/hintids.hxx |2 ++ sw/inc/node.hxx |1 + sw/qa/extras/ooxmlimport/ooxmlimport.cxx|1 + sw/source/core/SwNumberTree/SwNodeNum.cxx |2 ++ sw/source/core/attr/format.cxx |1 + sw/source/core/attr/hints.cxx |1 + sw/source/core/doc/DocumentStylePoolManager.cxx |1 + sw/source/core/doc/docnew.cxx |2 ++ sw/source/core/doc/textboxhelper.cxx|1 + sw/source/filter/html/svxcss1.hxx |1 + sw/source/filter/ww8/docxattributeoutput.cxx|2 ++ sw/source/filter/ww8/docxattributeoutput.hxx|1 + sw/source/filter/ww8/docxsdrexport.cxx |6 ++ sw/source/filter/ww8/rtfattributeoutput.cxx |8 sw/source/filter/ww8/rtfexport.cxx |7 +++ sw/source/filter/xml/xmltbli.cxx|1 + sw/source/ui/chrdlg/swuiccoll.cxx |1 + sw/source/uibase/inc/wrtsh.hxx |1 + sw/source/uibase/misc/redlndlg.cxx |1 + sw/source/uibase/uiview/formatclipboard.cxx |1 + sw/source/uibase/utlui/bookctrl.cxx |1 + 31 files changed, 52 insertions(+), 9 deletions(-) New commits: commit 7bde30fd651c0e6d0a0d6a09e51e549fbbc03d4d Author: Miklos Vajna Date: Tue Feb 20 21:24:25 2018 +0100 Fix some IWYU warnings Change-Id: If1e6727e4b5bb225495e20d5dfb78fa5da770f75 Reviewed-on: https://gerrit.libreoffice.org/50060 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 1d455dcef735..248a37638775 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -51,6 +51,8 @@ class SvxPatternListItem; class SvxDashListItem; class SvxLineEndListItem; class SvxLineItem; +class SvxBoxInfoItem; +class SfxStringItem; // member IDs diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 440127f743fd..eb04a2ab9b3b 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -172,6 +172,8 @@ class IDocumentExternalData; class IDocumentMarkAccess; class SetGetExpFields; struct SwInsertTableOptions; +enum class SvMacroItemId : sal_uInt16; +enum class SvxFrameDirection; namespace sw { namespace mark { class MarkManager; diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx index cfdc600562f7..70e29236bd31 100644 --- a/sw/inc/fmtanchr.hxx +++ b/sw/inc/fmtanchr.hxx @@ -21,7 +21,6 @@ #include "swdllapi.h" #include "hintids.hxx" -#include "swtypes.hxx" #include "format.hxx" #include diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx index cfdbfd9c2004..326ba0983da6 100644 --- a/sw/inc/fmtautofmt.hxx +++ b/sw/inc/fmtautofmt.hxx @@ -20,7 +20,6 @@ #define INCLUDED_SW_INC_FMTAUTOFMT_HXX #include -#include "format.hxx" #include class SwFormatAutoFormat: public SfxPoolItem diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index 48cbedb3d99e..4f960fdcdf21 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -20,14 +20,14 @@ #define INCLUDED_SW_INC_FMTCOL_HXX #include "swdllapi.h" -#include "frmatr.hxx" -#include "swtypes.hxx" +#include "format.hxx" #include #include #include class SwDoc; +class SwAttrPool; namespace sw{ class DocumentStylePoolManager; } class SAL_DLLPUBLIC_RTTI SwFormatColl : public SwFormat diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx index e8c747d7ad4b..52279dbca158 100644 --- a/sw/inc/fmtftntx.hxx +++ b/sw/inc/fmtftntx.hxx @@ -20,9 +20,9 @@ #define INCLUDED_SW_INC_FMTFTNTX_HXX #include +#include #include "hintids.hxx" #include "format.hxx" -#include "numrule.hxx" #include "swdllapi.h" enum SwFootnoteEndPosEnum diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx index 84e4d56e6e35..8bba534cd392 100644 --- a/sw/inc/fmtline.hxx +++ b/sw/inc/fmtline.hxx @@ -21,8 +21,8 @@ #include #include "hintids.hxx" -#include "format.hxx" #include "swdllapi.h" +#include "swatrset.hxx" class IntlWrapper; diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx index db332969b337..9154e7913594 100644 --- a/sw/inc/fmtruby.hxx +++ b/sw/inc/fmtruby.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_SW_INC_FMTRUBY_HXX #define INCLUDED_SW_INC_FMTRUBY_HXX +#include "swdllapi.h" #include #include diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index 19f8fa2aac6d..203a7f286bcf 100644 --
[Libreoffice-commits] core.git: include/svx sw/inc sw/source
include/svx/svxids.hrc |8 +++- sw/inc/editsh.hxx |3 +++ sw/inc/strings.hrc |1 + sw/inc/swundo.hxx |3 ++- sw/source/core/edit/edfcol.cxx | 17 + sw/source/core/undo/undobj.cxx |3 +++ sw/source/uibase/shells/textsh1.cxx | 24 7 files changed, 53 insertions(+), 6 deletions(-) New commits: commit a1b0408ab6655220a8ac3b6fe7f2875da8a365e7 Author: Ashod Nakashian Date: Sun Jul 2 23:34:06 2017 -0400 sw: dummy handler for paragraph signing Change-Id: If6e9f75dcf8c8628295fe013328b3b1630d064a2 Reviewed-on: https://gerrit.libreoffice.org/40319 Tested-by: Jenkins Reviewed-by: Ashod Nakashian diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 4ed5b3ff69e9..09dc209d3e02 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -978,18 +978,16 @@ #define SID_DRAW_MEASURELINE( SID_SVX_START + 1167 ) #define SID_AUTHOR_COLOR( SID_SVX_START + 1168 ) #define SID_BMPMASK_COLOR ( SID_SVX_START + 1169 ) +#define SID_PARA_SIGNATURE_ADD ( SID_SVX_START + 1170 ) // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE ( SID_BMPMASK_COLOR + 1 ) +#define SID_SVX_FIRSTFREE ( SID_PARA_SIGNATURE_ADD + 1 ) // Overflow check for slot IDs - #if SID_SVX_FIRSTFREE > SID_SVX_END -#error Resource-Ueberlauf in #line, #file +#error Resource-overflow in #line, #file #endif #endif -// *** EOF - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 7a0d2d85f2d9..c539007c34c9 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -371,6 +371,9 @@ public: SfxWatermarkItem GetWatermark(); void SetWatermark(const SfxWatermarkItem& rText); +/// Sign the paragraph at the cursor. +static void SignParagraph(SwPaM* pPaM); + void Insert2(SwField&, const bool bForceExpandHints); void UpdateFields( SwField & ); ///< One single field. diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 7d85ccbda0d8..cfa4496e96c6 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -536,6 +536,7 @@ #define STR_DRAWING_OBJECTS NC_("STR_DRAWING_OBJECTS", "drawing object(s)") #define STR_TABLE_NAME NC_("STR_TABLE_NAME", "table: $1$2$3") #define STR_PARAGRAPH_UNDO NC_("STR_PARAGRAPH_UNDO", "paragraph") +#define STR_PARAGRAPH_SIGN_UNDO NC_("STR_PARAGRAPH_SIGN_UNDO", "Paragraph sign") #define STR_UNDO_FLYFRMFMT_TITLE NC_("STR_UNDO_FLYFRMFMT_TITLE", "Change object title of $1") #define STR_UNDO_FLYFRMFMT_DESCRITPTION NC_("STR_UNDO_FLYFRMFMT_DESCRITPTION", "Change object description of $1") #define STR_UNDO_TBLSTYLE_CREATE NC_("STR_UNDO_TBLSTYLE_CREATE", "Create table style: $1") diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx index c7c3f3a9b80f..54fc7225a6b1 100644 --- a/sw/inc/swundo.hxx +++ b/sw/inc/swundo.hxx @@ -153,7 +153,8 @@ enum class SwUndoId TBLSTYLE_CREATE, // 114 TBLSTYLE_DELETE, // 115 TBLSTYLE_UPDATE, // 116 -STD_END = TBLSTYLE_UPDATE, +PARA_SIGN_ADD, // 117 +STD_END = PARA_SIGN_ADD, // UI undo ID's... UI_REPLACE = STD_END + 1, diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index b44cdf43a115..503902599461 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -531,6 +531,23 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark) } } +void SwEditShell::SignParagraph(SwPaM* pPaM) +{ +if (!pPaM) +return; + +const SwPosition* pPosStart = pPaM->Start(); +SwTextNode* pNode = pPosStart->nNode.GetNode().GetTextNode(); +if (pNode) +{ +// Get the text (without fields). +const OUString text = pNode->GetText(); +(void)text; + +//TODO: get signature, add signature field and metadata. +} +} + // #i62675# void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, const bool bResetListAttrs) diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index af558e0d4bd9..37efb8eb318e 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -658,6 +658,9 @@ OUString GetUndoComment(SwUndoId eId) break; case SwUndoId::CONFLICT: break; +case SwUndoId::PARA_SIGN_ADD: +pId = STR_PARAGRAPH_SIGN_UNDO; +break; }; assert(pId); diff --git a/sw/sou
[Libreoffice-commits] core.git: include/svx sw/inc
include/svx/sdgmoitm.hxx | 14 +++--- sw/inc/grfatr.hxx| 11 +-- 2 files changed, 20 insertions(+), 5 deletions(-) New commits: commit 5e3cca7b0ae81e2467fb306c1c707f6f5ba7d284 Author: Stephan Bergmann Date: Fri Mar 17 17:08:11 2017 +0100 More workaround for the MSVC "dllpublic base template" mis-feature (happens at least with a --disable-pch build) Change-Id: Id62b254e7835ab923955f0f6529bafa6825aa103 diff --git a/include/svx/sdgmoitm.hxx b/include/svx/sdgmoitm.hxx index 2ff3c6e0fcc9..2c7f13a2f9cd 100644 --- a/include/svx/sdgmoitm.hxx +++ b/include/svx/sdgmoitm.hxx @@ -25,12 +25,20 @@ #include #include +// MSVC hack: +class SdrGrafModeItem_Base: public SfxEnumItem { +protected: +SdrGrafModeItem_Base(GraphicDrawMode eMode): +SfxEnumItem(SDRATTR_GRAFMODE, eMode) {} -class SVX_DLLPUBLIC SdrGrafModeItem : public SfxEnumItem +SdrGrafModeItem_Base(SvStream& rIn): SfxEnumItem(SDRATTR_GRAFMODE, rIn) {} +}; + +class SVX_DLLPUBLIC SdrGrafModeItem : public SdrGrafModeItem_Base { public: -SdrGrafModeItem( GraphicDrawMode eMode = GraphicDrawMode::Standard ) : SfxEnumItem( SDRATTR_GRAFMODE, eMode ) {} -SdrGrafModeItem( SvStream& rIn ) : SfxEnumItem( SDRATTR_GRAFMODE, rIn ) {} +SdrGrafModeItem( GraphicDrawMode eMode = GraphicDrawMode::Standard ) : SdrGrafModeItem_Base( eMode ) {} +SdrGrafModeItem( SvStream& rIn ) : SdrGrafModeItem_Base( rIn ) {} virtual SfxPoolItem*Clone( SfxItemPool* pPool = nullptr ) const override; virtual SfxPoolItem*Create( SvStream& rIn, sal_uInt16 nVer ) const override; diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index 396c4439d27a..b04b127d85ff 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -259,11 +259,18 @@ public: sal_uInt8 nMemberId ) override; }; -class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem +// MSVC hack: +class SwDrawModeGrf_Base: public SfxEnumItem { +protected: +SwDrawModeGrf_Base(GraphicDrawMode nMode): +SfxEnumItem(RES_GRFATR_DRAWMODE, nMode) {} +}; + +class SW_DLLPUBLIC SwDrawModeGrf : public SwDrawModeGrf_Base { public: SwDrawModeGrf( GraphicDrawMode nMode = GraphicDrawMode::Standard ) -: SfxEnumItem( RES_GRFATR_DRAWMODE, nMode ) +: SwDrawModeGrf_Base( nMode ) {} // pure virtual methods of SfxPoolItem ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits