[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source

2023-10-21 Thread Mike Kaganski (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |6 
 sw/inc/doc.hxx |1 
 sw/source/core/doc/doc.cxx |  128 +++--
 3 files changed, 83 insertions(+), 52 deletions(-)

New commits:
commit 562856a8bca0869a04147fbc05a1eece9193
Author: Mike Kaganski 
AuthorDate: Sat Oct 21 17:42:56 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 21 21:48:34 2023 +0200

Related: tdf#89178 Add an option to avoid converting some fields into text

... during mail merge.

In some modes (generating individual documents; creating PDF) the mail merge
process converts all fields into text. But sometimes it is undesirable for
fields not involved into mail merge itself:

* It is inconsistent with how MS Word behaves;
* The generated editable documents could benefit from having other fields
  kept as fields;
* Some fields, when exported to PDF, produce different results: e.g.,
  placeholder fields are output as empty spaces, not as placeholder text.

An expert boolean configuration option is added:
Office/Writer/FormLetter/ConvertToTextOnlyMMFields; it is false by default,
in which case, the behavior is unchanged. When true, all fields in the mail
merge document, except for database fields and hidden text fields, are not
converted to text during mail merge process.

Change-Id: Ibdb505ed3f2762db063bb0a91b674d27ecbc2e7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158306
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 75a019c63c73..c9da17b65c9e 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -6014,6 +6014,12 @@
   
 
   
+  
+
+  When true, only fields that can be used in mail merge will be 
converted to text; all other fields will be kept as fields in the Mail Merge 
output
+
+false
+  
 
 
   
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index c40abf7a1581..5d1814210801 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1445,6 +1445,7 @@ public:
 // restore the invisible content if it's available on the undo stack
 bool RestoreInvisibleContent();
 
+// Replace fields by text - mailmerge support
 SAL_DLLPRIVATE bool ConvertFieldsToText(SwRootFrame const& rLayout);
 
 // Create sub-documents according to given collection.
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index da14a84674e3..4bcb2a35e856 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -53,6 +53,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -1618,12 +1620,32 @@ bool SwDoc::RestoreInvisibleContent()
 return false;
 }
 
+static bool IsMailMergeField(SwFieldIds fieldId)
+{
+switch (fieldId)
+{
+case SwFieldIds::Database: // Mail merge fields
+case SwFieldIds::DatabaseName: // Database name
+case SwFieldIds::HiddenText: // Hidden text may use database fields in 
condition
+case SwFieldIds::HiddenPara: // Hidden paragraph may use database 
fields in condition
+case SwFieldIds::DbNextSet: // Moving to next mail merge record
+case SwFieldIds::DbNumSet: // Moving to a specific mail merge record
+case SwFieldIds::DbSetNumber: // Number of current mail merge record
+return true;
+default:
+return false;
+}
+}
+
 bool SwDoc::ConvertFieldsToText(SwRootFrame const& rLayout)
 {
 bool bRet = false;
 getIDocumentFieldsAccess().LockExpFields();
 GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_REPLACE, nullptr );
 
+const bool bOnlyConvertDBFields
+= 
officecfg::Office::Writer::FormLetter::ConvertToTextOnlyMMFields::get();
+
 const SwFieldTypes* pMyFieldTypes = 
getIDocumentFieldsAccess().GetFieldTypes();
 const SwFieldTypes::size_type nCount = pMyFieldTypes->size();
 //go backward, field types are removed
@@ -1634,6 +1656,9 @@ bool SwDoc::ConvertFieldsToText(SwRootFrame const& 
rLayout)
 if ( SwFieldIds::Postit == pCurType->Which() )
 continue;
 
+if (bOnlyConvertDBFields && !IsMailMergeField(pCurType->Which()))
+continue;
+
 std::vector vFieldFormats;
 pCurType->GatherFields(vFieldFormats, false);
 for(const auto& rpFieldFormat : vFieldFormats)
@@ -1644,67 +1669,66 @@ bool SwDoc::ConvertFieldsToText(SwRootFrame const& 
rLayout)
 
 bool bSkip = !pTextField ||
  !pTextField->GetpTextNode()->GetNodes().IsDocNodes();
+if (bSkip)
+continue;
 
-if (!bSkip)
+bool bInHeaderFooter = 

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source

2022-11-14 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |   21 +
 sw/inc/shellio.hxx |   11 +-
 sw/source/filter/basflt/shellio.cxx|   11 ++
 3 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit 31c5b3f10b3e1d1d86d9fc3553c6f55599b080ce
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 20 11:03:13 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 14 09:26:52 2022 +0100

tdf#151605 Add option to not include hidden text in ASCII filter

When setting this option, hidden text will not get exported/copied to 
clipboard.

Change-Id: Id31aafc28ffb61a81bdc1412892f9e7997512f58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141551
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 012ca4073fe3..3d8d753f5dfd 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -6497,11 +6497,22 @@
   Contains settings for the HTML filter.
 
 
-
-  Whether hidden text (sections, etc) is included in the 
output.
-
-false
-  
+  
+Whether hidden text (sections, etc) is included in the 
output.
+  
+  false
+
+  
+  
+
+  Contains settings for the ASCII filter.
+
+
+  
+Whether hidden text (sections, etc) is included in the 
output.
+  
+  true
+
   
 
 
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 1a1f45ce46fc..e476b530fd8a 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -84,15 +84,8 @@ public:
 bool GetIncludeHidden() const { return m_bIncludeHidden; }
 void SetIncludeHidden( bool bVal ) { m_bIncludeHidden = bVal; }
 
-void Reset()
-{
-m_sFont.clear();
-m_eCRLF_Flag = GetSystemLineEnd();
-m_eCharSet = ::osl_getThreadTextEncoding();
-m_nLanguage = LANGUAGE_SYSTEM;
-m_bIncludeBOM = true;
-m_bIncludeHidden = true;
-}
+void Reset();
+
 // for the automatic conversion (mail/news/...)
 void ReadUserData( std::u16string_view );
 void WriteUserData( OUString& ) const;
diff --git a/sw/source/filter/basflt/shellio.cxx 
b/sw/source/filter/basflt/shellio.cxx
index 9ffb0f253886..1027ea9c4210 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -76,6 +77,16 @@ static bool sw_MergePortions(SwNode* pNode, void *)
 return true;
 }
 
+void SwAsciiOptions::Reset()
+{
+m_sFont.clear();
+m_eCRLF_Flag = GetSystemLineEnd();
+m_eCharSet = ::osl_getThreadTextEncoding();
+m_nLanguage = LANGUAGE_SYSTEM;
+m_bIncludeBOM = true;
+m_bIncludeHidden = 
officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get();
+}
+
 ErrCode SwReader::Read( const Reader& rOptions )
 {
 // copy variables


[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/uiconfig

2022-01-20 Thread Caolán McNamara (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs|8 
 officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs |8 
 sw/inc/viewopt.hxx|   14 -
 sw/source/core/inc/scriptinfo.hxx |   10 
 sw/source/core/text/itradj.cxx|6 
 sw/source/core/text/porlay.cxx|   10 
 sw/source/core/text/portxt.cxx|4 
 sw/source/core/txtnode/fntcache.cxx   |  128 --
 sw/source/ui/config/optpage.cxx   |3 
 sw/source/uibase/config/cfgitems.cxx  |6 
 sw/source/uibase/config/usrpref.cxx   |   77 ++
 sw/source/uibase/config/viewopt.cxx   |3 
 sw/source/uibase/inc/cfgitems.hxx |3 
 sw/source/uibase/inc/optpage.hxx  |1 
 sw/uiconfig/swriter/ui/viewoptionspage.ui |   46 ---
 15 files changed, 61 insertions(+), 266 deletions(-)

New commits:
commit 4ed26badfd6fd9190cb6e54078b41eb38cb37dca
Author: Caolán McNamara 
AuthorDate: Fri Jan 14 14:19:45 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 20 21:15:25 2022 +0100

use resolution independent positions for writer's screen-rendering

in favor of pushing it down to the text renderers and leave
it to them to optimized as best they can the the rendering
to make it look as well as possible.

the separate ScrArray can then be dropped as a consequence

Change-Id: Ic0849c091a36e1a90453771b1c91b8ff706b679e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128418
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index dd96056b4f67..89c63d849cf7 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1459,14 +1459,6 @@
   
   false
 
-
-  
-  
-Specifies the Glyph Positioning Mode.
-Glyph Positioning Mode
-  
-  2
-
   
   
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs 
b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
index b4fdab4b8890..8d633caae4f0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
@@ -340,14 +340,6 @@
   
   false
 
-
-  
-  
-Specifies the Glyph Positioning Mode.
-Glyph Positioning Mode
-  
-  2
-
   
   
 
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index a6ac48b31581..e8a1c299b496 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -126,12 +126,6 @@ namespace o3tl {
 template<> struct typed_flags : is_typed_flags {};
 }
 
-enum class GlyphPositioningMode {
-Classic,
-Layout,
-LayoutAndMatchRender
-};
-
 class SW_DLLPUBLIC SwViewOption
 {
 static Colors_aDocColor;  // color of document boundaries
@@ -169,7 +163,6 @@ class SW_DLLPUBLIC SwViewOption
 sal_uInt8   m_nPagePreviewRow;   // Page Preview Row/Columns.
 sal_uInt8   m_nPagePreviewCol;   // Page Preview Row/Columns.
 SwFillMode  m_nShadowCursorFillMode;  // FillMode for ShadowCursor.
-GlyphPositioningMode m_eGlyphPositioningMode; // Positioning strategy for 
screen glyphs
 boolm_bReadonly : 1;  // Readonly-Doc.
 boolm_bStarOneSetting : 1;// Prevent from UI automatics (no 
scrollbars in readonly documents).
 boolm_bIsPagePreview : 1; // The preview mustn't print 
field/footnote/... shadings.
@@ -433,12 +426,6 @@ public:
 void SetPrinting(bool b)
 { SetCore2Option(b, ViewOptCoreFlags2::Printing); }
 
-GlyphPositioningMode GetGlyphPositioningMode() const
-{ return m_eGlyphPositioningMode; }
-
-void SetGlyphPositioningMode(GlyphPositioningMode eMode)
-{ m_eGlyphPositioningMode = eMode; }
-
 void SetCore2Option(bool b, ViewOptCoreFlags2 f)
 {
 if (b)
@@ -710,7 +697,6 @@ inline void SwViewOption::SetUIOptions( const SwViewOption& 
rVOpt )
 m_nUIOptions = rVOpt.m_nUIOptions;
 m_nTableDestination = rVOpt.m_nTableDestination;
 m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode;
-m_eGlyphPositioningMode = rVOpt.m_eGlyphPositioningMode;
 }
 
 // Helper function for checking HTML-capabilities.
diff --git a/sw/source/core/inc/scriptinfo.hxx 
b/sw/source/core/inc/scriptinfo.hxx
index cd479034ed06..cfe9ef3e55fb 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ 

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/uiconfig

2021-12-22 Thread Caolán McNamara (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs|8 
 officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs |8 
 sw/inc/viewopt.hxx|   15 +
 sw/source/core/txtnode/fntcache.cxx   |  113 +++---
 sw/source/ui/config/optpage.cxx   |3 
 sw/source/uibase/config/cfgitems.cxx  |6 
 sw/source/uibase/config/usrpref.cxx   |   71 +++---
 sw/source/uibase/config/viewopt.cxx   |3 
 sw/source/uibase/inc/cfgitems.hxx |3 
 sw/source/uibase/inc/optpage.hxx  |1 
 sw/uiconfig/swriter/ui/viewoptionspage.ui |   70 --
 11 files changed, 211 insertions(+), 90 deletions(-)

New commits:
commit 39a57fa8c047227060915534e64c4e90affa4b1a
Author: Caolán McNamara 
AuthorDate: Tue Dec 21 14:15:59 2021 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 22 10:12:01 2021 +0100

tdf#144862 explore alternatives to writer's on-screen glyph positioning

writer does glyph position adjusting to try and split the difference of
the "printing" positions and "screen" positions.

it seems to have been there from the initial import

commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62
Date:   Mon Sep 18 23:08:29 2000 +

initial import

we seem to sync with the printing positions after each whitespace so
each initial glyph after whitespace is a stable position and is the
'printing' position while each following glyph is in a position which is
somewhere between the 'printing' position and 'screen' position. Which
leads to noticeably unstable positions of text during editing at various
zoom levels and without a clear rationale for the heuristic.

GlyphPositioningMode::Classic, the original mode which remains the
default.

GlyphPositioningMode::PreferLayout, takes the vcl provided print
positions and just uses those unmodified for screen layout like editeng
does.

GlyphPositioningMode::ClassicInspired, which is similar to
GlyphPositioningMode::Classic in using 'printing' positions for the
start of runs, but using 'screen' positions for run content.

GlyphPositioningMode::PreferReadability, replace the 'printing'
positions with the screen-optimized positions for all content.

use tools, options, writer, view, glyph positioning to change

Change-Id: I6677af973268bc586d825c7fbf0b483aaf651ca0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127089
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 1fe57e99cd72..af944c23c03f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1459,6 +1459,14 @@
   
   false
 
+
+  
+  
+Specifies the Glyph Positioning Mode.
+Glyph Positioning Mode
+  
+  0
+
   
   
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs 
b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
index 8d633caae4f0..12ffb09a2755 100644
--- a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
@@ -340,6 +340,14 @@
   
   false
 
+
+  
+  
+Specifies the Glyph Positioning Mode.
+Glyph Positioning Mode
+  
+  0
+
   
   
 
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index e8a1c299b496..6c93602a85ae 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -126,6 +126,13 @@ namespace o3tl {
 template<> struct typed_flags : is_typed_flags {};
 }
 
+enum class GlyphPositioningMode {
+Classic,
+ClassicInspired,
+PreferLayout,
+PreferReadability
+};
+
 class SW_DLLPUBLIC SwViewOption
 {
 static Colors_aDocColor;  // color of document boundaries
@@ -163,6 +170,7 @@ class SW_DLLPUBLIC SwViewOption
 sal_uInt8   m_nPagePreviewRow;   // Page Preview Row/Columns.
 sal_uInt8   m_nPagePreviewCol;   // Page Preview Row/Columns.
 SwFillMode  m_nShadowCursorFillMode;  // FillMode for ShadowCursor.
+GlyphPositioningMode m_eGlyphPositioningMode; // Positioning strategy for 
screen glyphs
 boolm_bReadonly : 1;  // Readonly-Doc.
 boolm_bStarOneSetting : 1;// Prevent from UI automatics (no 
scrollbars in readonly documents).
 boolm_bIsPagePreview : 1; // The preview mustn't print 
field/footnote/... shadings.
@@ -426,6 +434,12 @@ 

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/uiconfig

2020-12-08 Thread Heiko Tietze (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |   25 
 sw/inc/viewopt.hxx |   10 
 sw/source/ui/config/optpage.cxx|3 
 sw/source/uibase/config/cfgitems.cxx   |8 
 sw/source/uibase/config/usrpref.cxx|   22 
 sw/source/uibase/config/viewopt.cxx|   23 
 sw/source/uibase/frmdlg/frmmgr.cxx |3 
 sw/source/uibase/inc/cfgitems.hxx  |1 
 sw/source/uibase/inc/optpage.hxx   |2 
 sw/uiconfig/swriter/ui/optformataidspage.ui|  517 +++--
 10 files changed, 394 insertions(+), 220 deletions(-)

New commits:
commit c220d97e22001db116f6f8204922b25a9e61e26f
Author: Heiko Tietze 
AuthorDate: Tue Dec 1 12:21:10 2020 +0100
Commit: Heiko Tietze 
CommitDate: Wed Dec 9 08:50:45 2020 +0100

Resolves tdf#99646 - Make default type of anchoring optional

Option introduced at Tools > Options > Writer > Formatting Aids

Change-Id: I8d890f84107647821c39669114b991c301727788
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106970
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 069b68aac076..84125017318f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1087,6 +1087,31 @@
   
   false
 
+
+  
+  
+Specifies the anchor of newly inserted images.
+Default Anchor
+  
+  
+
+  
+FLY_TO_PARA
+  
+
+
+  
+FLY_TO_CHAR
+  
+
+
+  
+FLY_AS_CHAR
+  
+
+  
+  1
+
   
   
 
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 21916ddb56bd..ebfab960d226 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include "swdllapi.h"
 
@@ -172,6 +173,7 @@ class SW_DLLPUBLIC SwViewOption
 boolmbHideWhitespaceMode : 1; // Hide header, footer, and 
pagebreak.
 boolm_bShowPlaceHolderFields : 1; // Only used in printing!
 mutable boolm_bIdle;
+sal_Int32   m_nDefaultAnchor; // GetDefaultAnchorType() to convert 
int to RndStdIds
 
 // Scale
 sal_uInt16  m_nZoom;  // In percent.
@@ -663,6 +665,14 @@ public:
 static void SetDocBoundaries(bool bSet)   
{SetAppearanceFlag(ViewOptFlags::DocBoundaries, bSet);}
 
 static void ApplyColorConfigValues(const svtools::ColorConfig& 
rConfig);
+
+// get/set default anchor (0..2); use GetDefaultAnchorType() to convert 
into RndStdIds::FLY_*
+sal_Int32 GetDefaultAnchor() const
+{   return m_nDefaultAnchor; }
+void SetDefaultAnchor( const sal_Int32 aFlag )
+{ m_nDefaultAnchor = aFlag; }
+
+RndStdIds GetDefaultAnchorType();
 };
 
 inline bool SwViewOption::operator==( const SwViewOption  ) const
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 69f873cdf2cd..5820f260886e 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1215,6 +1215,7 @@ 
SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
 , 
m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode"))
 , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe"))
 , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot"))
+, m_xDefaultAnchorType(m_xBuilder->weld_combo_box("cxDefaultAnchor"))
 , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline"))
 {
 const SfxPoolItem* pItem = nullptr;
@@ -1305,6 +1306,7 @@ bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* 
rSet )
 aDisp.m_bCharHiddenText   = m_xCharHiddenCB->get_active();
 aDisp.m_bBookmarks= m_xBookmarkCB->get_active();
 aDisp.m_bManualBreak  = m_xBreakCB->get_active();
+aDisp.m_xDefaultAnchor= m_xDefaultAnchorType->get_active();
 
 bRet |= (!pOldAttr || aDisp != *pOldAttr);
 if(bRet)
@@ -1353,6 +1355,7 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* 
rSet )
 m_xCharHiddenCB->set_active( pDocDisplayAttr->m_bCharHiddenText );
 m_xBookmarkCB->set_active(pDocDisplayAttr->m_bBookmarks);
 m_xBreakCB->set_active( pDocDisplayAttr->m_bManualBreak );
+m_xDefaultAnchorType->set_active( pDocDisplayAttr->m_xDefaultAnchor );
 }
 }
 
diff --git a/sw/source/uibase/config/cfgitems.cxx 
b/sw/source/uibase/config/cfgitems.cxx
index 

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/uiconfig

2020-05-26 Thread Gülşah Köse (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |   18 +++
 sw/inc/dbmgr.hxx   |4 
 sw/inc/modcfg.hxx  |   13 ++
 sw/inc/swabstdlg.hxx   |2 
 sw/source/ui/dialog/swdlgfact.cxx  |   10 +
 sw/source/ui/dialog/swdlgfact.hxx  |2 
 sw/source/ui/envelp/mailmrge.cxx   |   73 -
 sw/source/uibase/config/modcfg.cxx |7 +
 sw/source/uibase/dbui/dbmgr.cxx|   53 -
 sw/source/uibase/inc/mailmrge.hxx  |6 +
 sw/uiconfig/swriter/ui/mailmerge.ui|   65 +--
 11 files changed, 235 insertions(+), 18 deletions(-)

New commits:
commit 983db96a17630be906b868d2be811663f0d846f6
Author: Gülşah Köse 
AuthorDate: Fri May 22 11:51:33 2020 +0300
Commit: Gülşah Köse 
CommitDate: Tue May 26 09:42:22 2020 +0200

Add an option to create encyrpted PDF files with mailmerge.

With that option user can create encyrpted pdf files with
a password column in database via mailmerge.

Change-Id: I081ef050bc269b1fec24fd01ecc812acd7b857ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94709
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 1ac8ccb12d67..d049dea5b46e 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -6201,6 +6201,24 @@
 
   
 
+
+  
+Specifies how the file password is built.
+  
+  
+
+
+  Determines if the file password is generated from a 
database field.
+
+false
+  
+  
+
+  Specifies the column name to be used as file 
password.
+
+
+  
+
   
 
 
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 20a43235bdb0..26c7fee7432c 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -202,6 +202,10 @@ struct SwMergeDescriptor
  */
 OUStringsDBcolumn;
 
+/** DB column to fetch password
+ */
+OUStringsDBPasswordColumn;
+
 /** @} */
 
 /**
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 7020bd431bb7..218e58679362 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -182,9 +182,11 @@ class SAL_DLLPUBLIC_RTTI SwMiscConfig final : public 
utl::ConfigItem
 boolm_bNumAlignSize;  // Numbering/Graphic/KeepRatio
 boolm_bSinglePrintJob;// 
FormLetter/PrintOutput/SinglePrintJobs
 boolm_bIsNameFromColumn;  // 
FormLetter/FileOutput/FileName/Generation
+boolm_bIsPasswordFromColumn;  // 
FormLetter/FileOutput/FilePassword/Generation
 boolm_bAskForMailMergeInPrint;// Ask if documents containing 
fields should be 'mailmerged'
 MailTextFormats m_nMailingFormats;// 
FormLetter/MailingOutput/Formats
 OUStringm_sNameFromColumn;// 
FormLetter/FileOutput/FileName/FromDatabaseField (string!)
+OUStringm_sPasswordFromColumn;// 
FormLetter/FileOutput/FilePassword/FromDatabaseField (string!)
 OUStringm_sMailingPath;   // FormLetter/FileOutput/Path
 OUStringm_sMailName;  // 
FormLetter/FileOutput/FileName/FromManualSetting (string!)
 
@@ -339,6 +341,17 @@ public:
 voidSetNameFromColumn( const OUString& rSet )   { 
m_aMiscConfig.m_sNameFromColumn = rSet;
   
m_aMiscConfig.SetModified();}
 
+boolIsFileEncyrptedFromColumn() const{ return 
m_aMiscConfig.m_bIsPasswordFromColumn;}
+voidSetIsFileEncyrptedFromColumn( bool bSet )
+{
+m_aMiscConfig.SetModified();
+m_aMiscConfig.m_bIsPasswordFromColumn = bSet;
+}
+
+const OUString& GetPasswordFromColumn() const   { return 
m_aMiscConfig.m_sPasswordFromColumn; }
+voidSetPasswordFromColumn( const OUString& rSet )   { 
m_aMiscConfig.m_sPasswordFromColumn = rSet;
+  
m_aMiscConfig.SetModified();}
+
 const OUString& GetMailingPath() const  { return 
m_aMiscConfig.m_sMailingPath; }
 voidSetMailingPath(const OUString& sPath) { 
m_aMiscConfig.m_sMailingPath = sPath;
 
m_aMiscConfig.SetModified();}

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/util

2020-01-14 Thread Caolán McNamara (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu |   11 ++
 sw/inc/PageMarginPopup.hxx  |   19 +++--
 sw/source/uibase/app/swmodule.cxx   |1 
 sw/source/uibase/sidebar/PageMarginControl.cxx  |7 +
 sw/source/uibase/sidebar/PageMarginControl.hxx  |8 +-
 sw/source/uibase/sidebar/PageMarginPopup.cxx|   38 
+++---
 sw/util/sw.component|4 +
 7 files changed, 65 insertions(+), 23 deletions(-)

New commits:
commit 776797b6a46fa545a661cc81f51a2be555ecd7fe
Author: Caolán McNamara 
AuthorDate: Tue Jan 14 15:56:36 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 14 21:25:50 2020 +0100

rework PageMarginPopup to be a PopupWindowController

Change-Id: I60a66b9be14f79cd2968f4bd3d91740137ee9d85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86782
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 228fff941557..e2b1a8c9382d 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -1206,6 +1206,17 @@
   lo.writer.PageColumnToolBoxControl
 
   
+  
+
+  .uno:PageMargin
+
+
+  
+
+
+  lo.writer.PageMarginToolBoxControl
+
+  
   
 
   .uno:FindText
diff --git a/sw/inc/PageMarginPopup.hxx b/sw/inc/PageMarginPopup.hxx
index d06dc3364069..3a31544b74a1 100644
--- a/sw/inc/PageMarginPopup.hxx
+++ b/sw/inc/PageMarginPopup.hxx
@@ -19,21 +19,26 @@
 #ifndef INCLUDED_SW_INC_PAGEMARGINPOPUP_HXX
 #define INCLUDED_SW_INC_PAGEMARGINPOPUP_HXX
 
-#include 
+#include 
 #include "swdllapi.h"
 
-class PageMarginPopup final : public SfxToolBoxControl
+class PageMarginPopup final : public svt::PopupWindowController
 {
 public:
-SFX_DECL_TOOLBOX_CONTROL();
-
-PageMarginPopup(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
+PageMarginPopup(const css::uno::Reference& 
rContext);
 virtual ~PageMarginPopup() override;
 
-virtual VclPtr CreatePopupWindow() override;
+using svt::ToolboxController::createPopupWindow;
+virtual VclPtr createPopupWindow( vcl::Window* pParent ) 
override;
+
+// XServiceInfo
+virtual OUString SAL_CALL getImplementationName() override;
+virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
+
+// XInitialization
+virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any 
>& rArguments ) override;
 };
 
 #endif
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/swmodule.cxx 
b/sw/source/uibase/app/swmodule.cxx
index 9355dcb3f0ec..88a0a53fdf39 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -279,7 +279,6 @@ void SwDLL::RegisterControls()
 svx::ParaLeftSpacingControl::RegisterControl(SID_ATTR_PARA_LEFTSPACE, 
pMod);
 svx::ParaRightSpacingControl::RegisterControl(SID_ATTR_PARA_RIGHTSPACE, 
pMod);
 
svx::ParaFirstLineSpacingControl::RegisterControl(SID_ATTR_PARA_FIRSTLINESPACE, 
pMod);
-PageMarginPopup::RegisterControl(SID_ATTR_PAGE_MARGIN, pMod);
 PageOrientationPopup::RegisterControl(SID_ATTR_PAGE_ORIENTATION, pMod);
 
 SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx 
b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 69aa012d7340..587f0262ff13 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -37,6 +37,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -93,8 +94,8 @@ namespace
 
 namespace sw { namespace sidebar {
 
-PageMarginControl::PageMarginControl( sal_uInt16 nId, vcl::Window* pParent )
-: SfxPopupWindow( nId, pParent, "PageMarginControl", 
"modules/swriter/ui/pagemargincontrol.ui" )
+PageMarginControl::PageMarginControl(PageMarginPopup* pControl, vcl::Window* 
pParent)
+: ToolbarPopup(pControl->getFrameInterface(), pParent, 
"PageMarginControl", "modules/swriter/ui/pagemargincontrol.ui")
 , m_nPageLeftMargin(0)
 , m_nPageRightMargin(0)
 , m_nPageTopMargin(0)
@@ -255,7 +256,7 @@ void PageMarginControl::dispose()
 m_pWidthHeightField.disposeAndClear();
 m_pContainer.disposeAndClear();
 
-SfxPopupWindow::dispose();
+ToolbarPopup::dispose();
 }
 
 void PageMarginControl::SetMetricFieldMaxValues( const Size& rPageSize )
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx 
b/sw/source/uibase/sidebar/PageMarginControl.hxx
index fe54b4ecf7dd..77f4cdb01593 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ 

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/util

2020-01-14 Thread Caolán McNamara (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu |   11 ++
 sw/inc/PageColumnPopup.hxx  |   18 +++-
 sw/source/uibase/app/swmodule.cxx   |1 
 sw/source/uibase/sidebar/PageColumnControl.cxx  |7 +
 sw/source/uibase/sidebar/PageColumnControl.hxx  |8 +-
 sw/source/uibase/sidebar/PageColumnPopup.cxx|   38 
+++---
 sw/util/sw.component|4 +
 7 files changed, 65 insertions(+), 22 deletions(-)

New commits:
commit 85307c10d3ca4d7c9ed3fa1ca3700a6330b09da8
Author: Caolán McNamara 
AuthorDate: Tue Jan 14 11:30:55 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 14 14:34:46 2020 +0100

rework PageColumnPopup to be a PopupWindowController

Change-Id: I00d0ce6001f2eb3076c699bca7c64a72b94716c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86751
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index f01223dc1d6a..4505585ab748 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -1173,6 +1173,17 @@
   lo.writer.PageSizeToolBoxControl
 
   
+  
+
+  .uno:PageColumnType
+
+
+  
+
+
+  lo.writer.PageColumnToolBoxControl
+
+  
   
 
   .uno:FindText
diff --git a/sw/inc/PageColumnPopup.hxx b/sw/inc/PageColumnPopup.hxx
index b0df45df4a96..a16b2893c807 100644
--- a/sw/inc/PageColumnPopup.hxx
+++ b/sw/inc/PageColumnPopup.hxx
@@ -19,18 +19,24 @@
 #ifndef INCLUDED_SW_INC_PAGECOLUMNPOPUP_HXX
 #define INCLUDED_SW_INC_PAGECOLUMNPOPUP_HXX
 
-#include 
+#include 
 #include "swdllapi.h"
 
-class PageColumnPopup final : public SfxToolBoxControl
+class PageColumnPopup final : public svt::PopupWindowController
 {
 public:
-SFX_DECL_TOOLBOX_CONTROL();
-
-PageColumnPopup(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
+PageColumnPopup(const css::uno::Reference& 
rContext);
 virtual ~PageColumnPopup() override;
 
-virtual VclPtr CreatePopupWindow() override;
+using svt::ToolboxController::createPopupWindow;
+virtual VclPtr createPopupWindow( vcl::Window* pParent ) 
override;
+
+// XServiceInfo
+virtual OUString SAL_CALL getImplementationName() override;
+virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
+
+// XInitialization
+virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any 
>& rArguments ) override;
 };
 
 #endif
diff --git a/sw/source/uibase/app/swmodule.cxx 
b/sw/source/uibase/app/swmodule.cxx
index 613dda8d345f..508dd07fdc8a 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -281,7 +281,6 @@ void SwDLL::RegisterControls()
 
svx::ParaFirstLineSpacingControl::RegisterControl(SID_ATTR_PARA_FIRSTLINESPACE, 
pMod);
 PageMarginPopup::RegisterControl(SID_ATTR_PAGE_MARGIN, pMod);
 PageOrientationPopup::RegisterControl(SID_ATTR_PAGE_ORIENTATION, pMod);
-PageColumnPopup::RegisterControl(SID_ATTR_PAGE_COLUMN, pMod);
 
 SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
 SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod );
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx 
b/sw/source/uibase/sidebar/PageColumnControl.cxx
index 6532472e5a9e..a7ee125ce33d 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include "PageColumnControl.hxx"
+#include 
 
 #include 
 
@@ -30,8 +31,8 @@
 
 namespace sw { namespace sidebar {
 
-PageColumnControl::PageColumnControl( sal_uInt16 nId, vcl::Window* pParent )
-: SfxPopupWindow( nId, pParent, "PageColumnControl", 
"modules/swriter/ui/pagecolumncontrol.ui" )
+PageColumnControl::PageColumnControl(PageColumnPopup* pControl, vcl::Window* 
pParent)
+: ToolbarPopup(pControl->getFrameInterface(), pParent, 
"PageColumnControl", "modules/swriter/ui/pagecolumncontrol.ui" )
 {
 get( m_pMoreButton, "moreoptions" );
 
@@ -89,7 +90,7 @@ void PageColumnControl::dispose()
 m_pLeft.disposeAndClear();
 m_pRight.disposeAndClear();
 m_pMoreButton.disposeAndClear();
-SfxPopupWindow::dispose();
+ToolbarPopup::dispose();
 }
 
 void PageColumnControl::ExecuteColumnChange( const sal_uInt16 nColumnType )
diff --git a/sw/source/uibase/sidebar/PageColumnControl.hxx 
b/sw/source/uibase/sidebar/PageColumnControl.hxx
index 974d0632ab6f..a5a6ec3ef95b 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.hxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.hxx
@@ -19,15 +19,17 @@
 #ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGECOLUMNCONTROL_HXX
 #define 

[Libreoffice-commits] core.git: officecfg/registry sw/inc sw/source sw/uiconfig

2018-01-22 Thread heiko tietze
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |8 +++
 sw/inc/IDocumentRedlineAccess.hxx  |3 +
 sw/inc/modcfg.hxx  |   21 ++
 sw/source/core/crsr/crstrvl.cxx|5 ++
 sw/source/core/doc/DocumentRedlineManager.cxx  |   10 
 sw/source/core/edit/edredln.cxx|   11 -
 sw/source/core/inc/DocumentRedlineManager.hxx  |4 +
 sw/source/ui/config/optpage.cxx|   13 +-
 sw/source/uibase/config/modcfg.cxx |   27 ++---
 sw/source/uibase/inc/optpage.hxx   |2 
 sw/uiconfig/swriter/ui/optredlinepage.ui   |   16 +++
 11 files changed, 96 insertions(+), 24 deletions(-)

New commits:
commit 86e3f95cff4d3dad48d64e50e0c4b05034fa7064
Author: heiko tietze 
Date:   Fri Dec 22 13:00:31 2017 +0100

tdf#114523 Make inline tooltips for changes optional

Tooltips on tracked changes are not shown when Show track changes
is switched off; additional property introduced at Tools > Option >
Writer > Changes to disable the inline tooltip completely

Change-Id: I5b54895bb22d167a383b06627c69326c3c2f5b02
Reviewed-on: https://gerrit.libreoffice.org/46971
Reviewed-by: Mike Kaganski 
Tested-by: Heiko Tietze 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 7a21b5bbd344..2b6465cdee93 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -2650,6 +2650,14 @@
   0
 
   
+  
+
+
+  Specifies whether tooltips for track changes are shown in the 
document.
+  Show _tooltips on changes
+
+true
+  
 
 
   
diff --git a/sw/inc/IDocumentRedlineAccess.hxx 
b/sw/inc/IDocumentRedlineAccess.hxx
index de115fac77e0..7ff58d456ca4 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -239,6 +239,9 @@ public:
 virtual void SetRedlinePassword(
 /*[in]*/const css::uno::Sequence & rNewPassword) = 0;
 
+virtual bool IsHideInlineTooltips() = 0;
+virtual void SetHideInlineTooltips(bool bSet) = 0;
+
 protected:
  virtual ~IDocumentRedlineAccess() {};
 };
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 2091957eedf4..bd9fa3b25c70 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -65,14 +65,15 @@ class SwRevisionConfig : public utl::ConfigItem
 {
 friend class SwModuleOptions;
 
-AuthorCharAttr  aInsertAttr;//Revision/TextDisplay/Insert/Attribute  
// Redlining: author character attributes
-//Revision/TextDisplay/Insert/Color
-AuthorCharAttr  aDeletedAttr;   //Revision/TextDisplay/Delete/Attribute
-//Revision/TextDisplay/Delete/Color
-AuthorCharAttr  aFormatAttr;
//Revision/TextDisplay/ChangeAttribute/Attribute
-
//Revision/TextDisplay/ChangeAttribute/Color
-sal_uInt16  nMarkAlign; //Revision/LinesChanged/Mark
-Color   aMarkColor; //Revision/LinesChanged/Color
+AuthorCharAttr  aInsertAttr;
//Revision/TextDisplay/Insert/Attribute  // Redlining: author character 
attributes
+//Revision/TextDisplay/Insert/Color
+AuthorCharAttr  aDeletedAttr;   //Revision/TextDisplay/Delete/Attribute
+//Revision/TextDisplay/Delete/Color
+AuthorCharAttr  aFormatAttr;
//Revision/TextDisplay/ChangeAttribute/Attribute
+
//Revision/TextDisplay/ChangeAttribute/Color
+sal_uInt16  nMarkAlign; //Revision/LinesChanged/Mark
+Color   aMarkColor; //Revision/LinesChanged/Color
+boolbShowInlineTooltip; //ShowInlineTooltip
 
 static const css::uno::Sequence& GetPropertyNames();
 
@@ -254,6 +255,10 @@ public:
 voidSetFormatAuthorAttr( AuthorCharAttr const  ) {  
aRevisionConfig.aFormatAttr = rAttr;
   
aRevisionConfig.SetModified();}
 
+boolIsShowInlineTooltip() const { return 
aRevisionConfig.bShowInlineTooltip; }
+voidSetShowInlineTooltip( bool bSet ) {  
aRevisionConfig.bShowInlineTooltip = bSet;
+  
aRevisionConfig.SetModified(); }
+
 sal_uInt16  GetMarkAlignMode()  const   { return 
aRevisionConfig.nMarkAlign; }
 voidSetMarkAlignMode(sal_uInt16 nMode)  { 
aRevisionConfig.nMarkAlign = nMode;