[Libreoffice-commits] core.git: 2 commits - cui/source helpcompiler/source

2023-12-04 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/scriptdlg.cxx   |3 +--
 helpcompiler/source/HelpLinker.cxx |3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit de788d603dd763ed3c69a4e0fea98a571301c0ca
Author: Caolán McNamara 
AuthorDate: Sun Dec 3 19:47:18 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 4 10:47:55 2023 +0100

cid#1546483 COPY_INSTEAD_OF_MOVE

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

diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 2c2e40a8e708..890034317c2a 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -1030,8 +1030,7 @@ void SvxScriptOrgDialog::StoreCurrentSelection()
 aDescription = ";" + aDescription;
 }
 while (bEntry);
-OUString sDesc( aDescription );
-m_lastSelection[ m_sLanguage ] = sDesc;
+m_lastSelection[m_sLanguage] = aDescription;
 }
 
 void SvxScriptOrgDialog::RestorePreviousSelection()
commit 7f713779949a2d971da3f1c327429cdd3cbe2a95
Author: Caolán McNamara 
AuthorDate: Sun Dec 3 19:46:33 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 4 10:47:42 2023 +0100

cid#1546485 COPY_INSTEAD_OF_MOVE

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

diff --git a/helpcompiler/source/HelpLinker.cxx 
b/helpcompiler/source/HelpLinker.cxx
index 898a8b26392a..f585a4d33d6a 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -826,8 +826,7 @@ static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER 
void *, xmlErrorPtr
 if( error->file != nullptr )
 aXMLParsingFile = error->file;
 int nXMLParsingLine = error->line;
-HelpProcessingException* pException = new HelpProcessingException( 
aErrorMsg, aXMLParsingFile, nXMLParsingLine );
-GpXMLParsingException = pException;
+GpXMLParsingException = new HelpProcessingException( aErrorMsg, 
aXMLParsingFile, nXMLParsingLine );
 
 // Reset error handler
 xmlSetStructuredErrorFunc( nullptr, nullptr );


[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2023-10-27 Thread Balazs Varga (via logerrit)
 cui/source/options/optjava.cxx |8 
 cui/source/options/optjava.hxx |2 
 cui/source/options/optupdt.cxx |9 +
 cui/source/options/optupdt.hxx |4 
 cui/uiconfig/ui/optadvancedpage.ui |  208 +--
 cui/uiconfig/ui/optonlineupdatepage.ui |  287 -
 6 files changed, 316 insertions(+), 202 deletions(-)

New commits:
commit 860b98657ccc54210575db6b6f81de1db05512c8
Author: Balazs Varga 
AuthorDate: Thu Oct 26 11:56:58 2023 +0200
Commit: Balazs Varga 
CommitDate: Fri Oct 27 08:52:05 2023 +0200

tdf#157853 - UI: Part 11 - Unify lockdown behavior of Options dialog

for Advanced Page.

Change-Id: I3ef33e98cd5a39313f51eb90682f20cdc172f042
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158496
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index a35a6cb42130..6c6d3d07cdc3 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -77,7 +77,9 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* 
pPage, weld::DialogContr
 , m_xClassPathBtn(m_xBuilder->weld_button("classpath"))
 , m_xExpertConfigBtn(m_xBuilder->weld_button("expertconfig"))
 , m_xExperimentalCB(m_xBuilder->weld_check_button("experimental"))
+, m_xExperimentalImg(m_xBuilder->weld_widget("lockexperimental"))
 , m_xMacroCB(m_xBuilder->weld_check_button("macrorecording"))
+, m_xMacroImg(m_xBuilder->weld_widget("lockmacrorecording"))
 , m_xAddDialogText(m_xBuilder->weld_label("selectruntime"))
 , m_xJavaFrame(m_xBuilder->weld_widget("javaframe"))
 {
@@ -109,10 +111,16 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* 
pPage, weld::DialogContr
 m_xExpertConfigBtn->set_sensitive(false);
 
 if (officecfg::Office::Common::Misc::MacroRecorderMode::isReadOnly())
+{
 m_xMacroCB->set_sensitive(false);
+m_xMacroImg->set_visible(true);
+}
 
 if (officecfg::Office::Common::Misc::ExperimentalMode::isReadOnly())
+{
 m_xExperimentalCB->set_sensitive(false);
+m_xExperimentalImg->set_visible(true);
+}
 
 xDialogListener->SetDialogClosedLink( LINK( this, SvxJavaOptionsPage, 
DialogClosedHdl ) );
 
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 080c5bcb748b..84422c903056 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -75,7 +75,9 @@ private:
 std::unique_ptr m_xPathDlg;
 
 std::unique_ptr m_xExperimentalCB;
+std::unique_ptr m_xExperimentalImg;
 std::unique_ptr m_xMacroCB;
+std::unique_ptr m_xMacroImg;
 
 std::unique_ptr m_xAddDialogText;
 
diff --git a/cui/uiconfig/ui/optadvancedpage.ui 
b/cui/uiconfig/ui/optadvancedpage.ui
index bbc6062a832c..7e0449861bab 100644
--- a/cui/uiconfig/ui/optadvancedpage.ui
+++ b/cui/uiconfig/ui/optadvancedpage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -26,39 +26,39 @@
   
   
 True
-False
+False
 True
 True
-6
+6
 vertical
 18
 
   
 True
-False
+False
 True
 True
-0
-none
+0
+none
 
   
 True
-False
+False
+12
+6
 True
 True
 vertical
 6
-12
-6
 
   
 _Use a Java runtime environment
 True
-True
-False
+True
+False
 start
-True
-True
+True
+True
 
   
 Allows you to run 
extensions written with Java.
@@ -72,52 +72,52 @@
   
 
 
-  
+  
   
 True
-False
+False
 start
+12
 True
 True
 vertical
-12
-12
+12
 
   
 True
-False
+False
 start
 _Java runtime environments (JRE) already 
installed:
-True
-javas
+True
+javas
   
   
-0
-0
+0
+0
   
 
 
-  
+  
   
 True
-False
+False
 True
 True
-12
+12

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2023-10-26 Thread Balazs Varga (via logerrit)
 cui/source/options/optopencl.cxx   |3 
 cui/source/options/optopencl.hxx   |1 
 cui/source/options/personalization.cxx |   12 +
 cui/source/options/personalization.hxx |2 
 cui/uiconfig/ui/optopenclpage.ui   |   70 +++
 cui/uiconfig/ui/personalization_tab.ui |  206 +++--
 6 files changed, 189 insertions(+), 105 deletions(-)

New commits:
commit ee368cc3f97886b9574e22fdf8a15c8225e785d5
Author: Balazs Varga 
AuthorDate: Wed Oct 25 14:07:56 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 26 09:22:53 2023 +0200

tdf#157843 - UI: Part 8 - Unify lockdown behavior of Options dialog

for OpenCL Page.

Change-Id: I94c4a1afc7703de378ae65c0173d178954f647a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158424
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index c3e154083c97..129cbc1b01b7 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -30,11 +30,13 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(weld::Container* pPage, 
weld::DialogControlle
 : SfxTabPage(pPage, pController, "cui/ui/optopenclpage.ui", 
"OptOpenCLPage", )
 , maConfig(OpenCLConfig::get())
 , mxUseOpenCL(m_xBuilder->weld_check_button("useopencl"))
+, mxUseOpenImg(m_xBuilder->weld_widget("lockuseopencl"))
 , mxOclUsed(m_xBuilder->weld_label("openclused"))
 , mxOclNotUsed(m_xBuilder->weld_label("openclnotused"))
 {
 mxUseOpenCL->set_active(maConfig.mbUseOpenCL);
 
mxUseOpenCL->set_sensitive(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly());
+
mxUseOpenImg->set_visible(officecfg::Office::Common::Misc::UseOpenCL::isReadOnly());
 
 bool bCLUsed = openclwrapper::GPUEnv::isOpenCLEnabled();
 mxOclUsed->set_visible(bCLUsed);
@@ -97,6 +99,7 @@ void SvxOpenCLTabPage::Reset( const SfxItemSet* )
 maConfig = OpenCLConfig::get();
 
 mxUseOpenCL->set_active(maConfig.mbUseOpenCL);
+
mxUseOpenImg->set_visible(officecfg::Office::Common::Misc::UseOpenCL::isReadOnly());
 mxUseOpenCL->save_state();
 }
 
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index 1fce5e3ea9aa..e6414245da8f 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -27,6 +27,7 @@ private:
 OpenCLConfig maConfig;
 
 std::unique_ptr mxUseOpenCL;
+std::unique_ptr mxUseOpenImg;
 std::unique_ptr mxOclUsed;
 std::unique_ptr mxOclNotUsed;
 
diff --git a/cui/uiconfig/ui/optopenclpage.ui b/cui/uiconfig/ui/optopenclpage.ui
index ac5cac268df2..8014e3711e1c 100644
--- a/cui/uiconfig/ui/optopenclpage.ui
+++ b/cui/uiconfig/ui/optopenclpage.ui
@@ -1,32 +1,58 @@
 
-
+
 
   
   
 True
-False
+False
 True
-6
-0
-none
+6
+0
+none
 
   
 True
-False
+False
+12
+6
 True
 True
 vertical
 12
-12
-6
 
-  
-Allow use of OpenCL
+  
+  
 True
-True
-False
-True
-True
+False
+True
+6
+
+  
+Allow use of OpenCL
+True
+True
+False
+True
+True
+  
+  
+1
+0
+  
+
+
+  
+False
+True
+center
+center
+res/lock.png
+  
+  
+0
+0
+  
+
   
   
 False
@@ -35,10 +61,9 @@
   
 
 
-  
-False
-False
-OpenCL is available for use.
+  
+False
+OpenCL is not used.
   
   
 False
@@ -47,10 +72,9 @@
   
 
 
-  
-False
-False
-OpenCL is not used.
+  
+False
+OpenCL is available for use.
   
   
 False
@@ -63,7 +87,7 @@
 
   
 True
-False
+False
 OpenCL Options
 
   
commit 54aa9a9cb7f283d2ed2853e064573564f16e353b
Author: Balazs Varga 
AuthorDate: Wed Oct 25 10:31:47 2023 +0200
Commit: Balazs Varga 
CommitDate: Thu Oct 26 09:22:40 2023 +0200

tdf#157842 - UI: Part 7 - Unify lockdown behavior of Options dialog

for Personalization Page.

Change-Id: I5f2b674b9548610be8f918e6713e6ea91be7442e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158418
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/personalization.cxx 

[Libreoffice-commits] core.git: 2 commits - cui/source sfx2/source

2023-10-16 Thread Mike Kaganski (via logerrit)
 cui/source/tabpages/paragrph.cxx |   14 +-
 sfx2/source/dialog/tabdlg.cxx|3 +--
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit d4efce34e0bd1e99d115ece4442ead39b90b89bb
Author: Mike Kaganski 
AuthorDate: Tue Oct 17 06:09:19 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Oct 17 07:36:59 2023 +0200

tdf#148725: Reset must clear respective items from m_pOutSet

After Reset, the tabbed dialog's output set should restore to the same
state (concerning the current tab page) as immediately after creation.
This state means that pressing OK immediately afer Reset would not try
to set or remove any items in the target. SfxTabDialogController::Ok
has this code:

if (m_pOutSet && m_pOutSet->Count() > 0)
bModified = true;

meaning that m_pOutSet is expected to be empty in case of completely
unmodified dialog; and Reset must make sure this for a given page.

Instead, commit 28fc0962b10519ab84654d189d2ad0cca8f84f95 (weld SwLabDlg,
2018-04-27) made Reset handler to populate the output item set with all
the items from the input set, that belong to the page's which ranges.
This made all the settings set in parents (which therefore appeared in
the input set) to be set directly in the target upon application.

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

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 8f0f41426972..57e266a3f198 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -457,13 +457,12 @@ IMPL_LINK_NOARG(SfxTabDialogController, ResetHdl, 
weld::Button&, void)
 if (SfxItemState::SET == m_pSet->GetItemState(nWh, false, ))
 {
 m_xExampleSet->Put(*pItem);
-m_pOutSet->Put(*pItem);
 }
 else
 {
 m_xExampleSet->ClearItem(nWh);
-m_pOutSet->ClearItem(nWh);
 }
+m_pOutSet->ClearItem(nWh);
 nTmp++;
 }
 }
commit e134bcf0272929ebba8edc35ae0bdd8f934e624a
Author: Mike Kaganski 
AuthorDate: Tue Oct 17 06:00:34 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Oct 17 07:36:52 2023 +0200

Related: tdf#148725 Fix SvxExtParagraphTabPage::ChangesApplied

It was setting values, instead of saving them, ever since commit
a212ef2b6ebadb22a9abf6d042aa2b5fd9ac1cf0 (tdf#93901: apply handling in
style/edit dialog improved, 2015-09-11).

The same thing in SvxStdParagraphTabPage::ChangesApplied was fixed in
commit 8b0dae14a5af0ad2892bac0e606467af6148c8d1 (weld
SvxStdParagraphTabPage, 2018-06-14); but a similar commit
eb1d6b16e787a87c3d918135ca98c5694d352557 (weld SvxExtParagraphTabPage,
2018-06-14) kept this in SvxExtParagraphTabPage.

Change-Id: I5fb61a9416dab4ccf9fa690eca87a16f7b9378bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158066
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 9f5e94833b3b..7c8f2dc225a7 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -2138,15 +2138,11 @@ void SvxExtParagraphTabPage::ChangesApplied()
 m_xHyphenBox->save_state();
 m_xHyphenNoCapsBox->save_state();
 m_xHyphenNoLastWordBox->save_state();
-m_xExtHyphenBeforeBox->set_value(m_xExtHyphenBeforeBox->get_value());
-m_xExtHyphenAfterBox->set_value(m_xExtHyphenAfterBox->get_value());
-m_xMaxHyphenEdit->set_value(m_xMaxHyphenEdit->get_value());
-m_xMinWordLength->set_value(m_xMinWordLength->get_value());
-SfxItemPool* pPool = GetItemSet().GetPool();
-DBG_ASSERT( pPool, "Where is the pool?" );
-FieldUnit eUnit =
-   MapToFieldUnit( pPool->GetMetric( GetWhich( 
SID_ATTR_PARA_HYPHENZONE ) ) );
-m_aHyphenZone.set_value(m_aHyphenZone.get_value(eUnit), eUnit);
+m_xExtHyphenBeforeBox->save_value();
+m_xExtHyphenAfterBox->save_value();
+m_xMaxHyphenEdit->save_value();
+m_xMinWordLength->save_value();
+m_aHyphenZone.save_value();
 m_xPageBreakBox->save_state();
 m_xBreakPositionLB->save_value();
 m_xBreakTypeLB->save_value();


[Libreoffice-commits] core.git: 2 commits - cui/source sw/source

2023-10-12 Thread Caolán McNamara (via logerrit)
 cui/source/inc/QrCodeGenDialog.hxx |2 ++
 sw/source/core/inc/txtfly.hxx  |8 
 sw/source/core/text/frmform.cxx|2 +-
 sw/source/core/text/itrform2.cxx   |2 +-
 sw/source/core/text/txtfly.cxx |   10 +-
 5 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 08de15d3e5700b780266a1e0d7327d15412e48ce
Author: Caolán McNamara 
AuthorDate: Wed Oct 11 11:19:31 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu Oct 12 10:16:11 2023 +0200

SwTextFly::GetAnchoredObjList never returns null

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

diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index e363934a8ba1..9047e127e7d8 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -156,7 +156,7 @@ class SwTextFly
 SwAnchoredObjList& InitAnchoredObjList();
 
 public:
-SwAnchoredObjList* GetAnchoredObjList() const;
+SwAnchoredObjList& GetAnchoredObjList() const;
 private:
 
 /**
@@ -311,11 +311,11 @@ public:
 SwRect GetFrameArea() const;
 };
 
-inline SwAnchoredObjList* SwTextFly::GetAnchoredObjList() const
+inline SwAnchoredObjList& SwTextFly::GetAnchoredObjList() const
 {
 return mpAnchoredObjList
-   ? mpAnchoredObjList.get()
-   : _cast(this)->InitAnchoredObjList();
+   ? *mpAnchoredObjList
+   : const_cast(this)->InitAnchoredObjList();
 }
 
 inline void SwTextFly::SetTopRule()
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 495820336fb3..1e20d7e0e9bc 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1867,7 +1867,7 @@ void SwTextFrame::FormatImpl(vcl::RenderContext* 
pRenderContext, SwParaPortion *
 if (aInf.GetTextFly().IsOn())
 {
 SwRect const aRect(aInf.GetTextFly().GetFrameArea());
-for (SwAnchoredObject *const pObj : 
*aInf.GetTextFly().GetAnchoredObjList())
+for (SwAnchoredObject *const pObj : 
aInf.GetTextFly().GetAnchoredObjList())
 {
 if (!aInf.GetTextFly().AnchoredObjToRect(pObj, aRect).IsEmpty())
 {
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 6511d0ab45c9..7e4841fdb0c6 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2815,7 +2815,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo 
 )
 // Word style: if there is minimal space remaining, then handle that 
similar to a full line
 // and put the actual empty paragraph below the fly.
 SwTwips nLimit = MINLAY;
-for (const auto& pObj : *rTextFly.GetAnchoredObjList())
+for (const auto& pObj : rTextFly.GetAnchoredObjList())
 {
 auto pFlyFrame = pObj->DynCastFlyFrame();
 if (!pFlyFrame)
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 43be775725e9..ff5566f537ac 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -493,7 +493,7 @@ void SwTextFly::DrawTextOpaque( SwDrawTextInfo  )
 OSL_ENSURE( !m_bTopRule, "DrawTextOpaque: Wrong TopRule" );
 
 // #i68520#
-const SwAnchoredObjList::size_type nCount( m_bOn ? 
GetAnchoredObjList()->size() : 0 );
+const SwAnchoredObjList::size_type nCount( m_bOn ? 
GetAnchoredObjList().size() : 0 );
 if (nCount > 0)
 {
 const SdrLayerID nHellId = 
m_pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId();
@@ -578,7 +578,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const 
SwRect  )
 SwRegionRects aRegion( rRect );
 OSL_ENSURE( !m_bTopRule, "DrawFlyRect: Wrong TopRule" );
 // #i68520#
-const SwAnchoredObjList::size_type nCount( m_bOn ? 
GetAnchoredObjList()->size() : 0 );
+const SwAnchoredObjList::size_type nCount( m_bOn ? 
GetAnchoredObjList().size() : 0 );
 if (nCount > 0)
 {
 const SdrLayerID nHellId = 
m_pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId();
@@ -1024,7 +1024,7 @@ SwTwips SwTextFly::GetMaxBottom(const SwBreakPortion& 
rPortion, const SwTextForm
 // Note that m_pCurrFrame is already swapped at this stage, so it's 
correct to bypass
 // SwRectFnSet here.
 SwTwips nRet = 0;
-size_t nCount(m_bOn ? GetAnchoredObjList()->size() : 0);
+size_t nCount(m_bOn ? GetAnchoredObjList().size() : 0);
 
 // Get the horizontal position of the break portion in absolute twips. The 
frame area is in
 // absolute twips, the frame's print area is relative to the frame area. 
Finally the portion's
@@ -1101,7 +1101,7 @@ bool SwTextFly::ForEach( const SwRect , SwRect* 
pRect, bool bAvoid ) const
 
 bool bRet = false;
 // #i68520#
-const SwAnchoredObjList::size_type nCount( m_bOn ? 
GetAnchoredObjList()->size() : 0 );
+  

[Libreoffice-commits] core.git: 2 commits - cui/source external/python3 sw/source vcl/jsdialog

2023-10-10 Thread Andras Timar (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx  |   27 +++
 cui/source/factory/dlgfact.cxx  |4 ++--
 cui/source/factory/dlgfact.hxx  |2 +-
 cui/source/inc/QrCodeGenDialog.hxx  |5 -
 external/python3/ExternalPackage_python3.mk |6 ++
 sw/source/uibase/uiview/viewdlg2.cxx|6 --
 vcl/jsdialog/enabled.cxx|1 +
 7 files changed, 45 insertions(+), 6 deletions(-)

New commits:
commit d4f1db07753396efee9b59cffed79adde141293c
Author: Andras Timar 
AuthorDate: Sun May 21 17:20:17 2023 +0200
Commit: Caolán McNamara 
CommitDate: Tue Oct 10 20:49:23 2023 +0200

fix internal python build on aarch64-unknown-linux-gnu

Change-Id: I74189af9edd8384cbb1d65a805a29cea91646eeb
(cherry picked from commit 77ebb08e5f93ea9b9e82ddc3de0698babe0630a8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157752
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 1f29c9efbebb..143e64700dc1 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -146,6 +146,11 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 LO_lib/_sysconfigdata_$(if 
$(ENABLE_DBGUTIL),d)_linux_powerpc64le-linux-gnu.py \
 ))
 else
+ifeq ($(HOST_PLATFORM),aarch64-unknown-linux-gnu)
+$(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+LO_lib/_sysconfigdata_$(if 
$(ENABLE_DBGUTIL),d)_linux_aarch64-linux-gnu.py \
+))
+else
 # note: python configure overrides config.guess with something that doesn't
 # put -pc in its linux platform triplets, so filter that...
 ifneq ($(OS),WNT)
@@ -160,6 +165,7 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 endif
 endif
 endif
+endif
 
 
 # packages not shipped:
commit 39f9c0020505719517972bbf262306c2e0defd9c
Author: Darshan-upadhyay1110 
AuthorDate: Thu Sep 7 13:00:50 2023 +0530
Commit: Caolán McNamara 
CommitDate: Tue Oct 10 20:49:08 2023 +0200

Enable QR and barcode dialog for online

 - enable QR and barcode genration dialog for online
 - Change Qr code genration dialog to async

Change-Id: Ia46b8e27a3002adcc893e5ef4c2545d7edcc3e41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156642
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 6ed38adb5578d0b52d11d8f2077e345f9a8c7ade)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157728
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 0058ea362128..8a25e3b364e7 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -250,6 +250,33 @@ short QrCodeGenDialog::run()
 #endif
 }
 
+bool QrCodeGenDialog::runAsync(const std::shared_ptr& 
rController,
+   const std::function& rFunc)
+{
+#if ENABLE_ZXING
+
+weld::GenericDialogController::runAsync(rController, [rController, 
rFunc](sal_Int32 nResult) {
+if (nResult == RET_OK)
+{
+try
+{
+rController->Apply();
+}
+catch (const std::exception&)
+{
+std::unique_ptr 
xBox(Application::CreateMessageDialog(
+rController->GetParent(), VclMessageType::Warning, 
VclButtonsType::Ok,
+CuiResId(RID_CUISTR_QRCODEDATALONG)));
+xBox->run();
+}
+}
+
+rFunc(nResult);
+});
+#endif
+return true;
+}
+
 void QrCodeGenDialog::Apply()
 {
 #if ENABLE_ZXING
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index f558f9e4a37d..086fd01c5af3 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -113,7 +113,6 @@ IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog)
 IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog)
 IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog)
 IMPL_ABSTDLG_CLASS(AbstractLinksDialog)
-IMPL_ABSTDLG_CLASS(AbstractQrCodeGenDialog)
 IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg)
 IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog)
 IMPL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog)
@@ -132,6 +131,7 @@ IMPL_ABSTDLG_CLASS(AbstractSvxZoomDialog)
 IMPL_ABSTDLG_CLASS(AbstractTitleDialog)
 IMPL_ABSTDLG_CLASS(AbstractURLDlg)
 
IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasswordToOpenModifyDialog,weld::DialogController)
+IMPL_ABSTDLG_CLASS_ASYNC(AbstractQrCodeGenDialog,QrCodeGenDialog)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasteDialog,SfxDialogController)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractScriptSelectorDialog,SfxDialogController)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSpellDialog,SfxDialogController)
@@ 

[Libreoffice-commits] core.git: 2 commits - cui/source sd/inc sd/qa sd/source

2023-08-23 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/tpline.cxx   |   12 ++---
 sd/inc/theme/ThemeColorChanger.hxx   |5 +++
 sd/qa/unit/ThemeTest.cxx |6 +++-
 sd/source/core/ThemeColorChanger.cxx |   46 ++-
 sd/source/ui/view/drviews2.cxx   |5 ++-
 5 files changed, 65 insertions(+), 9 deletions(-)

New commits:
commit b5aaf194866c5e416167cb54d37f9f04dabc5375
Author: Tomaž Vajngerl 
AuthorDate: Mon Aug 14 22:32:36 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 23 23:17:09 2023 +0200

sd: change fill/line theme colors for graphic styles on theme change

Change-Id: Ieeb425519e805160bf6726a64086508290f9d521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155684
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/theme/ThemeColorChanger.hxx 
b/sd/inc/theme/ThemeColorChanger.hxx
index 8c8179460dd8..72ae70a0ea3c 100644
--- a/sd/inc/theme/ThemeColorChanger.hxx
+++ b/sd/inc/theme/ThemeColorChanger.hxx
@@ -13,6 +13,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 namespace sd
 {
@@ -20,9 +22,10 @@ class SD_DLLPUBLIC ThemeColorChanger : public 
svx::IThemeColorChanger
 {
 private:
 SdrPage* mpMasterPage;
+sd::DrawDocShell* mpDocShell;
 
 public:
-ThemeColorChanger(SdrPage* pMasterPage);
+ThemeColorChanger(SdrPage* pMasterPage, sd::DrawDocShell* pDocShell);
 virtual ~ThemeColorChanger() override;
 
 void apply(std::shared_ptr const& pColorSet) override;
diff --git a/sd/qa/unit/ThemeTest.cxx b/sd/qa/unit/ThemeTest.cxx
index 65c261f23700..1b4f24249b9b 100644
--- a/sd/qa/unit/ThemeTest.cxx
+++ b/sd/qa/unit/ThemeTest.cxx
@@ -67,6 +67,10 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange)
 // Given a document, with a first slide and blue shape text from theme:
 loadFromURL(u"theme.pptx");
 
+SdXImpressDocument* pXImpressDocument = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pXImpressDocument);
+auto* pDocShell = pXImpressDocument->GetDocShell();
+
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
 // The draw page also contains a group shape to make sure we don't crash 
on group shapes.
 uno::Reference xDrawPage(
@@ -131,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange)
 auto* pMasterPage = GetSdrPageFromXDrawPage(xDrawPageMaster);
 auto pTheme = pMasterPage->getSdrPageProperties().GetTheme();
 
-sd::ThemeColorChanger aChanger(pMasterPage);
+sd::ThemeColorChanger aChanger(pMasterPage, pDocShell);
 aChanger.apply(pTheme->getColorSet());
 
 // Then make sure the shape text color is now green:
diff --git a/sd/source/core/ThemeColorChanger.cxx 
b/sd/source/core/ThemeColorChanger.cxx
index 7ca2b6478232..d0a84c866495 100644
--- a/sd/source/core/ThemeColorChanger.cxx
+++ b/sd/source/core/ThemeColorChanger.cxx
@@ -12,13 +12,19 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 using namespace css;
 
 namespace sd
 {
-ThemeColorChanger::ThemeColorChanger(SdrPage* pMasterPage)
+ThemeColorChanger::ThemeColorChanger(SdrPage* pMasterPage, sd::DrawDocShell* 
pDocShell)
 : mpMasterPage(pMasterPage)
+, mpDocShell(pDocShell)
 {
 }
 
@@ -37,10 +43,48 @@ void changeTheTheme(SdrPage* pMasterPage, 
std::shared_ptr const
 pTheme->setColorSet(pColorSet);
 }
 
+bool changeStyles(sd::DrawDocShell* pDocShell, 
std::shared_ptr const& pColorSet)
+{
+SfxStyleSheetBasePool* pPool = pDocShell->GetStyleSheetPool();
+
+SdStyleSheet* pStyle = 
static_cast(pPool->First(SfxStyleFamily::Para));
+while (pStyle)
+{
+auto& rItemSet = pStyle->GetItemSet();
+if (const XFillColorItem* pItem = 
rItemSet.GetItemIfSet(XATTR_FILLCOLOR, false))
+{
+model::ComplexColor const& rComplexColor = 
pItem->getComplexColor();
+if (rComplexColor.isValidThemeType())
+{
+Color aNewColor = pColorSet->resolveColor(rComplexColor);
+std::unique_ptr pNewItem(pItem->Clone());
+pNewItem->SetColorValue(aNewColor);
+rItemSet.Put(*pNewItem);
+}
+}
+if (const XLineColorItem* pItem = 
rItemSet.GetItemIfSet(XATTR_LINECOLOR, false))
+{
+model::ComplexColor const& rComplexColor = 
pItem->getComplexColor();
+if (rComplexColor.isValidThemeType())
+{
+Color aNewColor = pColorSet->resolveColor(rComplexColor);
+std::unique_ptr pNewItem(pItem->Clone());
+pNewItem->SetColorValue(aNewColor);
+rItemSet.Put(*pNewItem);
+}
+}
+pStyle = static_cast(pPool->Next());
+}
+
+return true;
+}
+
 } // end anonymous ns
 
 void ThemeColorChanger::apply(std::shared_ptr const& 
pColorSet)
 {
+changeStyles(mpDocShell, pColorSet);
+
 SdrModel& rModel = mpMasterPage->getSdrModelFromSdrPage();
 for (sal_uInt16 nPage = 0; nPage < 

[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/svl sfx2/source solenv/clang-format svl/Library_svl.mk svl/source sw/source

2023-07-22 Thread Noel Grandin (via logerrit)
 cui/source/options/treeopt.cxx  |4 ++--
 include/sfx2/app.hxx|3 +--
 include/svl/isethint.hxx|   40 
 sfx2/source/appl/appcfg.cxx |   13 +
 sfx2/source/appl/appserv.cxx|2 +-
 solenv/clang-format/excludelist |1 -
 svl/Library_svl.mk  |1 -
 svl/source/notify/isethint.cxx  |   33 -
 sw/source/uibase/app/apphdl.cxx |1 -
 sw/source/uibase/app/appopt.cxx |4 ++--
 10 files changed, 7 insertions(+), 95 deletions(-)

New commits:
commit 0df982ac881d80db7caf06ce9402691a4a0ad7fd
Author: Noel Grandin 
AuthorDate: Fri Jul 21 14:41:57 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Jul 22 08:51:27 2023 +0200

merge SetOptions_Nbc and SetOptions

since the Nbc variant is no longer necessary

Change-Id: I4a846dcdbe68116dd511e45f018af2cdc5fbcf48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154725
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 4a6e8428972d..bd214ce2f2e5 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -164,7 +164,6 @@ public:
 SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
 SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
 
-SAL_DLLPRIVATE static void  SetOptions_Nbc(const SfxItemSet &);
 SAL_DLLPRIVATE void Initialize_Impl();
 
 SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pImpl.get(); }
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 1f030223c2f3..679eb2cd3da9 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -231,7 +231,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
 }
 }
 
-void SfxApplication::SetOptions_Nbc(const SfxItemSet& rSet)
+void SfxApplication::SetOptions(const SfxItemSet )
 {
 std::shared_ptr< comphelper::ConfigurationChanges > batch(
 comphelper::ConfigurationChanges::create());
@@ -335,12 +335,6 @@ void SfxApplication::SetOptions_Nbc(const SfxItemSet& rSet)
 }
 
 
-void SfxApplication::SetOptions(const SfxItemSet )
-{
-SetOptions_Nbc( rSet );
-}
-
-
 void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool 
bSynchron )
 {
 SfxObjectShell *pDoc = rEventHint.GetObjShell();
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b7e89ab735ad..507cc60cc672 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -325,7 +325,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 case SID_SETOPTIONS:
 {
 if( rReq.GetArgs() )
-SetOptions_Nbc( *rReq.GetArgs() );
+SetOptions( *rReq.GetArgs() );
 break;
 }
 
commit 6d9e304d1748668cc25905945129095bd14fd1af
Author: Noel Grandin 
AuthorDate: Fri Jul 21 14:39:42 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Jul 22 08:51:18 2023 +0200

SfxItemSetHint is dead

since
commit 519876dffdc8c93710af543cc11332dab9a50c14
Author: Mike Kaganski 
Date:   Tue Jul 18 23:45:47 2023 +0300
Cleanup SfxApplication::Get/SetOptions, and drop unused SIDs

Change-Id: I8d306bf6792630cfdaa0a0ac8b77730e1e1f0070
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154724
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d3c65eb0c847..3a637145e13d 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1143,7 +1143,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, 
const SfxItemSet& rSet
 SfxItemSetFixed 
aOptSet(SfxGetpApp()->GetPool());
 aOptSet.Put(rSet);
 if(aOptSet.Count())
-SfxGetpApp()->SetOptions( aOptSet );
+SfxApplication::SetOptions( aOptSet );
 // get dispatcher anew, because SetOptions() might have destroyed 
the dispatcher
 SfxViewFrame *pViewFrame = SfxViewFrame::Current();
 
@@ -1193,7 +1193,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, 
const SfxItemSet& rSet
 break;
 case SID_INET_DLG :
 case SID_FILTER_DLG:
-SfxGetpApp()->SetOptions( rSet );
+SfxApplication::SetOptions( rSet );
 break;
 
 case SID_SB_STARBASEOPTIONS:
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 09ddd082db31..4a6e8428972d 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -155,7 +155,7 @@ public:
 
 // misc.
 static void GetOptions(SfxItemSet &);
-voidSetOptions(const SfxItemSet &);
+static void SetOptions(const SfxItemSet &);
 virtual voidInvalidate(sal_uInt16 nId = 0) override;
 voidNotifyEvent(const SfxEventHint& rEvent, bool 

[Libreoffice-commits] core.git: 2 commits - cui/source

2023-06-05 Thread Mike Kaganski (via logerrit)
 cui/source/options/optgdlg.cxx  |2 -
 cui/source/options/optlingu.cxx |   68 +++-
 2 files changed, 27 insertions(+), 43 deletions(-)

New commits:
commit e855481ead996a3b8270fae91bd23d6c8d75ef25
Author: Mike Kaganski 
AuthorDate: Mon Jun 5 14:06:40 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Jun 5 16:00:29 2023 +0200

Avoid duplicates in Edit Modules language list

Since different services/categories may add same languages, they may
become duplicated in the resulting list. Avoid that using std::set.

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

diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 9184460cbec3..6097f307038f 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -60,6 +60,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -329,6 +330,22 @@ struct ServiceInfo_Impl
 ServiceInfo_Impl() : bConfigured(false) {}
 };
 
+struct Locale_less
+{
+bool operator()(const css::lang::Locale& lhs, const css::lang::Locale& 
rhs) const
+{
+if (lhs.Language < rhs.Language)
+return true;
+if (lhs.Language > rhs.Language)
+return false;
+if (lhs.Country < rhs.Country)
+return true;
+if (lhs.Country > rhs.Country)
+return false;
+return lhs.Variant < rhs.Variant;
+}
+};
+
 }
 
 typedef std::vector< ServiceInfo_Impl >   ServiceInfoArr;
@@ -343,7 +360,7 @@ class SvxLinguData_Impl
 ServiceInfoArr  aDisplayServiceArr;
 sal_uInt32  nDisplayServices;
 
-Sequence< Locale >  aAllServiceLocales;
+std::set   aAllServiceLocales;
 LangImplNameTable   aCfgSpellTable;
 LangImplNameTable   aCfgHyphTable;
 LangImplNameTable   aCfgThesTable;
@@ -362,7 +379,7 @@ public:
 void SetChecked( const Sequence< OUString >  );
 void Reconfigure( std::u16string_view rDisplayName, bool bEnable );
 
-const Sequence &GetAllSupportedLocales() const { return 
aAllServiceLocales; }
+const auto& GetAllSupportedLocales() const { return 
aAllServiceLocales; }
 
 LangImplNameTable & GetSpellTable() { return 
aCfgSpellTable; }
 LangImplNameTable & GetHyphTable()  { return 
aCfgHyphTable; }
@@ -468,37 +485,6 @@ ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( 
std::u16string_view rSv
 return nullptr;
 }
 
-
-static void lcl_MergeLocales(Sequence< Locale >& aAllLocales, const Sequence< 
Locale >& rAdd)
-{
-Sequence aLocToAdd(rAdd.getLength());
-Locale* pLocToAdd = aLocToAdd.getArray();
-sal_Int32 nFound = 0;
-for(const Locale& i : rAdd)
-{
-bool bFound = false;
-for(const Locale& j : std::as_const(aAllLocales))
-{
-if (i.Language == j.Language &&
-i.Country == j.Country &&
-i.Variant == j.Variant)
-{
-bFound = true;
-break;
-}
-}
-if(!bFound)
-{
-pLocToAdd[nFound++] = i;
-}
-}
-sal_Int32 nLength = aAllLocales.getLength();
-aAllLocales.realloc( nLength + nFound);
-Locale* pAllLocales2 = aAllLocales.getArray();
-for(sal_Int32 i = 0; i < nFound; i++)
-pAllLocales2[nLength++] = pLocToAdd[i];
-}
-
 static void lcl_MergeDisplayArray(
 SvxLinguData_Impl ,
 const ServiceInfo_Impl  )
@@ -585,7 +571,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
 //! suppress display of entries with no supported languages (see 
feature 110994)
 if (aLocales.hasElements())
 {
-lcl_MergeLocales( aAllServiceLocales, aLocales );
+aAllServiceLocales.insert(aLocales.begin(), aLocales.end());
 lcl_MergeDisplayArray( *this, aInfo );
 }
 }
@@ -608,7 +594,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
 //! suppress display of entries with no supported languages (see 
feature 110994)
 if (aLocales.hasElements())
 {
-lcl_MergeLocales( aAllServiceLocales, aLocales );
+aAllServiceLocales.insert(aLocales.begin(), aLocales.end());
 lcl_MergeDisplayArray( *this, aInfo );
 }
 }
@@ -630,7 +616,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
 //! suppress display of entries with no supported languages (see 
feature 110994)
 if (aLocales.hasElements())
 {
-lcl_MergeLocales( aAllServiceLocales, aLocales );
+aAllServiceLocales.insert(aLocales.begin(), aLocales.end());
 lcl_MergeDisplayArray( *this, aInfo );
 }
 }
@@ -652,7 +638,7 @@ 

[Libreoffice-commits] core.git: 2 commits - cui/source docmodel/Library_docmodel.mk docmodel/source editeng/source include/docmodel include/editeng include/svx include/xmloff offapi/com offapi/UnoApi_

2023-05-11 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/tpcolor.cxx   |8 -
 docmodel/Library_docmodel.mk  |3 
 docmodel/source/color/ComplexColorJSON.cxx|   20 +--
 docmodel/source/theme/ColorSet.cxx|   12 --
 docmodel/source/uno/UnoComplexColor.cxx   |   12 +-
 docmodel/source/uno/UnoThemeColor.cxx |   40 ---
 editeng/source/items/textitem.cxx |   53 +++--
 editeng/source/uno/unotext.cxx|2 
 include/docmodel/color/ComplexColor.hxx   |7 +
 include/docmodel/color/ComplexColorJSON.hxx   |9 -
 include/docmodel/theme/ColorSet.hxx   |2 
 include/docmodel/uno/UnoComplexColor.hxx  |5 
 include/docmodel/uno/UnoThemeColor.hxx|   55 --
 include/editeng/memberids.h   |4 
 include/editeng/unoprnms.hxx  |8 -
 include/editeng/unotext.hxx   |4 
 include/svx/svxids.hrc|2 
 include/svx/unoshprp.hxx  |4 
 include/svx/xcolit.hxx|9 -
 include/xmloff/txtprmap.hxx   |2 
 include/xmloff/xmltoken.hxx   |4 
 include/xmloff/xmltypes.hxx   |2 
 offapi/UnoApi_offapi.mk   |1 
 offapi/com/sun/star/util/XComplexColor.idl|9 +
 offapi/com/sun/star/util/XThemeColor.idl  |   26 
 oox/inc/drawingml/fontworkhelpers.hxx |   16 +-
 oox/qa/unit/drawingml.cxx |   99 --
 oox/qa/unit/shape.cxx |   15 +-
 oox/source/drawingml/fillproperties.cxx   |   20 +--
 oox/source/drawingml/fontworkhelpers.cxx  |   94 -
 oox/source/drawingml/lineproperties.cxx   |   21 +--
 oox/source/drawingml/textcharacterproperties.cxx  |   16 +-
 oox/source/export/drawingml.cxx   |   38 +++
 oox/source/token/properties.txt   |6 -
 sc/source/core/data/document.cxx  |   13 +-
 sd/qa/unit/uiimpress.cxx  |   40 +++
 sd/source/core/stlsheet.cxx   |   16 +-
 sd/source/ui/func/fuconstr.cxx|2 
 sd/source/ui/view/drviews2.cxx|   10 +
 svx/qa/unit/styles.cxx|   32 ++---
 svx/qa/unit/xoutdev.cxx   |   33 ++
 svx/sdi/svxitems.sdi  |4 
 svx/source/dialog/ThemeColorValueSet.cxx  |2 
 svx/source/dialog/ThemeDialog.cxx |1 
 svx/source/table/cell.cxx |   23 ++--
 svx/source/tbxctrls/PaletteManager.cxx|   16 +-
 svx/source/theme/ThemeColorChanger.cxx|   52 -
 svx/source/unodraw/unoprov.cxx|2 
 svx/source/unodraw/unoshap2.cxx   |2 
 svx/source/unodraw/unoshape.cxx   |   17 +--
 svx/source/xoutdev/xattr.cxx  |   63 +--
 sw/qa/core/theme/ThemeTest.cxx|   11 --
 sw/source/core/model/ThemeColorChanger.cxx|2 
 sw/source/core/unocore/unomap.cxx |4 
 sw/source/core/unocore/unomap1.cxx|6 -
 sw/source/core/unocore/unomapproperties.hxx   |6 -
 sw/source/filter/xml/xmlfmte.cxx  |2 
 writerfilter/source/dmapper/DomainMapper.cxx  |   14 +-
 writerfilter/source/dmapper/PropertyIds.cxx   |2 
 writerfilter/source/dmapper/PropertyIds.hxx   |2 
 writerfilter/source/dmapper/ThemeColorHandler.hxx |2 
 xmloff/inc/XMLThemeColorContext.hxx   |4 
 xmloff/inc/XMLThemeColorHandler.hxx   |   21 +--
 xmloff/inc/xmlprop.hxx|4 
 xmloff/qa/unit/draw.cxx   |  119 ++
 xmloff/source/core/xmltoken.cxx   |4 
 xmloff/source/draw/XMLShapePropertySetContext.cxx |2 
 xmloff/source/draw/sdpropls.cxx   |6 -
 xmloff/source/text/XMLTextPropertySetContext.cxx  |2 
 xmloff/source/text/XMLTextShapeStyleContext.cxx   |2 
 xmloff/source/text/XMLThemeColorContext.cxx   |8 -
 xmloff/source/text/XMLThemeColorExport.cxx|   19 +--
 xmloff/source/text/txtexppr.cxx   |2 
 xmloff/source/text/txtprhdl.cxx   |4 
 xmloff/source/text/txtprmap.cxx   |6 -
 75 files changed, 529 insertions(+), 681 deletions(-)

New commits:
commit ca3bfa9bded6103d4d172ace486b697beeb191be
Author: Tomaž Vajngerl 
AuthorDate: Thu May 11 23:01:10 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri May 12 05:00:39 2023 +0200

change ComplexColor to show more useful properties

Change-Id: Ie19f080f2faf388f9b8ba3e9a4b3c0926d5ebdd4

[Libreoffice-commits] core.git: 2 commits - cui/source docmodel/Library_docmodel.mk docmodel/source editeng/source include/docmodel include/editeng include/oox offapi/com offapi/UnoApi_offapi.mk sd/so

2023-05-07 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/chardlg.cxx|9 +--
 docmodel/Library_docmodel.mk   |1 
 docmodel/source/theme/ColorSet.cxx |   12 
 docmodel/source/uno/UnoComplexColor.cxx|   37 
 editeng/source/items/textitem.cxx  |   58 +++
 editeng/source/uno/unotext.cxx |8 +-
 include/docmodel/color/ComplexColor.hxx|   87 -
 include/docmodel/theme/ColorSet.hxx|3 +
 include/docmodel/theme/ThemeColor.hxx  |5 +
 include/docmodel/uno/UnoComplexColor.hxx   |   50 
 include/editeng/colritem.hxx   |   16 +
 include/oox/export/ThemeExport.hxx |2 
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/util/XComplexColor.idl |   26 
 sd/source/ui/view/drtxtob1.cxx |9 +--
 sw/source/core/model/ThemeColorChanger.cxx |   16 +++--
 sw/source/uibase/shells/textsh1.cxx|2 
 17 files changed, 284 insertions(+), 58 deletions(-)

New commits:
commit 900c3a2a854436fdbacd488ef1da12ea99fbceb0
Author: Tomaž Vajngerl 
AuthorDate: Mon May 1 10:19:06 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon May 8 07:23:17 2023 +0200

svx: use ComplexColor in SvxColorItem instead of the ThemeColor

ComplexColor includes everything a ThemeColor has and in addition
also can have various other representations that are supported by
OOXML. This is important for compatibility reasons to preserve the
color information.

Change-Id: I65a96511dc1742c75b1949e002eaa8c622e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151226
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 0c600f83ab24..601dae8dce0e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1600,10 +1600,11 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 model::ThemeColorType eType = 
model::convertToThemeColorType(aSelectedColor.m_nThemeIndex);
 if (eType != model::ThemeColorType::Unknown)
 {
-aItem.GetThemeColor().setType(eType);
-aItem.GetThemeColor().clearTransformations();
-
aItem.GetThemeColor().addTransformation({model::TransformationType::LumMod, 
aSelectedColor.m_nLumMod});
-
aItem.GetThemeColor().addTransformation({model::TransformationType::LumOff, 
aSelectedColor.m_nLumOff});
+model::ComplexColor aComplexColor;
+aComplexColor.setSchemeColor(eType);
+
aComplexColor.addTransformation({model::TransformationType::LumMod, 
aSelectedColor.m_nLumMod});
+
aComplexColor.addTransformation({model::TransformationType::LumOff, 
aSelectedColor.m_nLumOff});
+aItem.setComplexColor(aComplexColor);
 }
 
 rSet.Put(aItem);
diff --git a/docmodel/source/theme/ColorSet.cxx 
b/docmodel/source/theme/ColorSet.cxx
index 55c03dadba8c..44cd5bdc6c4f 100644
--- a/docmodel/source/theme/ColorSet.cxx
+++ b/docmodel/source/theme/ColorSet.cxx
@@ -50,6 +50,18 @@ Color ColorSet::resolveColor(model::ThemeColor const& 
rThemeColor) const
 return rThemeColor.applyTransformations(aColor);
 }
 
+Color ColorSet::resolveColor(model::ComplexColor const& rComplexColor) const
+{
+auto eSchemeType = rComplexColor.meSchemeType;
+if (eSchemeType == model::ThemeColorType::Unknown)
+{
+SAL_WARN("svx", "ColorSet::resolveColor with ThemeColorType::Unknown");
+return COL_AUTO;
+}
+Color aColor = getColor(eSchemeType);
+return rComplexColor.applyTransformations(aColor);
+}
+
 void ColorSet::dumpAsXml(xmlTextWriterPtr pWriter) const
 {
 (void)xmlTextWriterStartElement(pWriter, BAD_CAST("ColorSet"));
diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index ece9a4a35237..153319ae8e75 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1368,10 +1368,10 @@ SvxColorItem::SvxColorItem( const Color& rCol, const 
sal_uInt16 nId ) :
 {
 }
 
-SvxColorItem::SvxColorItem(Color const& rColor, model::ThemeColor const& 
rThemeColor, const sal_uInt16 nId)
+SvxColorItem::SvxColorItem(Color const& rColor, model::ComplexColor const& 
rComplexColor, const sal_uInt16 nId)
 : SfxPoolItem(nId)
 , mColor(rColor)
-, maThemeColor(rThemeColor)
+, maComplexColor(rComplexColor)
 {
 }
 
@@ -1385,7 +1385,7 @@ bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) 
const
 const SvxColorItem& rColorItem = static_cast(rAttr);
 
 return mColor == rColorItem.mColor &&
-   maThemeColor == rColorItem.maThemeColor;
+   maComplexColor == rColorItem.maComplexColor;
 }
 
 bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -1406,13 +1406,13 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
  

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig vcl/source

2023-04-24 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/FontFeaturesDialog.cxx |   30 --
 cui/source/inc/FontFeaturesDialog.hxx |8 +++-
 cui/uiconfig/ui/fontfragment.ui   |1 +
 vcl/source/gdi/metaact.cxx|2 ++
 4 files changed, 34 insertions(+), 7 deletions(-)

New commits:
commit 4d6fcd7908f6db892e8d5fb3cabf7e0fe49328c4
Author: Caolán McNamara 
AuthorDate: Mon Apr 24 12:52:22 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 24 20:47:55 2023 +0200

Resolves: tdf#153441 use a TriStateEnabled helper

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

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index 1656f50bb5b1..e9aba0a6e409 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -109,19 +109,21 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 {
 nIdx = nStylisticSets++;
 m_xStylisticSetsBox->set_visible(true);
-m_aFeatureItems.emplace_back(m_xStylisticSetsGrid.get());
+m_aFeatureItems.emplace_back(
+std::make_unique(m_xStylisticSetsGrid.get()));
 }
 else if (rFontFeature.isCharacterVariant())
 {
 nIdx = nCharacterVariants++;
 m_xCharacterVariantsBox->set_visible(true);
-m_aFeatureItems.emplace_back(m_xCharacterVariantsGrid.get());
+m_aFeatureItems.emplace_back(
+
std::make_unique(m_xCharacterVariantsGrid.get()));
 }
 else
 {
 nIdx = nOtherFeatures++;
 m_xContentBox->set_visible(true);
-m_aFeatureItems.emplace_back(m_xContentGrid.get());
+
m_aFeatureItems.emplace_back(std::make_unique(m_xContentGrid.get()));
 }
 
 int32_t nValue = 0;
@@ -130,7 +132,7 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 else
 nValue = aDefinition.getDefault();
 
-FontFeatureItem& aCurrentItem = m_aFeatureItems.back();
+FontFeatureItem& aCurrentItem = *m_aFeatureItems.back();
 aCurrentItem.m_aFeatureCode = nFontFeatureCode;
 aCurrentItem.m_nDefault = aDefinition.getDefault();
 
@@ -158,11 +160,19 @@ int 
FontFeaturesDialog::fillGrid(std::vector const& rFontFea
 else
 {
 if (nValue < 0)
+{
 aCurrentItem.m_xCheck->set_state(TRISTATE_INDET);
+aCurrentItem.m_aTriStateEnabled.bTriStateEnabled = true;
+aCurrentItem.m_aTriStateEnabled.eState = TRISTATE_INDET;
+}
 else
+{
 aCurrentItem.m_xCheck->set_state(nValue > 0 ? TRISTATE_TRUE : 
TRISTATE_FALSE);
+aCurrentItem.m_aTriStateEnabled.bTriStateEnabled = false;
+aCurrentItem.m_aTriStateEnabled.eState = 
aCurrentItem.m_xCheck->get_state();
+}
 aCurrentItem.m_xCheck->set_label(aDefinition.getDescription());
-aCurrentItem.m_xCheck->connect_toggled(aCheckBoxToggleHandler);
+aCurrentItem.m_aToggleHdl = aCheckBoxToggleHandler;
 aCurrentItem.m_xCheck->show();
 }
 
@@ -188,6 +198,13 @@ void FontFeaturesDialog::updateFontPreview()
 m_aPreviewWindow.SetFont(rPreviewFont, rPreviewFontCJK, rPreviewFontCTL);
 }
 
+IMPL_LINK(FontFeatureItem, CheckBoxToggledHdl, weld::Toggleable&, rToggle, 
void)
+{
+m_aTriStateEnabled.ButtonToggled(rToggle);
+m_aTriStateEnabled.bTriStateEnabled = false;
+m_aToggleHdl.Call(rToggle);
+}
+
 IMPL_LINK_NOARG(FontFeaturesDialog, CheckBoxToggledHdl, weld::Toggleable&, 
void)
 {
 updateFontPreview();
@@ -204,8 +221,9 @@ OUString FontFeaturesDialog::createFontNameWithFeatures()
 OUStringBuffer sNameSuffix;
 bool bFirst = true;
 
-for (const FontFeatureItem& rItem : m_aFeatureItems)
+for (const auto& rEntry : m_aFeatureItems)
 {
+const FontFeatureItem& rItem(*rEntry);
 if (rItem.m_xCheck->get_visible())
 {
 if (rItem.m_xCheck->get_state() != TRISTATE_INDET)
diff --git a/cui/source/inc/FontFeaturesDialog.hxx 
b/cui/source/inc/FontFeaturesDialog.hxx
index c4eb43b79e98..93ba0cb9f80d 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -29,21 +29,27 @@ struct FontFeatureItem
 , m_xCombo(m_xBuilder->weld_combo_box("combo"))
 , m_xCheck(m_xBuilder->weld_check_button("check"))
 {
+m_xCheck->connect_toggled(LINK(this, FontFeatureItem, 
CheckBoxToggledHdl));
 }
 
 sal_uInt32 m_aFeatureCode;
 sal_Int32 m_nDefault;
+weld::TriStateEnabled m_aTriStateEnabled;
+Link m_aToggleHdl;
 std::unique_ptr m_xBuilder;
 std::unique_ptr m_xContainer;
 std::unique_ptr m_xText;
  

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig include/sfx2 sc/qa sfx2/source vcl/jsdialog

2023-04-03 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/SpellDialog.cxx|   31 ---
 cui/source/inc/SpellDialog.hxx|1 +
 cui/uiconfig/ui/spelloptionsdialog.ui |   20 +---
 include/sfx2/basedlgs.hxx |4 
 sc/qa/uitest/calc_tests8/tdf125051.py |3 +--
 sfx2/source/dialog/basedlgs.cxx   |   11 +++
 vcl/jsdialog/enabled.cxx  |2 ++
 7 files changed, 56 insertions(+), 16 deletions(-)

New commits:
commit 735437b3b663f43dd7ef6bb2e8c873c14c49
Author: Szymon Kłos 
AuthorDate: Tue Mar 21 17:47:01 2023 +0100
Commit: Szymon Kłos 
CommitDate: Mon Apr 3 14:03:16 2023 +0200

jsdialog: keep button under content in SpellCheck Options

Change-Id: I75b1424fe688f975b88634d6355cd0311fc07057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149227
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149825
Tested-by: Jenkins

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index ebf684dfef47..09b8a9fc43f9 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -469,7 +469,8 @@ IMPL_LINK_NOARG(SpellDialog, CheckGrammarHdl, 
weld::Toggleable&, void)
 void SpellDialog::StartSpellOptDlg_Impl()
 {
 auto xSet = 
std::make_shared>( 
SfxGetpApp()->GetPool() );
-m_xOptionsDlg = 
std::make_shared(m_xDialog.get(), xSet.get(), 
"cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog");
+m_xOptionsDlg = std::make_shared(
+m_xDialog.get(), xSet.get(), "content", 
"cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog");
 
 std::unique_ptr xPage = 
SvxLinguTabPage::Create(m_xOptionsDlg->get_content_area(), m_xOptionsDlg.get(), 
xSet.get());
 static_cast(xPage.get())->HideGroups( GROUP_MODULES );
diff --git a/cui/uiconfig/ui/spelloptionsdialog.ui 
b/cui/uiconfig/ui/spelloptionsdialog.ui
index ef690fd7da60..d5e80649731d 100644
--- a/cui/uiconfig/ui/spelloptionsdialog.ui
+++ b/cui/uiconfig/ui/spelloptionsdialog.ui
@@ -17,6 +17,23 @@
 False
 vertical
 12
+
+  
+True
+False
+vertical
+12
+
+  
+
+  
+  
+True
+True
+begin
+0
+  
+
 
   
 False
@@ -74,9 +91,6 @@
 0
   
 
-
-  
-
   
 
 
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 9b74669b3f33..f87fe22c1dbd 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -107,6 +107,10 @@ public:
 const OUString& rUIXMLDescription = 
OUString("sfx/ui/singletabdialog.ui"),
 const OUString& rID = OUString("SingleTabDialog"));
 
+SfxSingleTabDialogController(weld::Widget* pParent, const SfxItemSet* 
pOptionsSet,
+const OUString& rContainerId, const OUString& rUIXMLDescription,
+const OUString& rID);
+
 weld::Container* get_content_area() { return m_xContainer.get(); }
 
 virtual ~SfxSingleTabDialogController() override;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 285c3b5b526e..acbed68f87bc 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -233,6 +233,17 @@ 
SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent
 m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
 }
 
+SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget 
*pParent, const SfxItemSet* pSet,
+const OUString& rContainerId, const OUString& rUIXMLDescription, const 
OUString& rID)
+: SfxOkDialogController(pParent, rUIXMLDescription, rID)
+, m_pInputSet(pSet)
+, m_xContainer(m_xBuilder->weld_container(rContainerId))
+, m_xOKBtn(m_xBuilder->weld_button("ok"))
+, m_xHelpBtn(m_xBuilder->weld_button("help"))
+{
+m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
+}
+
 SfxSingleTabDialogController::~SfxSingleTabDialogController()
 {
 }
commit 778e034d89f1e8236cc5afdff902f165637ce9ca
Author: Szymon Kłos 
AuthorDate: Tue Mar 21 09:51:31 2023 +0100
Commit: Szymon Kłos 
CommitDate: Mon Apr 3 14:03:04 2023 +0200

jsdialog: enable spelling options dialog

and make it async

Change-Id: Idbf8661aa106d69e60ab6037052fd3d6dec28c06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149205
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149824
Tested-by: Jenkins

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index b5356aa30a45..ebf684dfef47 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -225,6 +225,12 @@ 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig framework/source

2023-03-20 Thread Juergen Funk (via logerrit)
 cui/source/options/optgdlg.cxx |   36 -
 cui/source/options/optgdlg.hxx |5 
 cui/uiconfig/ui/optviewpage.ui |  129 -
 framework/source/accelerators/acceleratorcache.cxx |   19 ++-
 4 files changed, 18 insertions(+), 171 deletions(-)

New commits:
commit c6dffdf014127af23b0b20b1015a4b6fdf0e1ac9
Author: Juergen Funk 
AuthorDate: Wed Feb 15 12:02:31 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Mar 20 11:37:04 2023 +

tdf#153587 If one of the multiple shortcuts is deleted,

  the next one is not displayed

This patch solve the part 2 of the bug, the problem was
that it did not take into account whether a command was assigned
multiple keys, it simply deleted the whole command

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

diff --git a/framework/source/accelerators/acceleratorcache.cxx 
b/framework/source/accelerators/acceleratorcache.cxx
index 342b9701f99d..0163654d4bf7 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -90,8 +90,23 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& 
aKey)
 // remove key from primary list
 m_lKey2Commands.erase(aKey);
 
-// remove key from optimized command list
-m_lCommand2Keys.erase(sCommand);
+// get keylist for that command
+TCommand2Keys::iterator pCommand = m_lCommand2Keys.find(sCommand);
+if (pCommand == m_lCommand2Keys.end())
+return;
+TKeyList& lKeys = pCommand->second;
+
+// one or more keys assign
+if (lKeys.size() == 1)
+// remove key from optimized command list
+m_lCommand2Keys.erase(sCommand);
+else // only remove this key from the keylist
+{
+auto pKeys = ::std::find(lKeys.begin(), lKeys.end(), aKey);
+
+if (pKeys != lKeys.end())
+lKeys.erase(pKeys);
+}
 }
 
 void AcceleratorCache::removeCommand(const OUString& sCommand)
commit 770eea32b68a95e493a86a97eba5003c46ed736b
Author: Caolán McNamara 
AuthorDate: Mon Mar 20 09:44:16 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 20 11:37:01 2023 +

tdf#152898 remove "show context menu shortcuts" from options page

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 71ac0594cd15..8a30f35535a9 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -530,9 +530,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont"))
 , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom"))
 , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", 
FieldUnit::PIXEL))
-, m_xMenuIconBox(m_xBuilder->weld_widget("menuiconsbox"))
-, m_xMenuIconsLB(m_xBuilder->weld_combo_box("menuicons"))
-, 
m_xContextMenuShortcutsLB(m_xBuilder->weld_combo_box("contextmenushortcuts"))
 , m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview"))
 , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
 , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
@@ -547,9 +544,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_sAutoStr(m_xIconStyleLB->get_text(0))
 {
 OUString sToolKitName(Application::GetToolkitName());
-if (sToolKitName.startsWith("gtk"))
-m_xMenuIconBox->hide();
-
 const bool bHasDarkMode = sToolKitName.startsWith("gtk") || sToolKitName 
== "osx" || sToolKitName == "win";
 if (!bHasDarkMode)
 m_xDarkModeFrame->hide();
@@ -781,33 +775,12 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 bModified = true;
 }
 
-if (m_xMenuIconsLB->get_value_changed_from_saved())
-{
-
officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(m_xMenuIconsLB->get_active()
 == 0, xChanges);
-
officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(m_xMenuIconsLB->get_active()
 == 2, xChanges);
-bModified = true;
-bMenuOptModified = true;
-bAppearanceChanged = true;
-}
-
 if (m_xAppearanceStyleLB->get_value_changed_from_saved())
 {
 bDarkModeOptModified = true;
 bModified = true;
 }
 
-if (m_xContextMenuShortcutsLB->get_value_changed_from_saved())
-{
-officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::set(
-m_xContextMenuShortcutsLB->get_active() == 0 ?
-TRISTATE_INDET :
-static_cast(m_xContextMenuShortcutsLB->get_active() - 1),
-xChanges);
-

[Libreoffice-commits] core.git: 2 commits - cui/source desktop/source include/svtools svtools/Library_svt.mk svtools/source sw/source

2023-03-15 Thread Noel Grandin (via logerrit)
 cui/source/options/optdeepl.cxx   |   15 +--
 cui/source/options/optgdlg.cxx|   32 ---
 cui/source/options/optgdlg.hxx|3 
 desktop/source/app/app.cxx|9 --
 desktop/source/lib/init.cxx   |8 -
 include/svtools/apearcfg.hxx  |   45 --
 include/svtools/deeplcfg.hxx  |   50 
 svtools/Library_svt.mk|1 
 svtools/source/config/apearcfg.cxx|  116 ++--
 svtools/source/config/deeplcfg.cxx|  124 --
 sw/source/ui/misc/translatelangselect.cxx |   14 +--
 sw/source/uibase/shells/textsh1.cxx   |   16 ++-
 12 files changed, 66 insertions(+), 367 deletions(-)

New commits:
commit 69b0fa8a6267a1fa77e77405000f42e8aeba5fa0
Author: Noel Grandin 
AuthorDate: Tue Mar 14 16:24:09 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 15 07:30:30 2023 +

Use officecfg instead of SvxDeeplOptions

Change-Id: I977d9be45fa17b960cccb0915c5f2762bf11288f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148885
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
index 5343f72a59c9..6544a8fbc645 100644
--- a/cui/source/options/optdeepl.cxx
+++ b/cui/source/options/optdeepl.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "optdeepl.hxx"
-#include 
+#include 
 
 OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, 
weld::DialogController* pController,
  const SfxItemSet& rSet)
@@ -32,16 +32,17 @@ OptDeeplTabPage::~OptDeeplTabPage() {}
 
 void OptDeeplTabPage::Reset(const SfxItemSet*)
 {
-SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
-m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl());
-m_xAuthKey->set_text(rDeeplOptions.getAuthKey());
+
m_xAPIUrl->set_text(*officecfg::Office::Linguistic::Translation::Deepl::ApiURL::get());
+
m_xAuthKey->set_text(*officecfg::Office::Linguistic::Translation::Deepl::AuthKey::get());
 }
 
 bool OptDeeplTabPage::FillItemSet(SfxItemSet*)
 {
-SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
-rDeeplOptions.setAPIUrl(m_xAPIUrl->get_text());
-rDeeplOptions.setAuthKey(m_xAuthKey->get_text());
+std::shared_ptr batch(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Linguistic::Translation::Deepl::ApiURL::set(m_xAPIUrl->get_text(),
 batch);
+
officecfg::Office::Linguistic::Translation::Deepl::AuthKey::set(m_xAuthKey->get_text(),
 batch);
+batch->commit();
 return false;
 }
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1a29cdd4ce05..bdab0c035563 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -143,7 +143,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #ifdef IOS
 #include 
@@ -7351,9 +7350,10 @@ void setDeeplConfig()
 OUString aAuthKey = OStringToOUString(pAuthKeyString, 
RTL_TEXTENCODING_UTF8);
 try
 {
-SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
-rDeeplOptions.setAPIUrl(aAPIUrl);
-rDeeplOptions.setAuthKey(aAuthKey);
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Linguistic::Translation::Deepl::ApiURL::set(aAPIUrl, batch);
+
officecfg::Office::Linguistic::Translation::Deepl::AuthKey::set(aAuthKey, 
batch);
+batch->commit();
 }
 catch(uno::Exception const& rException)
 {
diff --git a/include/svtools/deeplcfg.hxx b/include/svtools/deeplcfg.hxx
deleted file mode 100644
index a943d72d4d7e..
--- a/include/svtools/deeplcfg.hxx
+++ /dev/null
@@ -1,50 +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 .
- */
-
-#pragma once
-#include 
-#include 
-#include 
-
-using namespace utl;
-using namespace com::sun::star::uno;
-
-struct DeeplOptions_Impl;
-
-class SVT_DLLPUBLIC SvxDeeplOptions final : public utl::ConfigItem
-{
-public:
-SvxDeeplOptions();
-virtual 

[Libreoffice-commits] core.git: 2 commits - cui/source sdext/source

2023-03-05 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/colorpicker.cxx |   11 ---
 sdext/source/pdfimport/pdfiadaptor.cxx |2 --
 sdext/source/pdfimport/pdfiadaptor.hxx |   13 +
 3 files changed, 9 insertions(+), 17 deletions(-)

New commits:
commit 617f392a0adfc07afca87eea9ec75d7852658de5
Author: Noel Grandin 
AuthorDate: Sun Mar 5 15:16:23 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 6 06:43:23 2023 +

remove unused BaseMutex from ColorPicker

Change-Id: Ife43fad692d2c5651ae75fc675345ae3dd64aecd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148274
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 341cf5bf09e7..24dda1936a2a 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -26,9 +26,8 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1222,12 +1221,11 @@ void ColorPickerDialog::setColorComponent( 
ColorComponent nComp, double dValue )
 }
 }
 
-typedef ::cppu::WeakComponentImplHelper< XServiceInfo, XExecutableDialog, 
XAsynchronousExecutableDialog, XInitialization, XPropertyAccess > 
ColorPickerBase;
+typedef ::comphelper::WeakComponentImplHelper< XServiceInfo, 
XExecutableDialog, XAsynchronousExecutableDialog, XInitialization, 
XPropertyAccess > ColorPickerBase;
 
 namespace {
 
-class ColorPicker : protected ::cppu::BaseMutex,// Struct for right 
initialization of mutex member! Must be first of baseclasses.
-public ColorPickerBase
+class ColorPicker : public ColorPickerBase
 {
 public:
 explicit ColorPicker();
@@ -1272,8 +1270,7 @@ constexpr OUStringLiteral gsColorKey( u"Color" );
 constexpr OUStringLiteral gsModeKey( u"Mode" );
 
 ColorPicker::ColorPicker()
-: ColorPickerBase( m_aMutex )
-, mnColor( 0 )
+: mnColor( 0 )
 , mnMode( 0 )
 {
 }
commit c5ebd807cafbb978b74f99eb937f8956ad880c6a
Author: Noel Grandin 
AuthorDate: Sun Mar 5 16:32:10 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 6 06:43:12 2023 +

BaseMutex->std::mutex in PDFIRawAdaptor

Change-Id: I3aae98e20ce20845835e1e5b7366a3f286e57ae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148280
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx 
b/sdext/source/pdfimport/pdfiadaptor.cxx
index 83019b2e5299..9cca84cdf92f 100644
--- a/sdext/source/pdfimport/pdfiadaptor.cxx
+++ b/sdext/source/pdfimport/pdfiadaptor.cxx
@@ -44,7 +44,6 @@ namespace pdfi
 {
 
 PDFIHybridAdaptor::PDFIHybridAdaptor( const uno::Reference< 
uno::XComponentContext >& xContext ) :
-PDFIHybridAdaptorBase( m_aMutex ),
 m_xContext( xContext )
 {
 }
@@ -203,7 +202,6 @@ css::uno::Sequence 
PDFIHybridAdaptor::getSupportedServiceNames()
 }
 
 PDFIRawAdaptor::PDFIRawAdaptor( OUString const & implementationName, const 
uno::Reference< uno::XComponentContext >& xContext ) :
-PDFIAdaptorBase( m_aMutex ),
 m_implementationName(implementationName),
 m_xContext( xContext )
 {
diff --git a/sdext/source/pdfimport/pdfiadaptor.hxx 
b/sdext/source/pdfimport/pdfiadaptor.hxx
index 0a184f3cf8e0..8cf225b74332 100644
--- a/sdext/source/pdfimport/pdfiadaptor.hxx
+++ b/sdext/source/pdfimport/pdfiadaptor.hxx
@@ -34,19 +34,17 @@
 #include 
 #include 
 
-#include 
-#include 
+#include 
 
 
 namespace pdfi
 {
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
 css::document::XFilter,
 css::document::XImporter,
 css::lang::XServiceInfo> PDFIHybridAdaptorBase;
 
-class PDFIHybridAdaptor : private cppu::BaseMutex,
-  public PDFIHybridAdaptorBase
+class PDFIHybridAdaptor : public PDFIHybridAdaptorBase
 {
 private:
 css::uno::Reference<
@@ -72,15 +70,14 @@ namespace pdfi
 css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
 };
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
 css::xml::XImportFilter,
 css::document::XImporter,
 css::lang::XServiceInfo> PDFIAdaptorBase;
 
 /** Adapts raw pdf import to XImportFilter interface
  */
-class PDFIRawAdaptor : private cppu::BaseMutex,
-   public PDFIAdaptorBase
+class PDFIRawAdaptor : public PDFIAdaptorBase
 {
 private:
 OUString const m_implementationName;


[Libreoffice-commits] core.git: 2 commits - cui/source sw/uiconfig

2023-03-03 Thread Olivier Hallot (via logerrit)
 cui/source/options/optasian.cxx  |   44 +--
 sw/uiconfig/swriter/ui/fldvarpage.ui |   12 -
 2 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit c791a4d32fa971554ef192d1e61ee56e705710d5
Author: Olivier Hallot 
AuthorDate: Fri Mar 3 10:51:17 2023 -0300
Commit: Olivier Hallot 
CommitDate: Fri Mar 3 16:02:57 2023 +

Reword extended tip for field heading numbering

Change-Id: I22ad2251d9d889966bae8bcd2505d15f13f48b06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148183
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui 
b/sw/uiconfig/swriter/ui/fldvarpage.ui
index ccdec30f13a8..67ce63bce6f9 100644
--- a/sw/uiconfig/swriter/ui/fldvarpage.ui
+++ b/sw/uiconfig/swriter/ui/fldvarpage.ui
@@ -283,7 +283,7 @@
 
 
   
-Click the format that you want to 
apply to the selected field, or click "Additional formats" to define a custom 
format.
+Click the format to apply to the 
selected field, or click "Additional formats" to define a custom 
format.
   
 
   
@@ -328,7 +328,7 @@
 
 
   
-In the Format list, define if the 
value is inserted as text or a number.
+In the Format list, define if the 
value is inserted as text or as number.
   
 
   
@@ -435,7 +435,7 @@
 
 
   
-Choose the maximum 
outline level of the heading number to prepend to the displayed field. The 
selected heading number comes from the first immediately prior heading with the 
specified outline level or less. No heading number is displayed if “None” is 
selected.
+Specify the number 
of outline levels to show before the displayed field.  The heading numbers are 
taken from the heading  immediately before with the specified outline level or 
less. If [None] is selected, then no heading number is displayed.
   
 
   
@@ -454,7 +454,7 @@
 True
 
   
-Type the 
character that you want to use as a separator between the heading or chapter 
levels.
+Type the 
character to use as a separator between the heading or chapter levels and the 
field.
   
 
   
@@ -528,7 +528,7 @@
 True
 
   
-Type the name of the 
user-defined field that you want to create.
+Type the name of the 
user-defined field  to create.
   
 
   
@@ -561,7 +561,7 @@
 True
 
   
-Enter the contents 
that you want to add to a user-defined field.
+Enter the contents 
to add to a user-defined field.
   
 
   
commit 43da51e9f6dbd9a90e7cd9f67d7dae6116b6a14f
Author: Noel Grandin 
AuthorDate: Fri Mar 3 15:08:28 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 3 16:02:54 2023 +

flatten SvxForbiddenChars_Impl and associated map

std::map is a node-based datastructure, and ForbiddenCharacters only
contains two ref-counted string data types. No need for all this
indirection.

Change-Id: Ib4fa49e60557c7e5c41bb73ebeb23c4db6d33406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148179
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 9340cb587cc3..9ef6b753b4d4 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -50,7 +50,7 @@ namespace {
 struct SvxForbiddenChars_Impl
 {
 bool  bRemoved;
-std::unique_ptr  pCharacters;
+std::optionaloCharacters;
 };
 
 }
@@ -63,12 +63,12 @@ struct SvxAsianLayoutPage_Impl
 Reference< XForbiddenCharacters >   xForbidden;
 Reference< XPropertySet >   xPrSet;
 Reference< XPropertySetInfo >   xPrSetInfo;
-std::map< LanguageType, std::unique_ptr >
+std::map< LanguageType, SvxForbiddenChars_Impl >
 aChangedLanguagesMap;
 
 boolhasForbiddenCharacters(LanguageType eLang);
 SvxForbiddenChars_Impl* getForbiddenCharacters(LanguageType eLang);
-void

[Libreoffice-commits] core.git: 2 commits - cui/source hwpfilter/source sw/source

2023-02-27 Thread Mike Kaganski (via logerrit)
 cui/source/inc/autocdlg.hxx|4 ++--
 cui/source/tabpages/autocdlg.cxx   |   37 -
 hwpfilter/source/hwpeq.cxx |   19 ---
 sw/source/core/edit/edglss.cxx |6 +-
 sw/source/uibase/envelp/envimg.cxx |   10 +++---
 5 files changed, 30 insertions(+), 46 deletions(-)

New commits:
commit 4805a1348bb3749d468656a4e648064dabe1fd04
Author: Mike Kaganski 
AuthorDate: Mon Feb 27 09:30:46 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Feb 27 09:54:20 2023 +

Optional may be avoided here, too

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 8e31011e7a33..7b4842314779 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -166,7 +166,7 @@ private:
 std::set  aFormatText;
 std::map
 aDoubleStringTable;
-std::optional  moCompareClass;
+CollatorWrapper maCompareClass;
 std::unique_ptrpCharClass;
 LanguageTypeeLang;
 
@@ -227,7 +227,7 @@ class OfaAutocorrExceptPage : public SfxTabPage
 {
 private:
 StringsTableaStringsTable;
-std::optional moCompareClass;
+CollatorWrapper maCompareClass;
 LanguageTypeeLang;
 
 std::unique_ptr m_xAbbrevED;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index f8c4a16d0c6e..446775c6abad 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -667,6 +667,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, 
weld::Button&, void)
 OfaAutocorrReplacePage::OfaAutocorrReplacePage(weld::Container* pPage, 
weld::DialogController* pController,
const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/acorreplacepage.ui", 
"AcorReplacePage", )
+, maCompareClass(comphelper::getProcessComponentContext())
 , eLang(eLastDialogLanguage)
 , bHasSelectionText(false)
 , bFirstSelect(true)
@@ -698,8 +699,7 @@ 
OfaAutocorrReplacePage::OfaAutocorrReplacePage(weld::Container* pPage, weld::Dia
 bSWriter = pMod == SfxModule::GetActiveModule();
 
 LanguageTag aLanguageTag( eLastDialogLanguage );
-moCompareClass.emplace( comphelper::getProcessComponentContext() );
-moCompareClass->loadDefaultCollator( aLanguageTag.getLocale(), 0 );
+maCompareClass.loadDefaultCollator( aLanguageTag.getLocale(), 0 );
 pCharClass.reset( new CharClass( std::move(aLanguageTag) ) );
 
 auto nColWidth = m_xReplaceTLB->get_approximate_digit_width() * 32;
@@ -722,7 +722,6 @@ OfaAutocorrReplacePage::~OfaAutocorrReplacePage()
 aDoubleStringTable.clear();
 aChangesTable.clear();
 
-moCompareClass.reset();
 pCharClass.reset();
 }
 
@@ -904,8 +903,8 @@ void OfaAutocorrReplacePage::SetLanguage(LanguageType eSet)
 eLastDialogLanguage = eSet;
 
 LanguageTag aLanguageTag( eLastDialogLanguage );
-moCompareClass.emplace( comphelper::getProcessComponentContext() );
-moCompareClass->loadDefaultCollator( aLanguageTag.getLocale(), 0 );
+maCompareClass = CollatorWrapper( 
comphelper::getProcessComponentContext() );
+maCompareClass.loadDefaultCollator( aLanguageTag.getLocale(), 0 );
 pCharClass.reset( new CharClass( std::move(aLanguageTag) ) );
 ModifyHdl(*m_xShortED);
 }
@@ -919,7 +918,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, 
weld::TreeView&, rBox, void)
 OUString sTmpShort(rBox.get_text(nEntry, 0));
 // if the text is set via ModifyHdl, the cursor is always at the 
beginning
 // of a word, although you're editing here
-bool bSameContent = 0 == moCompareClass->compareString(sTmpShort, 
m_xShortED->get_text());
+bool bSameContent = 0 == maCompareClass.compareString(sTmpShort, 
m_xShortED->get_text());
 int nStartPos, nEndPos;
 m_xShortED->get_selection_bounds(nStartPos, nEndPos);
 if (m_xShortED->get_text() != sTmpShort)
@@ -1057,7 +1056,7 @@ bool OfaAutocorrReplacePage::NewDelHdl(const 
weld::Widget* pBtn)
 int nCount = m_xReplaceTLB->n_children();
 for (j = 0; j < nCount; ++j)
 {
-if (0 >= moCompareClass->compareString(sEntry, 
m_xReplaceTLB->get_text(j, 0)))
+if (0 >= maCompareClass.compareString(sEntry, 
m_xReplaceTLB->get_text(j, 0)))
 break;
 }
 nPos = j;
@@ -1110,7 +1109,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, 
weld::Entry&, rEdt, void)
 , ,
 , ](weld::TreeIter& 
rIter){
 OUString aTestStr = m_xReplaceTLB->get_text(rIter, 0);
-

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig external/zxing

2023-02-26 Thread Mike Kaganski (via logerrit)
 cui/source/options/optgdlg.cxx  |   39 
 cui/source/options/optgdlg.hxx  |7 -
 cui/uiconfig/ui/optgeneralpage.ui   |   21 +++--
 external/zxing/UnpackedTarball_zxing.mk |1 
 external/zxing/invalid_argument.patch.1 |   22 ++
 5 files changed, 47 insertions(+), 43 deletions(-)

New commits:
commit 05079016e97d0b41c45cc71695d922fce9ae1e6c
Author: Mike Kaganski 
AuthorDate: Sun Feb 26 17:08:28 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sun Feb 26 16:08:11 2023 +

Cleanup general options tab a bit

The crashreporter feature (and thus, the whole frame visibility) depends
not on OS, but on the HAVE_FEATURE_BREAKPAD define. No need to control
the checkbox visibility separate from the label, when we can show the
whole frame selectively.

The quickstarter feature is only available on Windows, since the systray
support was removed in commit 3e9c908b73f0fe0978c9980750a06bbc9e02295e
(remove Linux ("UNX") systray "Quickstarter", 2018-05-23).

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 1037cdd7ed1f..57eaee46d908 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -164,15 +164,13 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xYearFrame(m_xBuilder->weld_widget("yearframe"))
 , m_xYearValueField(m_xBuilder->weld_spin_button("year"))
 , m_xToYearFT(m_xBuilder->weld_label("toyear"))
+#if HAVE_FEATURE_BREAKPAD
+, m_xPrivacyFrame(m_xBuilder->weld_widget("privacyframe"))
 , m_xCrashReport(m_xBuilder->weld_check_button("crashreport"))
-, m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
-, m_xHelpImproveLabel(m_xBuilder->weld_label("label7")) //"Help Improve"
-#if defined(UNX)
-, m_xQuickLaunchCB(m_xBuilder->weld_check_button("systray"))
-#else
-, m_xQuickLaunchCB(m_xBuilder->weld_check_button("quicklaunch"))
 #endif
 #if defined(_WIN32)
+, m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
+, m_xQuickLaunchCB(m_xBuilder->weld_check_button("quicklaunch"))
 , m_xFileAssocFrame(m_xBuilder->weld_widget("fileassoc"))
 , m_xFileAssocBtn(m_xBuilder->weld_button("assocfiles"))
 , 
m_xPerformFileExtCheck(m_xBuilder->weld_check_button("cbPerformFileExtCheck"))
@@ -186,21 +184,16 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xFileDlgCB->set_sensitive(false);
 }
 
-m_xQuickLaunchCB->show();
-
-//Only available in Win or if building the gtk systray
-#if !defined(_WIN32)
-m_xQuickStarterFrame->hide();
-//Hide frame label in case of no content
-m_xHelpImproveLabel->hide();
-#else
-// Store-packaged apps (located under the protected Program 
Files\WindowsApps) can't use normal
-// shell shortcuts to their exe; hide. TODO: show a button to open 
"Startup Apps" system applet?
-if (sal::systools::IsStorePackagedApp())
-m_xQuickStarterFrame->hide();
+#if HAVE_FEATURE_BREAKPAD
+m_xPrivacyFrame->show();
 #endif
 
 #if defined(_WIN32)
+// Store-packaged apps (located under the protected Program 
Files\WindowsApps) can't use normal
+// shell shortcuts to their exe. TODO: show a button to open "Startup 
Apps" system applet?
+if (!sal::systools::IsStorePackagedApp())
+m_xQuickStarterFrame->show();
+
 m_xFileAssocFrame->show();
 m_xFileAssocBtn->connect_clicked(LINK(this, OfaMiscTabPage, 
FileAssocClick));
 #endif
@@ -272,15 +265,15 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 m_xPerformFileExtCheck->get_active(), batch);
 bModified = true;
 }
-#endif
-
-batch->commit();
 
 if( m_xQuickLaunchCB->get_state_changed_from_saved())
 {
 rSet->Put(SfxBoolItem(SID_ATTR_QUICKLAUNCHER, 
m_xQuickLaunchCB->get_active()));
 bModified = true;
 }
+#endif
+
+batch->commit();
 
 return bModified;
 }
@@ -312,10 +305,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 
m_xCrashReport->set_active(officecfg::Office::Common::Misc::CrashReport::get() 
&& CrashReporter::IsDumpEnable());
 
m_xCrashReport->set_sensitive(!officecfg::Office::Common::Misc::CrashReport::isReadOnly()
 && CrashReporter::IsDumpEnable());
 m_xCrashReport->save_state();
-#else
-m_xCrashReport->hide();
 #endif
 
+#if defined(_WIN32)
 const SfxPoolItem* pItem = nullptr;
 SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, 
 );
 if ( SfxItemState::SET == eState )
@@ -328,7 +320,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 
 m_xQuickLaunchCB->save_state();
 
-#if defined(_WIN32)
 m_xPerformFileExtCheck->set_active(
  

[Libreoffice-commits] core.git: 2 commits - cui/source editeng/source include/editeng sw/inc sw/qa sw/source

2023-02-23 Thread Michael Stahl (via logerrit)
 cui/source/inc/paragrph.hxx |3 
 cui/source/tabpages/paragrph.cxx|  230 +
 editeng/source/items/frmitems.cxx   |  953 
 include/editeng/lrspitem.hxx|  256 ++
 sw/inc/format.hxx   |6 
 sw/inc/frmatr.hxx   |   24 
 sw/inc/hintids.hxx  |  185 ++--
 sw/inc/ndtxt.hxx|7 
 sw/inc/swatrset.hxx |   12 
 sw/qa/extras/uiwriter/uiwriter2.cxx |   12 
 sw/source/core/access/accpara.cxx   |7 
 sw/source/core/attr/BorderCacheOwner.cxx|3 
 sw/source/core/bastyp/init.cxx  |   12 
 sw/source/core/crsr/crstrvl.cxx |   13 
 sw/source/core/doc/DocumentStylePoolManager.cxx |  112 +-
 sw/source/core/doc/dbgoutsw.cxx |6 
 sw/source/core/doc/docfmt.cxx   |   14 
 sw/source/core/doc/docnum.cxx   |   10 
 sw/source/core/doc/fmtcol.cxx   |   90 +-
 sw/source/core/edit/autofmt.cxx |   38 
 sw/source/core/inc/frmtool.hxx  |4 
 sw/source/core/layout/fly.cxx   |   11 
 sw/source/core/layout/frmtool.cxx   |   45 -
 sw/source/core/layout/wsfrm.cxx |6 
 sw/source/core/text/EnhancedPDFExportHelper.cxx |6 
 sw/source/core/text/frmcrsr.cxx |   10 
 sw/source/core/text/frmpaint.cxx|   10 
 sw/source/core/text/itratr.cxx  |   11 
 sw/source/core/text/itrcrsr.cxx |   13 
 sw/source/core/text/porfld.cxx  |2 
 sw/source/core/text/porrst.cxx  |4 
 sw/source/core/text/txtfrm.cxx  |2 
 sw/source/core/tox/ToxTabStopTokenHandler.cxx   |   18 
 sw/source/core/txtnode/ndtxt.cxx|   37 
 sw/source/core/txtnode/thints.cxx   |8 
 sw/source/core/unocore/unomapproperties.hxx |   28 
 sw/source/core/unocore/unosrch.cxx  |   12 
 sw/source/filter/html/css1atr.cxx   |   70 +
 sw/source/filter/html/htmlatr.cxx   |   50 -
 sw/source/filter/html/htmlcss1.cxx  |   97 +-
 sw/source/filter/html/htmlctxt.cxx  |   62 +
 sw/source/filter/html/htmldrawreader.cxx|   17 
 sw/source/filter/html/htmlflywriter.cxx |8 
 sw/source/filter/html/htmlform.cxx  |   17 
 sw/source/filter/html/htmlnumreader.cxx |4 
 sw/source/filter/html/htmlplug.cxx  |   17 
 sw/source/filter/html/svxcss1.cxx   |  105 --
 sw/source/filter/html/swhtml.cxx|  125 ++-
 sw/source/filter/html/swhtml.hxx|4 
 sw/source/filter/html/wrthtml.cxx   |2 
 sw/source/filter/ww8/attributeoutputbase.hxx|7 
 sw/source/filter/ww8/docxattributeoutput.cxx|   94 +-
 sw/source/filter/ww8/docxattributeoutput.hxx|8 
 sw/source/filter/ww8/rtfattributeoutput.cxx |   42 -
 sw/source/filter/ww8/rtfattributeoutput.hxx |7 
 sw/source/filter/ww8/wrtw8nds.cxx   |   47 -
 sw/source/filter/ww8/ww8atr.cxx |   81 +-
 sw/source/filter/ww8/ww8attributeoutput.hxx |7 
 sw/source/filter/ww8/ww8par.cxx |   90 +-
 sw/source/filter/ww8/ww8par.hxx |   11 
 sw/source/filter/ww8/ww8par2.cxx|   10 
 sw/source/filter/ww8/ww8par3.cxx|   73 +
 sw/source/filter/ww8/ww8par6.cxx|   55 -
 sw/source/filter/xml/xmlexpit.cxx   |5 
 sw/source/filter/xml/xmlimpit.cxx   |8 
 sw/source/filter/xml/xmlitemm.cxx   |1 
 sw/source/ui/envelp/envfmt.cxx  |5 
 sw/source/uibase/app/docstyle.cxx   |   21 
 sw/source/uibase/shells/textsh1.cxx |   16 
 sw/source/uibase/shells/txtattr.cxx |   13 
 sw/source/uibase/uiview/viewsrch.cxx|3 
 sw/source/uibase/uiview/viewtab.cxx |   77 +
 sw/source/uibase/wrtsh/delete.cxx   |   22 
 73 files changed, 2814 insertions(+), 687 deletions(-)

New commits:
commit db115bec9254417ef7a3faf687478fe5424ab378
Author: Michael Stahl 
AuthorDate: Tue Feb 14 18:03:55 2023 +0100
Commit: Michael Stahl 
CommitDate: Fri Feb 24 07:32:23 2023 +

tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatColl

Leave editengine and non-paragraph usages of SvxLRSpaceItem as-is for now.

Add new items RES_MARGIN_LEFT etc., order them so that paragraphs can
have 3 consecutive items RES_MARGIN_FIRSTLINE..RES_MARGIN_RIGHT and
non-paragraphs also have 2-4 consecutive items
RES_MARGIN_RIGHT..RES_MARGIN_LEFT (only the 3 paragraph ones are
actually used now).

The HTML import filter is particularly annoying 

[Libreoffice-commits] core.git: 2 commits - cui/source include/vcl sc/inc sc/source sfx2/source sw/source vcl/jsdialog vcl/source

2023-01-02 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/scriptdlg.cxx|3 +--
 include/vcl/svapp.hxx   |3 +--
 sc/inc/validat.hxx  |4 
 sc/source/core/data/validat.cxx |   11 +++
 sfx2/source/appl/app.cxx|3 +--
 sw/source/uibase/shells/translatehelper.cxx |9 -
 vcl/jsdialog/jsdialogbuilder.cxx|   10 +++---
 vcl/source/window/builder.cxx   |3 +--
 8 files changed, 30 insertions(+), 16 deletions(-)

New commits:
commit ac738382d63203965e13d3fe6f7745cdea95ea38
Author: Szymon Kłos 
AuthorDate: Fri Dec 2 16:18:02 2022 +0100
Commit: Szymon Kłos 
CommitDate: Tue Jan 3 06:36:09 2023 +

jsdialog: fix validation error dialog in Calc

Change-Id: Ie6551e386cd53f6b4bf4cceb6d7bd6170a2072ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143599
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Rashesh Padia 
Reviewed-by: Aron Budea 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144951
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index fc27b3fbf3b6..a2d798e80a78 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -1327,8 +1327,7 @@ IMPL_STATIC_LINK( SvxScriptErrorDialog, ShowDialog, 
void*, p, void )
 xData->pParent,
 VclMessageType::Warning,
 VclButtonsType::Ok,
-message,
-comphelper::LibreOfficeKit::isActive()));
+message));
 
 xBox->set_title(CuiResId(RID_CUISTR_ERROR_TITLE));
 
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 398358f1bfad..55d7aa87adf2 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1348,8 +1348,7 @@ public:
 static std::unique_ptr CreateInterimBuilder(vcl::Window* 
pParent, const OUString , bool bAllowCycleFocusOut, sal_uInt64 
nLOKWindowId = 0);
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent, 
VclMessageType eMessageType,
-VclButtonsType 
eButtonType, const OUString& rPrimaryMessage,
-bool bMobile = false);
+VclButtonsType 
eButtonType, const OUString& rPrimaryMessage);
 
 static weld::Window* GetFrameWeld(const 
css::uno::Reference& rWindow);
 
diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index 79eb9b75a334..f28da4a1c50b 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -30,6 +30,8 @@ struct RefUpdateContext;
 
 }
 
+namespace vcl { class ILibreOfficeKitNotifier; }
+
 class ScPatternAttr;
 class ScTokenArray;
 class ScTypedStrData;
@@ -80,6 +82,8 @@ private:
 
 using ScConditionEntry::operator==;
 
+DECL_STATIC_LINK(ScValidationData, InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*);
+
 public:
 ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
 const OUString& rExpr1, const OUString& rExpr2,
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 79f21d8de202..08f77ad4f862 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -366,6 +366,11 @@ void ScValidationData::DoCalcError( ScFormulaCell* pCell ) 
const
 DoMacro( pCell->aPos, OUString(), pCell, nullptr );
 }
 
+IMPL_STATIC_LINK_NOARG(ScValidationData, InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*)
+{
+return SfxViewShell::Current();
+}
+
 // true -> abort
 
 bool ScValidationData::DoError(weld::Window* pParent, const OUString& rInput,
@@ -399,12 +404,10 @@ bool ScValidationData::DoError(weld::Window* pParent, 
const OUString& rInput,
 break;
 }
 
-bool bIsMobile = comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current()
-&& SfxViewShell::Current()->isLOKMobilePhone();
-
 std::unique_ptr 
xBox(Application::CreateMessageDialog(pParent, eType,
-  eStyle, aMessage, bIsMobile));
+  eStyle, aMessage));
 xBox->set_title(aTitle);
+xBox->SetInstallLOKNotifierHdl(LINK(nullptr, ScValidationData, 
InstallLOKNotifierHdl));
 
 switch (eErrorStyle)
 {
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 3d3adb84bfe4..f225315d6ecd 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -413,8 +413,7 @@ IMPL_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, 
StarBASIC*, pStarBas
pViewFrame ? pViewFrame->GetFrameWeld() : nullptr,
VclMessageType::Error,
VclButtonsType::Ok,
-   aError,
-   true));
+   aError));
 
 

[Libreoffice-commits] core.git: 2 commits - cui/source include/editeng

2022-12-30 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx |5 +
 include/editeng/editids.hrc|3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 49e5a9d4c49a290eb64399e983ca7810ef4ed8f3
Author: Caolán McNamara 
AuthorDate: Thu Dec 29 19:30:32 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 30 13:07:39 2022 +

SID_ATTR_CHAR_COLOR is a SvxColorItem

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

diff --git a/include/editeng/editids.hrc b/include/editeng/editids.hrc
index a418a3f889b5..b4e717620acf 100644
--- a/include/editeng/editids.hrc
+++ b/include/editeng/editids.hrc
@@ -24,6 +24,7 @@
 class SfxGrabBagItem;
 class SfxUInt16Item;
 class SvxBrushItem;
+class SvxColorItem;
 class SvxFontItem;
 class SvxKerningItem;
 class SvxLanguageItem;
@@ -56,7 +57,7 @@ class SvxWeightItem;
 #define SID_ATTR_CHAR_UNDERLINE 
TypedWhichId( SID_SVX_START + 14 )
 #define SID_ATTR_CHAR_FONTHEIGHT( SID_SVX_START + 15 )
   // free
-#define SID_ATTR_CHAR_COLOR ( SID_SVX_START + 17 )
+#define SID_ATTR_CHAR_COLOR 
TypedWhichId( SID_SVX_START + 17 )
 #define SID_ATTR_CHAR_KERNING   
TypedWhichId( SID_SVX_START + 18 )
 #define SID_ATTR_CHAR_CASEMAP   ( SID_SVX_START + 19 )
 #define SID_ATTR_CHAR_LANGUAGE  ( SID_SVX_START + 20 )
commit 15e5d86cc55ad94ac946e04d5e25b84be5810970
Author: Brett T. Warden 
AuthorDate: Fri Dec 30 08:43:25 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Dec 30 13:07:24 2022 +

Remove dependency on BitArray.h from zxing-1.2.0

In zxing-1.4.0, numerous headers are no longer public. Rework the
ConvertToSVGFormat method so it uses bitmatrix.get instead of
bitmatrix.getRow, similar to the ToSVG method in zxing itself.

See https://github.com/zxing-cpp/zxing-cpp/issues/361

Change-Id: Ie25eb8f782e8799fbd57c24ef79bba92acf0f9ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144874
Tested-by: René Engelhard 
Reviewed-by: René Engelhard 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index f8cbac1d758d..817be7f21ede 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -27,7 +27,6 @@
 #endif
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -79,7 +78,6 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix)
 OStringBuffer sb;
 const int width = bitmatrix.width();
 const int height = bitmatrix.height();
-ZXing::BitArray row(width);
 sb.append("\n"
   "http://www.w3.org/2000/svg\; version=\"1.1\" 
viewBox=\"0 0 "
   + OString::number(width) + " " + OString::number(height)
@@ -87,10 +85,9 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix)
 "

[Libreoffice-commits] core.git: 2 commits - cui/source desktop/source sd/source

2022-12-16 Thread Caolán McNamara (via logerrit)
 cui/source/customize/CustomNotebookbarGenerator.cxx |   13 -
 desktop/source/lib/init.cxx |   12 
 sd/source/ui/docshell/docshel4.cxx  |   15 +--
 sd/source/ui/docshell/docshell.cxx  |4 +---
 sd/source/ui/func/fuexecuteinteraction.cxx  |   11 ++-
 sd/source/ui/slideshow/slideshowimpl.cxx|3 +--
 sd/source/ui/view/drviews2.cxx  |3 +--
 7 files changed, 34 insertions(+), 27 deletions(-)

New commits:
commit 4a9c9488ee918879e89751a15f3ef0fcbbcd2070
Author: Caolán McNamara 
AuthorDate: Thu Dec 15 20:25:27 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 16 10:23:20 2022 +

sd: check SfxViewFrame::Current()

SfxViewFrame::Current() is a festering wound, these ones look like they
were safe anyway, so no need to backport. But with enough checked static
analysis will kick in to flag new unchecked ones.

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

diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 13b08deafa1a..99d6890fe1f0 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -851,12 +851,14 @@ void DrawDocShell::GotoBookmark(std::u16string_view 
rBookmark)
 }
 }
 
-SfxBindings& rBindings = ((pDrawViewShell && 
pDrawViewShell->GetViewFrame()!=nullptr)
+if (SfxViewFrame* pViewFrame = (pDrawViewShell && 
pDrawViewShell->GetViewFrame())
 ? pDrawViewShell->GetViewFrame()
-: SfxViewFrame::Current() )->GetBindings();
-
-rBindings.Invalidate(SID_NAVIGATOR_STATE, true);
-rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
+: SfxViewFrame::Current())
+{
+SfxBindings& rBindings = pViewFrame->GetBindings();
+rBindings.Invalidate(SID_NAVIGATOR_STATE, true);
+rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
+}
 }
 
 /**
@@ -964,7 +966,8 @@ void DrawDocShell::OpenBookmark( const OUString& 
rBookmarkURL )
 SfxStringItem   aStrItem( SID_FILE_NAME, rBookmarkURL );
 SfxStringItem   aReferer( SID_REFERER, GetMedium()->GetName() );
 const SfxPoolItem* ppArgs[] = { , , nullptr };
-( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() 
)->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
+if (SfxViewFrame* pFrame = mpViewShell ? mpViewShell->GetViewFrame() : 
SfxViewFrame::Current())
+pFrame->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
 }
 
 std::shared_ptr 
DrawDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet 
)
diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index 78279687a039..d837092eba68 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -336,9 +336,7 @@ void DrawDocShell::GetState(SfxItemSet )
 nWhich = aIter.NextWhich();
 }
 
-SfxViewFrame* pFrame = SfxViewFrame::Current();
-
-if (pFrame)
+if (SfxViewFrame* pFrame = SfxViewFrame::Current())
 {
 if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN)
 {
diff --git a/sd/source/ui/func/fuexecuteinteraction.cxx 
b/sd/source/ui/func/fuexecuteinteraction.cxx
index d1956fcf5603..6dacef089d56 100644
--- a/sd/source/ui/func/fuexecuteinteraction.cxx
+++ b/sd/source/ui/func/fuexecuteinteraction.cxx
@@ -183,15 +183,16 @@ void FuExecuteInteraction::DoExecute(SfxRequest&)
 
 if (INetProtocol::File == aURL.GetProtocol())
 {
-SfxStringItem aUrl(SID_FILE_NAME,
-   
aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
-SfxBoolItem aBrowsing(SID_BROWSE, true);
+if (SfxViewFrame* pViewFrm = SfxViewFrame::Current())
+{
+SfxStringItem aUrl(SID_FILE_NAME,
+   
aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
+SfxBoolItem aBrowsing(SID_BROWSE, true);
 
-SfxViewFrame* pViewFrm = SfxViewFrame::Current();
-if (pViewFrm)
 pViewFrm->GetDispatcher()->ExecuteList(
 SID_OPENDOC, SfxCallMode::ASYNCHRON | 
SfxCallMode::RECORD,
 { ,  });
+}
 }
 }
 break;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index aa815be59ffa..9e0db0948ba4 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1499,8 +1499,7 @@ void SlideshowImpl::click( const Reference< XShape >& 
xShape )
 SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( 
INetURLObject::DecodeMechanism::NONE ) );
 

[Libreoffice-commits] core.git: 2 commits - cui/source sfx2/source

2022-12-16 Thread Caolán McNamara (via logerrit)
 cui/source/customize/cfg.cxx  |7 +--
 cui/source/dialogs/SpellDialog.cxx|3 +--
 cui/source/dialogs/cuihyperdlg.cxx|3 +--
 cui/source/dialogs/hlmailtp.cxx   |3 +--
 cui/source/dialogs/insdlg.cxx |6 ++
 cui/source/dialogs/tipofthedaydlg.cxx |3 +--
 sfx2/source/appl/app.cxx  |2 +-
 sfx2/source/commandpopup/CommandPopup.cxx |2 ++
 sfx2/source/control/charmapcontrol.cxx|7 +--
 sfx2/source/control/request.cxx   |8 +++-
 10 files changed, 26 insertions(+), 18 deletions(-)

New commits:
commit 56e0b27d39e266be49fac93361944878ff763acd
Author: Caolán McNamara 
AuthorDate: Thu Dec 15 20:17:37 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 16 09:59:06 2022 +

misc: check SfxViewFrame::Current()

SfxViewFrame::Current() is a festering wound, these ones look like they
were safe anyway, so no need to backport. But with enough checked static
analysis will kick in to flag new unchecked ones.

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 2099a1b861c6..91584562a647 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1293,8 +1293,11 @@ OUString SvxConfigPage::GetFrameWithDefaultAndIdentify( 
uno::Reference< frame::X
 _inout_rxFrame = xDesktop->getCurrentFrame();
 }
 
-if ( !_inout_rxFrame.is() && SfxViewFrame::Current() )
-_inout_rxFrame = 
SfxViewFrame::Current()->GetFrame().GetFrameInterface();
+if ( !_inout_rxFrame.is())
+{
+if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
+_inout_rxFrame = pViewFrame->GetFrame().GetFrameInterface();
+}
 
 if ( !_inout_rxFrame.is() )
 {
diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 4ca5bcfe2d17..c01173808aa2 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -715,8 +715,7 @@ void SpellDialog::Close()
 // section - in that case, the cursor can move from the editable field to
 // the protected area, and the slots get disabled because of
 // SfxDisableFlags::SwOnProtectedCursor (see FN_SPELL_GRAMMAR_DIALOG in 
.sdi).
-SfxViewFrame* pViewFrame = SfxViewFrame::Current();
-if (pViewFrame)
+if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
 pViewFrame->ToggleChildWindow(rParent.GetType());
 }
 
diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index 20c1b1e26f85..3352a7a10f5a 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -177,8 +177,7 @@ void SvxHpLinkDlg::Close()
 {
 if (IsClosing())
 return;
-SfxViewFrame* pViewFrame = SfxViewFrame::Current();
-if (pViewFrame)
+if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
 pViewFrame->ToggleChildWindow(SID_HYPERLINK_DIALOG);
 }
 
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 4a099524fed5..4bee51baf721 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -209,8 +209,7 @@ IMPL_LINK_NOARG(SvxHyperlinkMailTp, 
ModifiedReceiverHdl_Impl, weld::ComboBox&, v
 |/
 IMPL_STATIC_LINK_NOARG(SvxHyperlinkMailTp, ClickAdrBookHdl_Impl, 
weld::Button&, void)
 {
-SfxViewFrame* pViewFrame = SfxViewFrame::Current();
-if( pViewFrame )
+if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
 {
 SfxItemPool  = pViewFrame->GetPool();
 SfxRequest aReq(SID_VIEW_DATA_SOURCE_BROWSER, SfxCallMode::SLOT, 
rPool);
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 9e328b00cb04..53488a72e334 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -196,8 +196,7 @@ short SvInsertOleDlg::run()
 
 uno::Reference xProgress;
 OUString aProgressText;
-SfxViewFrame* pFrame = SfxViewFrame::Current();
-if (pFrame)
+if (SfxViewFrame* pFrame = SfxViewFrame::Current())
 {
 // Have a current frame, create a matching 
progressbar, but don't start it yet.
 uno::Reference xFrame
@@ -302,8 +301,7 @@ short SvInsertOleDlg::run()
 // create object from media descriptor
 
 uno::Reference xProgress;
-SfxViewFrame* pFrame = SfxViewFrame::Current();
-if (pFrame)
+if (SfxViewFrame* pFrame = 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2022-12-09 Thread Caolán McNamara (via logerrit)
 cui/source/customize/eventdlg.cxx |1 
 cui/source/customize/macropg.cxx  |   64 
 cui/source/customize/macropg_impl.hxx |1 
 cui/source/inc/macropg.hxx|2 
 cui/uiconfig/ui/eventsconfigpage.ui   |   14 +
 cui/uiconfig/ui/macroassignpage.ui|   90 +++---
 6 files changed, 125 insertions(+), 47 deletions(-)

New commits:
commit e1de95f72b1e6467510f7c3b32b25d7528c93a75
Author: Caolán McNamara 
AuthorDate: Thu Dec 8 16:47:32 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 9 13:53:38 2022 +

Related: tdf#152266 add a remove all button

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

diff --git a/cui/source/customize/eventdlg.cxx 
b/cui/source/customize/eventdlg.cxx
index 7aa67e3f5a81..755fd16b416a 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -44,6 +44,7 @@ SvxEventConfigPage::SvxEventConfigPage(weld::Container* 
pPage, weld::DialogContr
 mpImpl->xEventLB = m_xBuilder->weld_tree_view("events");
 mpImpl->xAssignPB = m_xBuilder->weld_button("macro");
 mpImpl->xDeletePB = m_xBuilder->weld_button("delete");
+mpImpl->xDeleteAllPB = m_xBuilder->weld_button("deleteall");
 mpImpl->xAssignComponentPB = m_xBuilder->weld_button("component");
 
 
mpImpl->xEventLB->set_size_request(mpImpl->xEventLB->get_approximate_digit_width()
 * 70,
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 34eb44849d84..3980c8b6c3f7 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -61,21 +61,20 @@ 
MacroEventListBox::MacroEventListBox(std::unique_ptr xTreeView)
 // and it is not read only
 void SvxMacroTabPage_::EnableButtons()
 {
+mpImpl->xDeleteAllPB->set_sensitive(m_nAssignedEvents != 0);
 int nEvent = mpImpl->xEventLB->get_selected_index();
-if (nEvent != -1)
-{
-const EventPair* pEventPair = 
LookupEvent(mpImpl->xEventLB->get_id(nEvent));
-const bool bAssigned = pEventPair && !pEventPair->second.isEmpty();
-mpImpl->xDeletePB->set_sensitive(!mpImpl->bReadOnly && bAssigned);
-mpImpl->xAssignPB->set_sensitive( !mpImpl->bReadOnly );
-if( mpImpl->xAssignComponentPB )
-mpImpl->xAssignComponentPB->set_sensitive( !mpImpl->bReadOnly );
-}
+const EventPair* pEventPair = nEvent == -1 ? nullptr : 
LookupEvent(mpImpl->xEventLB->get_id(nEvent));
+const bool bAssigned = pEventPair && !pEventPair->second.isEmpty();
+mpImpl->xDeletePB->set_sensitive(!mpImpl->bReadOnly && bAssigned);
+mpImpl->xAssignPB->set_sensitive(!mpImpl->bReadOnly);
+if (mpImpl->xAssignComponentPB)
+mpImpl->xAssignComponentPB->set_sensitive( !mpImpl->bReadOnly );
 }
 
 SvxMacroTabPage_::SvxMacroTabPage_(weld::Container* pPage, 
weld::DialogController* pController, const OUString& rUIXMLDescription,
 const OString& rID, const SfxItemSet& rAttrSet)
 : SfxTabPage(pPage, pController, rUIXMLDescription, rID, )
+, m_nAssignedEvents(0)
 , bDocModified(false)
 , bAppEvents(false)
 , bInitialized(false)
@@ -308,6 +307,7 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents)
 
 mpImpl->xEventLB->freeze();
 mpImpl->xEventLB->clear();
+m_nAssignedEvents = 0;
 EventsHash* eventsHash;
 Reference< container::XNameReplace> nameReplace;
 if(bAppEvents)
@@ -348,6 +348,9 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents)
 mpImpl->xEventLB->append(sEventName, displayName);
 mpImpl->xEventLB->set_image(nRow, GetEventDisplayImage(eventURL), 1);
 mpImpl->xEventLB->set_text(nRow, 
OUString(GetEventDisplayText(eventURL)), 2);
+
+if (!eventURL.isEmpty())
+++m_nAssignedEvents;
 }
 
 mpImpl->xEventLB->thaw();
@@ -427,6 +430,9 @@ void SvxMacroTabPage_::GenericHandler_Impl(const 
weld::Button* pBtn)
 sEventURL = pEventPair->second;
 }
 
+if (!sEventURL.isEmpty())
+--m_nAssignedEvents;
+
 bool bDoubleClick = (pBtn == nullptr);
 bool bUNOAssigned = sEventURL.startsWith( aVndSunStarUNO );
 if (pBtn == mpImpl->xDeletePB.get())
@@ -484,6 +490,9 @@ void SvxMacroTabPage_::GenericHandler_Impl(const 
weld::Button* pBtn)
 h_it->second.second = sEventURL;
 }
 
+if (!sEventURL.isEmpty())
+++m_nAssignedEvents;
+
 rListBox.set_image(nEntry, GetEventDisplayImage(sEventURL), 1);
 rListBox.set_text(nEntry, OUString(GetEventDisplayText(sEventURL)), 2);
 
@@ -493,6 +502,41 @@ void SvxMacroTabPage_::GenericHandler_Impl(const 
weld::Button* pBtn)
 EnableButtons();
 }
 
+IMPL_LINK_NOARG(SvxMacroTabPage_, DeleteAllHdl_Impl, weld::Button&, void)
+{
+OUString sEventType =  "Script" ;
+OUString sEmptyString;
+
+mpImpl->xEventLB->all_foreach([this, , 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2022-12-09 Thread Caolán McNamara (via logerrit)
 cui/source/customize/SvxNotebookbarConfigPage.cxx |7 
 cui/source/customize/cfg.cxx  |2 
 cui/source/inc/cfg.hxx|2 
 cui/uiconfig/ui/menuassignpage.ui |  541 ++
 4 files changed, 265 insertions(+), 287 deletions(-)

New commits:
commit e7f62648f01ba776357e9fcbb9f49c2fb3490ab1
Author: Caolán McNamara 
AuthorDate: Thu Dec 8 20:34:21 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 9 09:05:04 2022 +

make Notebookbar customize page match indent with the others

remove intermediate grids with just one child, name the containers
of the groups of widgets to be hidden and hide the container rather
than the individual members so the container space doesn't push
this page out of alignment with the others.

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

diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 91ce6352ddca..35dc04aacbaa 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -107,14 +107,11 @@ 
SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(weld::Container* pPage,
 m_xDescriptionField->set_visible(false);
 m_xMoveUpButton->set_visible(false);
 m_xMoveDownButton->set_visible(false);
-m_xAddCommandButton->set_visible(false);
-m_xRemoveCommandButton->set_visible(false);
+m_xCommandButtons->set_visible(false);
 m_xLeftFunctionLabel->set_visible(false);
 m_xSearchLabel->set_visible(false);
 m_xCategoryLabel->set_visible(false);
-m_xInsertBtn->set_visible(false);
-m_xModifyBtn->set_visible(false);
-m_xResetBtn->set_visible(false);
+m_xCustomizeBox->set_visible(false);
 m_xCustomizeLabel->set_visible(false);
 
 weld::TreeView& rCommandCategoryBox = m_xFunctions->get_widget();
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 030307879738..fe59621c1c4b 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1009,9 +1009,11 @@ SvxConfigPage::SvxConfigPage(weld::Container* pPage, 
weld::DialogController* pCo
 , m_xMoveUpButton(m_xBuilder->weld_button("up"))
 , m_xMoveDownButton(m_xBuilder->weld_button("down"))
 , m_xSaveInListBox(m_xBuilder->weld_combo_box("savein"))
+, m_xCustomizeBox(m_xBuilder->weld_widget("customizebox"))
 , m_xInsertBtn(m_xBuilder->weld_menu_button("insert"))
 , m_xModifyBtn(m_xBuilder->weld_menu_button("modify"))
 , m_xResetBtn(m_xBuilder->weld_button("defaultsbtn"))
+, m_xCommandButtons(m_xBuilder->weld_widget("arrowgrid"))
 , m_xAddCommandButton(m_xBuilder->weld_button("add"))
 , m_xRemoveCommandButton(m_xBuilder->weld_button("remove"))
 {
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 87b17b1c912f..10ce7d89af7b 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -411,12 +411,14 @@ protected:
 
 std::unique_ptrm_xSaveInListBox;
 
+std::unique_ptr  m_xCustomizeBox;
 std::unique_ptr  m_xInsertBtn;
 std::unique_ptr  m_xModifyBtn;
 // Used to reset the selected toolbar/menu/context menu
 std::unique_ptr  m_xResetBtn;
 
 // Middle buttons
+std::unique_ptr  m_xCommandButtons;
 std::unique_ptr  m_xAddCommandButton;
 std::unique_ptr  m_xRemoveCommandButton;
 
diff --git a/cui/uiconfig/ui/menuassignpage.ui 
b/cui/uiconfig/ui/menuassignpage.ui
index b67c24b24f1f..b545c193a352 100644
--- a/cui/uiconfig/ui/menuassignpage.ui
+++ b/cui/uiconfig/ui/menuassignpage.ui
@@ -674,7 +674,7 @@
   
 
 
-  
+  
 True
 False
 5
@@ -762,7 +762,7 @@
 
 
   
-  
+  
 True
 False
 center
@@ -770,32 +770,20 @@
 6
 6
 
-  
-  
+  
 True
-False
-5
-
-  
-True
-True
-True
-Add item
-center
-start
-5
-image3
-True
-
-  
-Click on the right 
arrow button to select a function on the left display box and copy to the right 
display box. This will add the function to the selected menu.
-  
-
+True
+True
+Add item
+center
+start
+10
+  

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2022-12-08 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/macroass.cxx|3 
 cui/uiconfig/ui/eventassignpage.ui  |  136 ++--
 cui/uiconfig/ui/eventsconfigpage.ui |   94 
 3 files changed, 118 insertions(+), 115 deletions(-)

New commits:
commit c2c7c378ff8c1e3ba12420aa75189b9b1fe8515b
Author: Caolán McNamara 
AuthorDate: Thu Dec 8 16:53:47 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 8 19:44:28 2022 +

update assign/delete state after positioning cursor in treeview

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

diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index e80e471ff228..baff7c87b0ae 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -221,7 +221,10 @@ void SfxMacroTabPage::Reset( const SfxItemSet* rSet )
 weld::TreeView& rListBox = mpImpl->m_xEventLB->GetListBox();
 std::unique_ptr xIter(rListBox.make_iterator());
 if (rListBox.get_iter_first(*xIter))
+{
 rListBox.set_cursor(*xIter);
+EnableButtons();
+}
 }
 
 bool SfxMacroTabPage::IsReadOnly() const
commit 9fc0e4fa50e22c464dde702fcaa25420fa5ce5a4
Author: Caolán McNamara 
AuthorDate: Thu Dec 8 16:33:57 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 8 19:44:18 2022 +

resave with latest glade

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

diff --git a/cui/uiconfig/ui/eventassignpage.ui 
b/cui/uiconfig/ui/eventassignpage.ui
index 78bf01cc4d92..86f0a7044ef0 100644
--- a/cui/uiconfig/ui/eventassignpage.ui
+++ b/cui/uiconfig/ui/eventassignpage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -32,43 +32,43 @@
   
 
   
-  
+  
   
 True
-False
+False
 True
 True
-6
-12
-12
-True
+6
+12
+12
+True
 
   
 True
-False
+False
 True
 True
-0
-none
+0
+none
 
   
 True
-True
-True
-True
-in
+True
 12
 6
+True
+True
+in
 
   
 True
-True
-True
+True
+True
 True
 True
 liststore3
-0
-False
+0
+False
 
   
 
@@ -110,7 +110,7 @@
 
   
 True
-False
+False
 Assignments
 
   
@@ -119,25 +119,25 @@
 
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 vertical
 6
-start
+start
 
   
 Assign
 True
 False
-True
-True
-True
+True
+True
+True
 
   
 Assigns the 
selected macro to the selected event.
@@ -154,9 +154,9 @@
   
 Remove
 True
-True
-True
-True
+True
+True
+True
 
   
 Removes the 
macro assignment from the selected entry.
@@ -171,47 +171,47 @@
 
   
   
-1
-0
+1
+0
 2
   
 
 
-  
+  
   
 True
-False
-6
-True
+False
+6
+True
 
   
 True
-False
+False
 True
 True
-0
-none
+0
+none
 
   
 True
-True
-True
-True
-in
+True
 12
 6
+True
+True
+in
 
   
--1
+-1
 True
-True
-True
+True
+True
 True
 True
 liststore1
-False
-1
-True
+False
+1
+True
 
   
 
@@ -244,7 +244,7 @@
 
   
 True
-   

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig vcl/unx

2022-12-08 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx  |   10 +++-
 cui/source/inc/QrCodeGenDialog.hxx  |2 
 cui/uiconfig/ui/qrcodegen.ui|   80 ++--
 vcl/unx/generic/gdi/cairotextrender.cxx |6 ++
 4 files changed, 62 insertions(+), 36 deletions(-)

New commits:
commit ebc7e13c0a79dbc5f21e78bcd9bb63a58c585f4a
Author: Caolán McNamara 
AuthorDate: Thu Dec 8 11:00:00 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 8 13:57:49 2022 +

Resolves: tdf#146395 allow newlines in QR Codes

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

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 3e7b48e7af86..e028d4d10e94 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -156,7 +156,7 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
  bool bEditExisting)
 : GenericDialogController(pParent, "cui/ui/qrcodegen.ui", 
"QrCodeGenDialog")
 , m_xModel(std::move(xModel))
-, m_xEdittext(m_xBuilder->weld_entry("edit_text"))
+, m_xEdittext(m_xBuilder->weld_text_view("edit_text"))
 , m_xECC{ m_xBuilder->weld_radio_button("button_low"),
   m_xBuilder->weld_radio_button("button_medium"),
   m_xBuilder->weld_radio_button("button_quartile"),
@@ -167,16 +167,22 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
 , mpParent(pParent)
 #endif
 {
+m_xEdittext->set_size_request(m_xEdittext->get_approximate_digit_width() * 
28,
+  m_xEdittext->get_height_rows(6));
 if (!bEditExisting)
 {
+OUString sSelection;
 // TODO: This only works in Writer doc. Should also work in shapes
 Reference xSelections(m_xModel->getCurrentSelection(), 
UNO_QUERY);
 if (xSelections.is())
 {
 Reference xSelection(xSelections->getByIndex(0), 
UNO_QUERY);
 if (xSelection.is())
-m_xEdittext->set_text(xSelection->getString());
+sSelection = xSelection->getString();
 }
+if (!sSelection.isEmpty())
+m_xEdittext->set_text(sSelection);
+m_xEdittext->select_region(0, -1);
 return;
 }
 
diff --git a/cui/source/inc/QrCodeGenDialog.hxx 
b/cui/source/inc/QrCodeGenDialog.hxx
index 2c205c6a85d4..001df88c5581 100644
--- a/cui/source/inc/QrCodeGenDialog.hxx
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -30,7 +30,7 @@ protected:
 
 private:
 css::uno::Reference m_xModel;
-std::unique_ptr m_xEdittext;
+std::unique_ptr m_xEdittext;
 std::unique_ptr m_xECC[4];
 std::unique_ptr m_xSpinBorder;
 std::unique_ptr m_xComboType;
diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui
index 4f015dccfde3..7078e3aa44a5 100644
--- a/cui/uiconfig/ui/qrcodegen.ui
+++ b/cui/uiconfig/ui/qrcodegen.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -8,9 +8,12 @@
 1
 10
   
+  
+www.libreoffice.org
+  
   
-False
-6
+False
+6
 QR and Barcode
 True
 0
@@ -95,43 +98,27 @@
 True
 False
 True
+True
 0
 none
 
-  
+  
   
 True
 False
 6
+True
+True
 6
 12
-
-  
-True
-True
-True
-True
-True
-www.libreoffice.org
-
-  
-The text from which to generate the 
code.
-  
-
-  
-  
-1
-0
-  
-
 
   
 True
 False
 start
+start
 URL/Text:
 True
-edit_text
 0
   
   
@@ -157,22 +144,22 @@
 
   
 True
-False
+False
 start
 Type:
-True
-choose_type
+True
+choose_type
 0
   
  

[Libreoffice-commits] core.git: 2 commits - cui/source include/svx svx/inc svx/source

2022-12-07 Thread Caolán McNamara (via logerrit)
 cui/source/options/optcolor.cxx|   29 -
 include/svx/Palette.hxx|5 +
 include/svx/PaletteManager.hxx |4 
 include/svx/colorbox.hxx   |6 --
 svx/inc/palettes.hxx   |9 +
 svx/source/tbxctrls/Palette.cxx|   15 +++
 svx/source/tbxctrls/PaletteManager.cxx |   19 +++
 svx/source/tbxctrls/tbcontrl.cxx   |   22 ++
 8 files changed, 90 insertions(+), 19 deletions(-)

New commits:
commit d327a3bf45808fc7575b7fffa681314e50b0adf8
Author: Caolán McNamara 
AuthorDate: Wed Dec 7 16:00:28 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 7 22:58:09 2022 +

Resolves: tdf#152301 allow using an existing ColorListBox to speed init

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

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 42c299de3f0b..70345fc5e40f 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -208,20 +208,18 @@ private:
 
 // Entry -- a color config entry:
 // text (checkbox) + color list box
-class Entry
+struct Entry
 {
-public:
 Entry(weld::Window* pTopLevel, weld::Builder& rBuilder, const char* 
pTextWidget, const char* pColorWidget,
-  const Color& rColor, int nCheckBoxLabelOffset, int* 
pColorWidthRequest, bool bCheckBox, bool bShow);
-public:
+  const Color& rColor, int nCheckBoxLabelOffset, const 
ColorListBox* pCache, bool bCheckBox, bool bShow);
 void SetText(const OUString& rLabel) { 
dynamic_cast(*m_xText).set_label(rLabel); }
 int get_height_request() const
 {
 return std::max(m_xText->get_preferred_size().Height(),
 
m_xColorList->get_widget().get_preferred_size().Height());
 }
-void Hide ();
-public:
+void Hide();
+
 void SetLinks(Link const&,
   Link const&,
   Link const&);
@@ -229,10 +227,10 @@ private:
 void Update (ExtendedColorConfigValue const&);
 void ColorChanged (ColorConfigValue&);
 void ColorChanged (ExtendedColorConfigValue&);
-public:
+
 bool Is(const weld::Toggleable* pBox) const { return m_xText.get() == 
pBox; }
 bool Is(const ColorListBox* pBox) const { return m_xColorList.get() == 
pBox; }
-private:
+
 // checkbox (CheckBox) or simple text (FixedText)
 std::unique_ptr m_xText;
 // color list box
@@ -285,9 +283,9 @@ ColorConfigWindow_Impl::Chapter::Chapter(weld::Builder& 
rBuilder, const char* pL
 ColorConfigWindow_Impl::Entry::Entry(weld::Window* pTopLevel, weld::Builder& 
rBuilder,
  const char* pTextWidget, const char* 
pColorWidget,
  const Color& rColor, int 
nCheckBoxLabelOffset,
- int* pColorWidthRequestCache, bool 
bCheckBox, bool bShow)
+ const ColorListBox* pCache, bool 
bCheckBox, bool bShow)
 : m_xColorList(new ColorListBox(rBuilder.weld_menu_button(pColorWidget),
-[pTopLevel]{ return pTopLevel; }, 
pColorWidthRequestCache))
+[pTopLevel]{ return pTopLevel; }, pCache))
 , m_aDefaultColor(rColor)
 {
 if (bCheckBox)
@@ -405,7 +403,7 @@ void ColorConfigWindow_Impl::CreateEntries()
 m_nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width();
 }
 
-int nColorWidthRequestCache = -1;
+const ColorListBox* pCache = nullptr;
 
 // creating entries
 vEntries.reserve(ColorConfigEntryCount);
@@ -414,9 +412,11 @@ void ColorConfigWindow_Impl::CreateEntries()
 vEntries.push_back(std::make_shared(m_pTopLevel, *m_xBuilder,
 vEntryInfo[i].pText, vEntryInfo[i].pColor,
 ColorConfig::GetDefaultColor(static_cast(i)),
-m_nCheckBoxLabelOffset, ,
+m_nCheckBoxLabelOffset, pCache,
 vEntryInfo[i].bCheckBox,
 aModulesInstalled[vEntryInfo[i].eGroup]));
+if (!pCache)
+pCache = vEntries.back()->m_xColorList.get();
 }
 
 // extended entries
@@ -448,7 +448,7 @@ void ColorConfigWindow_Impl::CreateEntries()
 aExtConfig.GetComponentColorConfigValue(sComponentName, i);
 vEntries.push_back(std::make_shared(m_pTopLevel, 
*vExtBuilders.back(),
 "label", "button", aColorEntry.getDefaultColor(),
-m_nCheckBoxLabelOffset, , false, 
true));
+m_nCheckBoxLabelOffset, pCache, false, true));
 vEntries.back()->SetText(aColorEntry.getDisplayName());
 }
 }
diff --git 

[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/vcl sc/source sfx2/source vcl/jsdialog

2022-11-21 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/passwdomdlg.cxx   |8 +++-
 cui/source/factory/dlgfact.cxx   |5 +
 cui/source/factory/dlgfact.hxx   |1 +
 cui/source/inc/passwdomdlg.hxx   |2 ++
 include/sfx2/filedlghelper.hxx   |5 +++--
 include/vcl/abstdlg.hxx  |1 +
 sc/source/ui/inc/delcodlg.hxx|1 -
 sc/source/ui/miscdlgs/delcodlg.cxx   |1 -
 sfx2/source/dialog/dinfdlg.cxx   |4 +++-
 sfx2/source/dialog/filedlghelper.cxx |   15 ++-
 vcl/jsdialog/enabled.cxx |3 ++-
 11 files changed, 38 insertions(+), 8 deletions(-)

New commits:
commit 5762aa5c0efb75e8b7713b4c2ee8bd9300fc06cf
Author: Szymon Kłos 
AuthorDate: Thu Nov 17 21:40:54 2022 +0100
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 12:36:50 2022 +0100

jsdialog: enable Delete content dialog

Dialog had unused m_xBtnOk which has defined standard
response in .ui file - no need to bind anything in the code.

Change-Id: Ie743485bb30a03b82a87dc69015a704e14c39384
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142903
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142993
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index c23deed4fcc6..7c49a79f9d33 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -35,7 +35,6 @@ private:
 std::unique_ptr m_xBtnDelNotes;
 std::unique_ptr m_xBtnDelAttrs;
 std::unique_ptr m_xBtnDelObjects;
-std::unique_ptr m_xBtnOk;
 
 static bool bPreviousAllCheck;
 static InsertDeleteFlags nPreviousChecks;
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx 
b/sc/source/ui/miscdlgs/delcodlg.cxx
index 9d804c252419..56334ba9ca9c 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -37,7 +37,6 @@ ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* 
pParent)
 , m_xBtnDelNotes(m_xBuilder->weld_check_button("comments"))
 , m_xBtnDelAttrs(m_xBuilder->weld_check_button("formats"))
 , m_xBtnDelObjects(m_xBuilder->weld_check_button("objects"))
-, m_xBtnOk(m_xBuilder->weld_button("ok"))
 {
 m_xBtnDelAll->set_active( ScDeleteContentsDlg::bPreviousAllCheck );
 m_xBtnDelStrings->set_active( bool(InsertDeleteFlags::STRING & 
ScDeleteContentsDlg::nPreviousChecks) );
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 375023636916..47d8e0e08df5 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -73,7 +73,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/insertcaption.ui"
 || rUIFile == u"modules/swriter/ui/captionoptions.ui"
 || rUIFile == u"cui/ui/formatnumberdialog.ui" || rUIFile == 
u"cui/ui/password.ui"
-|| rUIFile == u"cui/ui/numberingformatpage.ui")
+|| rUIFile == u"cui/ui/numberingformatpage.ui"
+|| rUIFile == u"modules/scalc/ui/deletecontents.ui")
 {
 return true;
 }
commit 58ae6705deccb614f33d20bfa4b2ab0923d426e1
Author: Szymon Kłos 
AuthorDate: Fri Oct 14 14:54:15 2022 +0200
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 12:36:35 2022 +0100

lok: allow password reset in properties>change password

Change-Id: I92a3c658e96f602549ff5282b6ed5bc9ee780bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141372
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142992
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index 163f3961f22e..579af0edc9aa 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -24,7 +24,7 @@
 
 IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void)
 {
-bool bInvalidState = !m_xOpenReadonlyCB->get_active() &&
+bool bInvalidState = !m_xOpenReadonlyCB->get_active() && !m_bAllowEmpty &&
 m_xPasswdToOpenED->get_text().isEmpty() &&
 m_xPasswdToModifyED->get_text().isEmpty();
 if (bInvalidState)
@@ -107,6 +107,7 @@ 
PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s
 , m_aInvalidStateForOkButton_v2( CuiResId( 
RID_CUISTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) )
 , m_nMaxPasswdLen(nMaxPasswdLen)
 , m_bIsPasswordToModify( bIsPasswordToModify )
+, m_bAllowEmpty( false )
 {
 m_xOk->connect_clicked(LINK(this, PasswordToOpenModifyDialog, 
OkBtnClickHdl));
 
@@ -145,6 +146,11 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
 }
 }
 
+void PasswordToOpenModifyDialog::AllowEmpty()
+{
+m_bAllowEmpty = true;
+}
+
 OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const
 {
 const bool bPasswdOk =
diff --git 

[Libreoffice-commits] core.git: 2 commits - cui/source sd/qa

2022-09-23 Thread Xisco Fauli (via logerrit)
 cui/source/customize/cfgutil.cxx |2 -
 sd/qa/unit/uiimpress.cxx |   40 ++-
 2 files changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 60705295aec404b7f476dfdce3d35bf8cabb4c17
Author: Xisco Fauli 
AuthorDate: Fri Sep 23 16:14:22 2022 +0200
Commit: Xisco Fauli 
CommitDate: Fri Sep 23 17:49:26 2022 +0200

CppunitTest_sd_uiimpress: use utf-16

Change-Id: Idd22956c1b5412d7bb02fd99fd2e3ee54284c4bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140491
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 3642bef710eb..3d2574da0b82 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -67,9 +67,9 @@ public:
 virtual void tearDown() override;
 
 void checkCurrentPageNumber(sal_uInt16 nNum);
-void typeString(SdXImpressDocument* rImpressDocument, const std::string& 
rStr);
+void typeString(SdXImpressDocument* rImpressDocument, const 
std::u16string_view& rStr);
 void typeKey(SdXImpressDocument* rImpressDocument, const sal_uInt16 nKey);
-void insertStringToObject(sal_uInt16 nObj, const std::string& rStr, bool 
bUseEscape);
+void insertStringToObject(sal_uInt16 nObj, const std::u16string_view& 
rStr, bool bUseEscape);
 sd::slidesorter::SlideSorterViewShell* getSlideSorterViewShell();
 FileFormat* getFormat(sal_Int32 nExportType);
 void save(sd::DrawDocShell* pShell, FileFormat const* pFormat, 
utl::TempFile const& rTempFile);
@@ -109,9 +109,10 @@ void SdUiImpressTest::typeKey(SdXImpressDocument* 
rImpressDocument, const sal_uI
 Scheduler::ProcessEventsToIdle();
 }
 
-void SdUiImpressTest::typeString(SdXImpressDocument* rImpressDocument, const 
std::string& rStr)
+void SdUiImpressTest::typeString(SdXImpressDocument* rImpressDocument,
+ const std::u16string_view& rStr)
 {
-for (const char c : rStr)
+for (const char16_t c : rStr)
 {
 rImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, c, 0);
 rImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, c, 0);
@@ -119,7 +120,7 @@ void SdUiImpressTest::typeString(SdXImpressDocument* 
rImpressDocument, const std
 }
 }
 
-void SdUiImpressTest::insertStringToObject(sal_uInt16 nObj, const std::string& 
rStr,
+void SdUiImpressTest::insertStringToObject(sal_uInt16 nObj, const 
std::u16string_view& rStr,
bool bUseEscape)
 {
 auto pImpressDocument = 
dynamic_cast(mxComponent.get());
@@ -457,7 +458,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126605)
 dispatchCommand(mxComponent, ".uno:InsertPage", {});
 Scheduler::ProcessEventsToIdle();
 
-insertStringToObject(0, "Test", /*bUseEscape*/ false);
+insertStringToObject(0, u"Test", /*bUseEscape*/ false);
 
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
 uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
@@ -505,7 +506,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf100950)
 dispatchCommand(mxComponent, ".uno:InsertPage", {});
 Scheduler::ProcessEventsToIdle();
 
-insertStringToObject(0, "Test", /*bUseEscape*/ true);
+insertStringToObject(0, u"Test", /*bUseEscape*/ true);
 
 dispatchCommand(mxComponent, ".uno:Undo", {});
 Scheduler::ProcessEventsToIdle();
@@ -611,17 +612,17 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf148620)
 uno::Reference xShape(xDrawPage->getByIndex(1), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(OUString(u""), xShape->getString());
 
-insertStringToObject(1, "one", /*bUseEscape*/ false);
+insertStringToObject(1, u"one", /*bUseEscape*/ false);
 typeKey(pXImpressDocument, KEY_RETURN);
-typeString(pXImpressDocument, "two");
+typeString(pXImpressDocument, u"two");
 typeKey(pXImpressDocument, KEY_RETURN);
-typeString(pXImpressDocument, "three");
+typeString(pXImpressDocument, u"three");
 typeKey(pXImpressDocument, KEY_RETURN);
-typeString(pXImpressDocument, "four");
+typeString(pXImpressDocument, u"four");
 typeKey(pXImpressDocument, KEY_RETURN);
-typeString(pXImpressDocument, "five");
+typeString(pXImpressDocument, u"five");
 typeKey(pXImpressDocument, KEY_RETURN);
-typeString(pXImpressDocument, "six");
+typeString(pXImpressDocument, u"six");
 
 CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nThree\nFour\nFive\nsix"), 
xShape->getString());
 
@@ -699,12 +700,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf141703)
 Scheduler::ProcessEventsToIdle();
 }
 
-typeString(pXImpressDocument, "A");
+typeString(pXImpressDocument, u"A");
 
 // Move to A2 with Tab and write 'B'
 typeKey(pXImpressDocument, KEY_TAB);
 
-typeString(pXImpressDocument, "B");
+typeString(pXImpressDocument, u"B");
 
 typeKey(pXImpressDocument, KEY_ESCAPE);
 
@@ -886,10 +887,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 

[Libreoffice-commits] core.git: 2 commits - cui/source sw/source

2022-03-04 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuigaldlg.cxx |5 ++---
 sw/source/filter/ww8/wrtww8.cxx  |2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 9007ca10a3f2e11fabcd7bed74cf28da2920ce2f
Author: Caolán McNamara 
AuthorDate: Fri Mar 4 15:19:01 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 4 22:36:45 2022 +0100

cid#1500569 (likely) silence Explicit null dereferenced

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

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0274944d26d6..63b27a2af334 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3728,7 +3728,7 @@ ErrCode SwWW8Writer::WriteStorage()
 
xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext(
 "com.sun.star.comp.oox.crypto." + sCryptoType, 
aArguments, xComponentContext), uno::UNO_QUERY);
 
-if (xPackageEncryption.is())
+if (xPackageEncryption)
 {
 // We have an encryptor
 // Create new temporary storage for content
commit 4ffb36265312f18e4c382fc6ff8940c5cdf268ca
Author: Caolán McNamara 
AuthorDate: Fri Mar 4 15:11:38 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 4 22:36:30 2022 +0100

cid#1500632 Using a moved object

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 559e878ce25c..fd1f4a36e10d 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -334,7 +334,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 if( !aRemoveEntries[ i ] )
 aRemainingVector.push_back( m_pTabPage->aFoundList[i] );
 
-m_pTabPage->aFoundList = std::move(aRemainingVector);
+std::swap(m_pTabPage->aFoundList, aRemainingVector);
+aRemainingVector.clear();
 
 // refill list box
 for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i )
@@ -342,10 +343,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 aRemainingVector.push_back(m_pTabPage->m_xLbxFound->get_text(i));
 
 m_pTabPage->m_xLbxFound->clear();
-
 for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i )
 m_pTabPage->m_xLbxFound->append_text(aRemainingVector[i]);
-
 aRemainingVector.clear();
 
 m_pTabPage->m_xLbxFound->thaw();


[Libreoffice-commits] core.git: 2 commits - cui/source

2022-02-13 Thread Tomaž Vajngerl (via logerrit)
 cui/source/inc/grfpage.hxx  |   14 ++--
 cui/source/tabpages/grfpage.cxx |  129 
 2 files changed, 72 insertions(+), 71 deletions(-)

New commits:
commit 58ac3288b5a4a1f1f9b21fed4f4c1ab06dd43db9
Author: Tomaž Vajngerl 
AuthorDate: Mon Feb 14 09:11:05 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Feb 14 03:25:19 2022 +0100

cui: show image pixel size below logic size

Change-Id: If919d1fade2ed85aec7437b429a648ca658e2c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129885
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 33bc69b81f49..158e6b2b1e79 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -665,6 +665,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
  }
  sTemp += " " + CuiResId(RID_CUISTR_PPI).replaceAll("%1", sPPI);
 }
+sTemp += "\n" + OUString::number(m_aOrigPixelSize.Width()) + u"\u00D7" 
+ OUString::number(m_aOrigPixelSize.Height()) + " px";
 m_xOrigSizeFT->set_label(sTemp);
 }
 
commit ace0adfd2312211854a61fdc0aa60c1ba9c4d446
Author: Tomaž Vajngerl 
AuthorDate: Sat Feb 12 14:57:37 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Feb 14 03:25:08 2022 +0100

cui: prefix member variables of SvxGrfCropPage class

Change-Id: If6f4a32df97c352d30958fb27dc90ffec5bbf44d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129884
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 2c7017a57189..adfaebc33595 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -49,13 +49,13 @@ class SvxGrfCropPage : public SfxTabPage
 {
 friend class VclPtr;
 
-OUStringaGraphicName;
-SizeaOrigSize;
-SizeaOrigPixelSize;
-SizeaPageSize;
-tools::LongnOldWidth;
-tools::LongnOldHeight;
-boolbSetOrigSize;
+OUString m_aGraphicName;
+Size m_aOrigSize;
+Size m_aOrigPixelSize;
+Size m_aPageSize;
+tools::Long m_nOldWidth;
+tools::Long m_nOldHeight;
+bool m_bSetOrigSize;
 sal_Int32 m_aPreferredDPI;
 
 SvxCropExample m_aExampleWN;
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 8eb5608c966f..33bc69b81f49 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -55,9 +55,9 @@ static int lcl_GetValue(const weld::MetricSpinButton& 
rMetric, FieldUnit eUnit)
 
 SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet )
 : SfxTabPage(pPage, pController, "cui/ui/croppage.ui", "CropPage", )
-, nOldWidth(0)
-, nOldHeight(0)
-, bSetOrigSize(false)
+, m_nOldWidth(0)
+, m_nOldHeight(0)
+, m_bSetOrigSize(false)
 , m_aPreferredDPI(0)
 , m_xCropFrame(m_xBuilder->weld_widget("cropframe"))
 , m_xZoomConstRB(m_xBuilder->weld_radio_button("keepscale"))
@@ -167,17 +167,17 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
 // orientation and size from the PageItem
 FieldUnit eUnit = MapToFieldUnit( rSet->GetPool()->GetMetric( nW ));
 
-aPageSize = static_cast(pItem)->GetSize();
+m_aPageSize = static_cast(pItem)->GetSize();
 
 auto nMin = m_xWidthMF->normalize( 23 );
-auto nMax = m_xHeightMF->normalize(aPageSize.Height());
+auto nMax = m_xHeightMF->normalize(m_aPageSize.Height());
 m_xHeightMF->set_range(nMin, nMax, eUnit);
-nMax = m_xWidthMF->normalize(aPageSize.Width());
+nMax = m_xWidthMF->normalize(m_aPageSize.Width());
 m_xWidthMF->set_range(nMin, nMax, eUnit);
 }
 else
 {
-aPageSize = OutputDevice::LogicToLogic(
+m_aPageSize = OutputDevice::LogicToLogic(
 Size( CM_1_TO_TWIP,  CM_1_TO_TWIP ),
 MapMode( MapUnit::MapTwip ),
 MapMode( rSet->GetPool()->GetMetric( nW ) ) );
@@ -195,21 +195,21 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
 const Graphic* pGrf = static_cast(pItem)->GetGraphic(referer);
 if( pGrf )
 {
-aOrigSize = GetGrfOrigSize( *pGrf );
-if (pGrf->GetType() == GraphicType::Bitmap && aOrigSize.Width() && 
aOrigSize.Height())
+m_aOrigSize = GetGrfOrigSize( *pGrf );
+if (pGrf->GetType() == GraphicType::Bitmap && m_aOrigSize.Width() 
&& m_aOrigSize.Height())
 {
-aOrigPixelSize = pGrf->GetSizePixel();
+m_aOrigPixelSize = pGrf->GetSizePixel();
 }
 
-if( aOrigSize.Width() && aOrigSize.Height() )
+if( m_aOrigSize.Width() && m_aOrigSize.Height() )
 {
 

[Libreoffice-commits] core.git: 2 commits - cui/source sc/inc sc/source

2022-01-10 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/grfpage.cxx  |5 +++--
 sc/inc/document.hxx  |6 +++---
 sc/source/core/data/documen2.cxx |2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit b15010fdfafeae9a6b22998852f0dafd8bf0d3ce
Author: Tomaž Vajngerl 
AuthorDate: Mon Jan 10 17:23:50 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 10 13:51:47 2022 +0100

sc: fix typo

Change-Id: If9a8f7265c17dafa99b51fe6266d935afedfa394
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128207
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 07f488df346d..fa13b7b890e4 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -558,7 +558,7 @@ private:
 bool mbEmbedFontScriptAsian : 1;
 bool mbEmbedFontScriptComplex : 1;
 
-sal_Int32 mnImagenPreferredDPI;
+sal_Int32 mnImagePreferredDPI;
 
 std::unique_ptr m_pIconSetBitmapMap;
 
@@ -585,8 +585,8 @@ public:
 void SetEmbedFontScriptAsian(bool bUse) { mbEmbedFontScriptAsian = bUse; }
 void SetEmbedFontScriptComplex(bool bUse) { mbEmbedFontScriptComplex = 
bUse; }
 
-void SetImagePreferredDPI(sal_Int32 nValue) { mnImagenPreferredDPI = 
nValue; }
-sal_Int32 GetImagePreferredDPI() { return mnImagenPreferredDPI; }
+void SetImagePreferredDPI(sal_Int32 nValue) { mnImagePreferredDPI = 
nValue; }
+sal_Int32 GetImagePreferredDPI() { return mnImagePreferredDPI; }
 
 SC_DLLPUBLIC sal_uLong   GetCellCount() const;   // all cells
 SC_DLLPUBLIC sal_uLong   GetFormulaGroupCount() const;   // all cells
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 48bd7737dcfe..67f6e9d7ca41 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -177,7 +177,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, 
SfxObjectShell* pDocShell ) :
 mbEmbedFontScriptLatin(true),
 mbEmbedFontScriptAsian(true),
 mbEmbedFontScriptComplex(true),
-mnImagenPreferredDPI(0),
+mnImagePreferredDPI(0),
 mbTrackFormulasPending(false),
 mbFinalTrackFormulas(false),
 mbDocShellRecalc(false),
commit 1126212885ee2d1ba0fd5e48bdb5f6e9d99e0302
Author: Tomaž Vajngerl 
AuthorDate: Mon Jan 10 17:20:43 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 10 13:51:26 2022 +0100

cui: no need to fetch the property from the map twice

Change-Id: I7597c352b2ae166657f1e431e3405fc690520afa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128206
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 9fd58548516e..f18b2aa006fd 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -290,8 +290,9 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
 #endif
 
 auto& aProperties = getAdditionalProperties();
-if (aProperties.find("PreferredDPI") != aProperties.end())
-m_aPreferredDPI = aProperties.at("PreferredDPI").get();
+auto aIterator = aProperties.find("PreferredDPI");
+if (aIterator != aProperties.end())
+m_aPreferredDPI = aIterator->second.get();
 
 bSetOrigSize = false;
 


[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/svx officecfg/registry sd/inc sd/Library_sd.mk sd/sdi sd/source sd/uiconfig svx/Library_svx.mk svx/sdi svx/source svx/uiconf

2021-12-19 Thread Tomaž Vajngerl (via logerrit)
 cui/source/inc/grfpage.hxx   |3 
 cui/source/tabpages/grfpage.cxx  |   32 +
 include/sfx2/sfxsids.hrc |1 
 include/svx/GenericCheckDialog.hxx   |   83 +++
 include/svx/strings.hrc  |7 
 include/svx/svdmodel.hxx |2 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 
 sd/Library_sd.mk |1 
 sd/inc/drawdoc.hxx   |2 
 sd/sdi/_drvwsh.sdi   |5 
 sd/source/ui/inc/tools/GraphicSizeCheck.hxx  |  103 

 sd/source/ui/tools/GraphicSizeCheck.cxx  |  213 
++
 sd/source/ui/view/drviews2.cxx   |   12 
 sd/source/ui/view/drviewsj.cxx   |4 
 sd/uiconfig/sdraw/menubar/menubar.xml|1 
 sd/uiconfig/simpress/menubar/menubar.xml |1 
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |2 
 svx/sdi/svx.sdi  |   17 
 svx/source/dialog/GenericCheckDialog.cxx |   70 +++
 svx/source/tbxctrls/grafctrl.cxx |2 
 svx/uiconfig/ui/genericcheckdialog.ui|  132 
++
 svx/uiconfig/ui/genericcheckentry.ui |   56 ++
 sw/Library_sw.mk |1 
 sw/sdi/_basesh.sdi   |7 
 sw/source/core/graphic/GraphicSizeCheck.cxx  |  164 
+++
 sw/source/core/inc/GraphicSizeCheck.hxx  |   99 

 sw/source/ui/frmdlg/frmdlg.cxx   |7 
 sw/source/uibase/shells/basesh.cxx   |   17 
 sw/uiconfig/sglobal/menubar/menubar.xml  |1 
 sw/uiconfig/swriter/menubar/menubar.xml  |1 
 31 files changed, 1047 insertions(+), 8 deletions(-)

New commits:
commit e34067483ef78c1569641becfe99b79a97600aed
Author: Tomaž Vajngerl 
AuthorDate: Sun Dec 19 22:31:31 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Dec 20 06:21:49 2021 +0100

Set the original size in crop dialog to preferred DPI calc. size

If we have the document setting preferred image size set, then
use that as the default DPI and recalcualte the logical image
size using the DPI and the size in pixels.
This is useful so we have the preferred DPI size as 100% in the
crop dialog, so we can adjust the size in relation to that value.

Change-Id: I50806f194032e228ee2cf56a39e5735a57358d46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127096
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 35653eaf6ade..2c7017a57189 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -56,6 +56,7 @@ class SvxGrfCropPage : public SfxTabPage
 tools::LongnOldWidth;
 tools::LongnOldHeight;
 boolbSetOrigSize;
+sal_Int32 m_aPreferredDPI;
 
 SvxCropExample m_aExampleWN;
 
@@ -92,7 +93,7 @@ class SvxGrfCropPage : public SfxTabPage
 voidGraphicHasChanged(bool bFound);
 virtual voidActivatePage(const SfxItemSet& rSet) override;
 
-static Size GetGrfOrigSize(const Graphic&);
+Size GetGrfOrigSize(const Graphic& rGraphic);
 public:
 SvxGrfCropPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet );
 static std::unique_ptr Create( weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet *rSet );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 8742044ab1c3..b83e0bbc0426 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -57,6 +57,7 @@ SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, 
weld::DialogController* p
 , nOldWidth(0)
 , nOldHeight(0)
 , bSetOrigSize(false)
+, m_aPreferredDPI(0)
 , m_xCropFrame(m_xBuilder->weld_widget("cropframe"))
 , m_xZoomConstRB(m_xBuilder->weld_radio_button("keepscale"))
 , m_xSizeConstRB(m_xBuilder->weld_radio_button("keepsize"))
@@ -287,6 +288,11 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
 DBG_ASSERT( pPool, "Where is the pool?" );
 #endif
 
+if (!GetUserData().isEmpty())
+{
+ 

[Libreoffice-commits] core.git: 2 commits - cui/source reportdesign/inc reportdesign/source

2021-10-11 Thread Noel Grandin (via logerrit)
 cui/source/options/dbregister.cxx |2 +-
 cui/source/options/dbregisterednamesconfig.cxx|2 +-
 cui/source/options/dbregistersettings.cxx |4 ++--
 cui/source/options/dbregistersettings.hxx |2 +-
 reportdesign/inc/PropertyForward.hxx  |2 +-
 reportdesign/source/core/sdr/PropertyForward.cxx  |4 ++--
 reportdesign/source/core/sdr/RptObject.cxx|2 +-
 reportdesign/source/ui/inspection/DataProviderHandler.cxx |2 +-
 reportdesign/source/ui/report/ReportController.cxx|2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit c36f569242a116f88749f9c5e2cd449351a39ea4
Author: Noel Grandin 
AuthorDate: Mon Oct 11 13:53:20 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 11 21:06:20 2021 +0200

loplugin:moveparam in cui

Change-Id: I059fae3520b06bc733721fe130cf41da13803b9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123383
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 7bcf13435bbf..add9eda6e93c 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -140,7 +140,7 @@ bool DbRegistrationOptionsPage::FillItemSet( SfxItemSet* 
rCoreSet )
 }
 if ( m_nOldCount != aRegistrations.size() || m_bModified )
 {
-rCoreSet->Put(DatabaseMapItem( SID_SB_DB_REGISTER, aRegistrations ));
+rCoreSet->Put(DatabaseMapItem( SID_SB_DB_REGISTER, 
std::move(aRegistrations) ));
 bModified = true;
 }
 
diff --git a/cui/source/options/dbregisterednamesconfig.cxx 
b/cui/source/options/dbregisterednamesconfig.cxx
index 87681866e067..b33e9ded61c5 100644
--- a/cui/source/options/dbregisterednamesconfig.cxx
+++ b/cui/source/options/dbregisterednamesconfig.cxx
@@ -59,7 +59,7 @@ namespace svx
 DBG_UNHANDLED_EXCEPTION("cui.options");
 }
 
-_rFillItems.Put( DatabaseMapItem( SID_SB_DB_REGISTER, aSettings ) );
+_rFillItems.Put( DatabaseMapItem( SID_SB_DB_REGISTER, 
std::move(aSettings) ) );
 }
 
 
diff --git a/cui/source/options/dbregistersettings.cxx 
b/cui/source/options/dbregistersettings.cxx
index f7739a1092cc..c544efe3 100644
--- a/cui/source/options/dbregistersettings.cxx
+++ b/cui/source/options/dbregistersettings.cxx
@@ -25,9 +25,9 @@
 namespace svx
 {
 
-DatabaseMapItem::DatabaseMapItem( sal_uInt16 _nId, const 
DatabaseRegistrations& _rRegistrations )
+DatabaseMapItem::DatabaseMapItem( sal_uInt16 _nId, DatabaseRegistrations&& 
_rRegistrations )
 :SfxPoolItem( _nId )
-,m_aRegistrations( _rRegistrations )
+,m_aRegistrations( std::move(_rRegistrations) )
 {
 }
 
diff --git a/cui/source/options/dbregistersettings.hxx 
b/cui/source/options/dbregistersettings.hxx
index 9146afe7b1d3..2f86392bc9cf 100644
--- a/cui/source/options/dbregistersettings.hxx
+++ b/cui/source/options/dbregistersettings.hxx
@@ -64,7 +64,7 @@ namespace svx
 
 public:
 
-DatabaseMapItem( sal_uInt16 _nId, const DatabaseRegistrations& 
_rRegistrations );
+DatabaseMapItem( sal_uInt16 _nId, DatabaseRegistrations&& 
_rRegistrations );
 
 virtual bool operator==( const SfxPoolItem& ) const 
override;
 virtual DatabaseMapItem* Clone( SfxItemPool *pPool = nullptr ) const 
override;
commit 01bb611effe7de983e4872a33fe849e4d0fc7874
Author: Noel Grandin 
AuthorDate: Mon Oct 11 18:51:28 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 11 21:06:08 2021 +0200

loplugin:moveparam in reportdesign

Change-Id: Ifefccc5d500331960baa8a48bb9ed64c86c91f9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123424
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/inc/PropertyForward.hxx 
b/reportdesign/inc/PropertyForward.hxx
index 4f467c2a0fe0..8a9a058a0500 100644
--- a/reportdesign/inc/PropertyForward.hxx
+++ b/reportdesign/inc/PropertyForward.hxx
@@ -59,7 +59,7 @@ namespace rptui
 public:
 OPropertyMediator(const css::uno::Reference< 
css::beans::XPropertySet>& _xSource
 ,const css::uno::Reference< css::beans::XPropertySet>& 
_xDest
-,const TPropertyNamePair& _aNameMap
+,TPropertyNamePair&& _aNameMap
 ,bool _bReverse = false);
 
 // css::beans::XPropertyChangeListener
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx 
b/reportdesign/source/core/sdr/PropertyForward.cxx
index 0450e2d342ba..394edfc12f43 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -30,10 +30,10 @@ namespace rptui
 
 OPropertyMediator::OPropertyMediator(const Reference< XPropertySet>& _xSource
  ,const Reference< XPropertySet>& _xDest
-

[Libreoffice-commits] core.git: 2 commits - cui/source editeng/inc editeng/source include/editeng include/svx sc/source sd/source svx/source sw/source

2021-10-10 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/numfmt.cxx |2 +-
 editeng/inc/edtspell.hxx   |2 +-
 editeng/source/accessibility/AccessibleParaManager.cxx |4 ++--
 editeng/source/editeng/edtspell.cxx|4 ++--
 editeng/source/editeng/impedit4.cxx|2 +-
 include/editeng/AccessibleParaManager.hxx  |2 +-
 include/svx/AccessibleTextHelper.hxx   |2 +-
 include/svx/ClassificationDialog.hxx   |2 +-
 include/svx/numinf.hxx |2 +-
 include/svx/sdr/overlay/overlayselection.hxx   |2 +-
 include/svx/svdmrkv.hxx|2 +-
 sc/source/ui/Accessibility/AccessiblePreviewCell.cxx   |2 +-
 sd/source/ui/view/Outliner.cxx |4 ++--
 sd/source/ui/view/drviews2.cxx |2 +-
 svx/source/accessibility/AccessibleTextHelper.cxx  |   10 +-
 svx/source/dialog/ClassificationDialog.cxx |4 ++--
 svx/source/dialog/imapdlg.cxx  |6 ++
 svx/source/dialog/imapwnd.cxx  |2 +-
 svx/source/dialog/imapwnd.hxx  |2 +-
 svx/source/form/filtnav.cxx|2 +-
 svx/source/form/fmshell.cxx|2 +-
 svx/source/form/fmshimp.cxx|8 
 svx/source/form/navigatortree.cxx  |6 +++---
 svx/source/inc/filtnav.hxx |2 +-
 svx/source/inc/fmshimp.hxx |2 +-
 svx/source/items/numinf.cxx|4 ++--
 svx/source/sdr/overlay/overlayselection.cxx|4 ++--
 svx/source/svdraw/svdedxv.cxx  |2 +-
 svx/source/svdraw/svdmrkv.cxx  |4 ++--
 svx/source/svdraw/svdobj.cxx   |2 +-
 sw/source/core/crsr/viscrs.cxx |2 +-
 sw/source/uibase/app/docsh2.cxx|4 ++--
 32 files changed, 50 insertions(+), 52 deletions(-)

New commits:
commit fa311ad62f935d6469b77936d477125d98dbee60
Author: Noel Grandin 
AuthorDate: Sun Oct 10 14:13:55 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Oct 10 19:45:34 2021 +0200

loplugin:moveparam in svx

Change-Id: I2e422235129f810feea5c17afa1332d8b7ac14ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123332
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 21f60f29e598..3eab0a4e6219 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -713,7 +713,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* 
rCoreAttrs )
 if ( !aDelFormats.empty() )
 {
 
-pNumItem->SetDelFormats( aDelFormats );
+pNumItem->SetDelFormats( std::vector(aDelFormats) );
 
 if(bNumItemFlag)
 {
diff --git a/include/svx/ClassificationDialog.hxx 
b/include/svx/ClassificationDialog.hxx
index b83068ba1c1e..d018662b5366 100644
--- a/include/svx/ClassificationDialog.hxx
+++ b/include/svx/ClassificationDialog.hxx
@@ -87,7 +87,7 @@ public:
 ~ClassificationDialog() override;
 
 std::vector getResult();
-void setupValues(std::vector const& rInput);
+void setupValues(std::vector&& rInput);
 };
 
 } // end svx namespace
diff --git a/include/svx/numinf.hxx b/include/svx/numinf.hxx
index 2002638d794d..ef1219988e04 100644
--- a/include/svx/numinf.hxx
+++ b/include/svx/numinf.hxx
@@ -56,7 +56,7 @@ public:
 double  GetValueDouble() const  { return nDoubleVal; }
 
 const std::vector & GetDelFormats() const { return 
mvDelFormats; }
-voidSetDelFormats( std::vector const & );
+voidSetDelFormats( std::vector && );
 
 SvxNumberValueType  GetValueType() const { return eValueType; }
 
diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index f2402500b8d5..d456ac6bf11b 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -67,7 +67,7 @@ namespace sdr::overlay
 virtual drawinglayer::primitive2d::Primitive2DContainer 
getOverlayObjectPrimitive2DSequence() const override;
 
 // data write access
-void setRanges(const std::vector< basegfx::B2DRange >& rNew);
+void setRanges(std::vector< basegfx::B2DRange >&& rNew);
 };
 } // end of namespace sdr::overlay
 
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 9b33b07c3a22..d4ece164bece 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -310,7 +310,7 @@ public:
 // Just objects are marked which are inclosed completely
 void 

[Libreoffice-commits] core.git: 2 commits - cui/source desktop/source editeng/source sfx2/source sw/source

2021-09-26 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/cuihyperdlg.cxx |3 +--
 cui/source/dialogs/hltpbase.cxx|4 +---
 cui/source/options/treeopt.cxx |4 ++--
 cui/source/tabpages/page.cxx   |   10 +-
 desktop/source/app/app.cxx |2 +-
 editeng/source/editeng/editdoc.cxx |2 +-
 sfx2/source/appl/appserv.cxx   |5 ++---
 sfx2/source/doc/objserv.cxx|5 +++--
 sw/source/uibase/uno/unotxdoc.cxx  |   10 --
 sw/source/uibase/utlui/uitool.cxx  |   15 ++-
 sw/source/uibase/wrtsh/delete.cxx  |4 ++--
 11 files changed, 28 insertions(+), 36 deletions(-)

New commits:
commit 92125d0d669671ca0fd21408b93f89d0e3cf860c
Author: Noel Grandin 
AuthorDate: Sun Sep 26 18:42:37 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Sep 26 20:22:37 2021 +0200

use SfxItemSetFixed in various

Change-Id: Ie2472959dbab93ead20948245fca9644de834422
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122653
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index cb48f126278b..350bdb6c6e14 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -184,8 +184,7 @@ void SvxHpLinkDlg::Close()
 
 void SvxHpLinkDlg::Apply()
 {
-SfxItemSet aItemSet( SfxGetpApp()->GetPool(), 
svl::Items );
+SfxItemSetFixed aItemSet( 
SfxGetpApp()->GetPool() );
 
 SvxHyperlinkTabPageBase* pCurrentPage = 
static_cast(
 GetTabPage( GetCurPageId() ) );
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 5dbacdeebb31..3f20145aafac 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -341,9 +341,7 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, 
ClickScriptHdl_Impl, weld::Button&, voi
 aItem.SetMacroTable( *pMacroTbl );
 
 // create empty itemset for macro-dlg
-SfxItemSet aItemSet( SfxGetpApp()->GetPool(),
- svl::Items );
+SfxItemSetFixed aItemSet( 
SfxGetpApp()->GetPool() );
 aItemSet.Put ( aItem );
 
 DisableClose( true );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 533dc34edea1..153e0b260966 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1045,7 +1045,7 @@ std::optional 
OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
 SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER,
 SID_ATTR_YEAR2000, SID_ATTR_YEAR2000> );
 
-SfxItemSet aOptSet( SfxGetpApp()->GetPool(), 
svl::Items );
+SfxItemSetFixed 
aOptSet( SfxGetpApp()->GetPool() );
 SfxGetpApp()->GetOptions(aOptSet);
 pRet->Put(aOptSet);
 
@@ -1189,7 +1189,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, 
const SfxItemSet& rSet
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
 const SfxPoolItem* pItem = nullptr;
-SfxItemSet aOptSet(SfxGetpApp()->GetPool(), 
svl::Items );
+SfxItemSetFixed 
aOptSet(SfxGetpApp()->GetPool());
 aOptSet.Put(rSet);
 if(aOptSet.Count())
 SfxGetpApp()->SetOptions( aOptSet );
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index ab79d9fadb10..0e29feaaeae6 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1156,7 +1156,7 @@ void SvxPageDescPage::ResetBackground_Impl(const 
SfxItemSet& rSet)
 {
 // create FillAttributes from SvxBrushItem
 const SvxBrushItem& rItem = static_cast< const 
SvxBrushItem& >(rTmpSet.Get(nWhich));
-SfxItemSet aTempSet(*rTmpSet.GetPool(), 
svl::Items);
+SfxItemSetFixed 
aTempSet(*rTmpSet.GetPool());
 
 setSvxBrushItemAsFillAttributesToTargetSet(rItem, 
aTempSet);
 aHeaderFillAttributes = 
std::make_shared(aTempSet);
@@ -1192,7 +1192,7 @@ void SvxPageDescPage::ResetBackground_Impl(const 
SfxItemSet& rSet)
 {
 // create FillAttributes from SvxBrushItem
 const SvxBrushItem& rItem = static_cast< const 
SvxBrushItem& >(rTmpSet.Get(nWhich));
-SfxItemSet aTempSet(*rTmpSet.GetPool(), 
svl::Items);
+SfxItemSetFixed 
aTempSet(*rTmpSet.GetPool());
 
 setSvxBrushItemAsFillAttributesToTargetSet(rItem, 
aTempSet);
 aFooterFillAttributes = 
std::make_shared(aTempSet);
@@ -1218,7 +1218,7 @@ void SvxPageDescPage::ResetBackground_Impl(const 
SfxItemSet& rSet)
 {
 // create FillAttributes from SvxBrushItem
 const SvxBrushItem& rItem = static_cast< const SvxBrushItem& 
>(*pItem);
-SfxItemSet aTempSet(*rSet.GetPool(), svl::Items);
+SfxItemSetFixed 

[Libreoffice-commits] core.git: 2 commits - cui/source vcl/qa

2021-08-23 Thread Luboš Luňák (via logerrit)
 cui/source/options/optgdlg.cxx |3 +++
 vcl/qa/cppunit/text.cxx|8 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit d34f1df73806e9ca05fa0d07da619e2c0f01b6f7
Author: Luboš Luňák 
AuthorDate: Wed Aug 18 18:38:56 2021 +0200
Commit: Luboš Luňák 
CommitDate: Mon Aug 23 15:01:14 2021 +0200

enable the UI option to enable Skia on Mac too

Change-Id: I3b4d96a3defaa9d6fdfba54f1da4d8be246367e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120813
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 12b973380b89..b353325f1b53 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -633,6 +633,9 @@ void OfaViewTabPage::UpdateSkiaStatus()
 // It can also be used on Linux, but only with the rarely used 'gen' 
backend.
 if (Application::GetToolkitName() == "x11")
 skiaHidden = false;
+// OSX backend has Skia support too.
+if (Application::GetToolkitName() == "osx")
+skiaHidden = false;
 
 if (skiaHidden)
 {
commit 07eab10f5795d7cd58620f0ce1dcf04f6f713c5a
Author: Luboš Luňák 
AuthorDate: Wed Aug 18 18:34:56 2021 +0200
Commit: Luboš Luňák 
CommitDate: Mon Aug 23 15:01:00 2021 +0200

disable vertical text test for Mac/Skia

It's broken on Mac, with or without Skia, so disable the test at least
for now.

Change-Id: I93b9a8d0bcbd275bbb0d54cc412b2df13581ad41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120812
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index b50feb0fe5a0..19e5da942932 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -253,6 +253,9 @@ void VclTextTest::testVerticalText()
 || device->GetGraphics()->getRenderBackendName() == "gtk3svp"
 || device->GetGraphics()->getRenderBackendName() == "aqua"
 || device->GetGraphics()->getRenderBackendName() == "gen"
+#ifdef MACOSX // vertical fonts are broken on Mac with or without Skia
+|| device->GetGraphics()->getRenderBackendName() == "skia"
+#endif
 || device->GetGraphics()->getRenderBackendName() == "genpsp")
 return;
 
@@ -260,8 +263,9 @@ void VclTextTest::testVerticalText()
 vcl::Font baseFont;
 vcl::Font font;
 bool fontFound = false;
-for (const char* ptrfontName : { "Droid Sans Japanese", "Baekmuk Gulim", 
"Microsoft JhengHei",
- "Microsoft YaHei", "MS PGothic" })
+for (const char* ptrfontName :
+ { "Droid Sans Japanese", "Baekmuk Gulim", "Microsoft JhengHei", 
"Microsoft YaHei",
+   "MS PGothic", "Hiragino Sans", "Arial Unicode MS" })
 {
 OUString fontName = OUString::fromUtf8(ptrfontName);
 if (!device->IsFontAvailable(fontName))


[Libreoffice-commits] core.git: 2 commits - cui/source drawinglayer/source editeng/source filter/source include/drawinglayer include/editeng include/svx include/vcl sd/source svx/source sw/source vcl/

2021-08-22 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/numpages.cxx   |2 -
 drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx  |2 -
 drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx|2 -
 editeng/source/items/numitem.cxx   |   11 +---
 editeng/source/outliner/outliner.cxx   |2 -
 editeng/source/rtf/svxrtf.cxx  |2 -
 filter/source/svg/svgwriter.hxx|4 +--
 include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx |4 ++-
 include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx   |4 ++-
 include/editeng/numitem.hxx|6 ++--
 include/editeng/svxrtf.hxx |4 +--
 include/svx/e3dsceneupdater.hxx|9 ++-
 include/vcl/outdevstate.hxx|4 +--
 sd/source/ui/dlg/BulletAndPositionDlg.cxx  |2 -
 svx/source/engine3d/e3dsceneupdater.cxx|7 +
 svx/source/sidebar/nbdtmg.cxx  |2 -
 sw/source/core/doc/number.cxx  |4 +--
 sw/source/core/text/txtfld.cxx |2 -
 sw/source/core/unocore/unosett.cxx |2 -
 sw/source/filter/writer/writer.cxx |7 ++---
 sw/source/filter/ww8/wrtw8num.cxx  |4 +--
 vcl/inc/window.h   |2 -
 vcl/source/outdev/outdevstate.cxx  |2 -
 vcl/source/window/window2.cxx  |2 -
 vcl/unx/gtk3/gtkinst.cxx   |   16 ++---
 25 files changed, 54 insertions(+), 54 deletions(-)

New commits:
commit 0944ef734571ae34cbecc53812e576a39b3722f0
Author: Noel Grandin 
AuthorDate: Sat Aug 21 19:38:58 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 22 16:23:26 2021 +0200

no need to use unique_ptr for ViewInformation3D

it is already a COW type

Change-Id: Ie098bd293115650128ebb18d5c16747b519717c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120825
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx 
b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index b7d1c8abdd9b..04796233693d 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -488,7 +488,7 @@ namespace drawinglayer::primitive3d
 // new one and clear current decompositiopn
 SdrExtrudePrimitive3D* pThat = const_cast< 
SdrExtrudePrimitive3D* >(this);
 pThat->setBuffered3DDecomposition(Primitive3DContainer());
-pThat->mpLastRLGViewInformation.reset( new 
geometry::ViewInformation3D(rViewInformation) );
+pThat->mpLastRLGViewInformation = rViewInformation;
 }
 }
 
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx 
b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index 1d5b918a27bf..291c82af1d2e 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -346,7 +346,7 @@ namespace drawinglayer::primitive3d
 // new one and clear current decompositiopn
 SdrLathePrimitive3D* pThat = const_cast< 
SdrLathePrimitive3D* >(this);
 pThat->setBuffered3DDecomposition(Primitive3DContainer());
-pThat->mpLastRLGViewInformation.reset( new 
geometry::ViewInformation3D(rViewInformation) );
+pThat->mpLastRLGViewInformation = rViewInformation;
 }
 }
 
diff --git a/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx 
b/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
index 76078be50fde..d20d4b48a1d0 100644
--- a/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
@@ -22,9 +22,11 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 
 namespace drawinglayer::primitive3d
@@ -54,7 +56,7 @@ namespace drawinglayer::primitive3d
 double  mfBackScale;
 
 /// decomposition data when ReducedLineGeometry is used, see 
get3DDecomposition
-std::unique_ptr 
mpLastRLGViewInformation;
+std::optional 
mpLastRLGViewInformation;
 
 boolmbSmoothNormals : 1; 
// Plane self
 boolmbSmoothLids : 1; // 
Front/back
diff --git a/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx 

[Libreoffice-commits] core.git: 2 commits - cui/source include/svx svx/inc svx/qa svx/source

2021-08-16 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/transfrm.cxx   |2 
 include/svx/sdr/contact/viewobjectcontact.hxx  |2 
 svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx|2 
 svx/inc/sdr/contact/viewobjectcontactofgroup.hxx   |2 
 svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx|2 
 svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx |4 
 svx/qa/unit/sdr.cxx|4 
 svx/qa/unit/svdraw.cxx |8 
 svx/qa/unit/unodraw.cxx|4 
 svx/source/sdr/contact/objectcontactofobjlistpainter.cxx   |2 
 svx/source/sdr/contact/objectcontactofpageview.cxx |4 
 svx/source/sdr/contact/viewobjectcontact.cxx   |   42 +---
 svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx |4 
 svx/source/sdr/contact/viewobjectcontactofgroup.cxx|   72 
+++
 svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx |6 
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx  |2 
 svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx  |   98 
--
 17 files changed, 126 insertions(+), 134 deletions(-)

New commits:
commit 6dc23567639bebf18ceb8d9a3721228bffe14202
Author: Caolán McNamara 
AuthorDate: Mon Aug 16 15:58:11 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Aug 16 21:46:23 2021 +0200

Resolves: tdf#143785 save/restore SdrModel::IsChanged

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 5ffe490745b6..f9396cfd6ab4 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -628,6 +628,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
 *pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj()));
 
 //save geometry
+const bool bOrigModelChangeState = pView->GetModel()->IsChanged();
 SdrCustomShapeGeometryItem 
aInitialGeometry(rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
 EnhancedCustomShape2d aShape(rSdrObjCustomShape);
 
@@ -671,6 +672,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
 
 //restore geometry
 rSdrObjCustomShape.SetMergedItem(aInitialGeometry);
+pView->GetModel()->SetChanged(bOrigModelChangeState);
 }
 
 for (int i = 0; i < 2; ++i)
commit 58b2d04ddab5a678921610bf9e9a5a95ae660a17
Author: Noel Grandin 
AuthorDate: Fri Aug 13 12:28:57 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Aug 16 21:40:14 2021 +0200

do less copying when constructing 2d sequence (tdf#105575)

instead of constructing a child sequence, and appending that
a parent sequence, just pass the parent sequence down the call
hierarchy, so we end up doing less copying.

Change-Id: If39a0779e543c6aa01f5e2e3ae63d395e0c85f7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120521
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx 
b/include/svx/sdr/contact/viewobjectcontact.hxx
index a12cb0b2915e..92dcc7458876 100644
--- a/include/svx/sdr/contact/viewobjectcontact.hxx
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -120,7 +120,7 @@ public:
 
 // process this primitive: Eventually also recursively travel an existing 
hierarchy,
 // e.g. for group objects, scenes or pages. This method will test 
geometrical visibility.
-virtual drawinglayer::primitive2d::Primitive2DContainer 
getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+virtual void getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo, 
drawinglayer::primitive2d::Primitive2DContainer& rContainer) const;
 
 // just process the sub-hierarchy, used as tooling from 
getPrimitive2DSequenceHierarchy
 drawinglayer::primitive2d::Primitive2DContainer 
getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const;
diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx 
b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx
index 35aece86a380..ff31409ad9c2 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx
@@ -37,7 +37,7 @@ namespace sdr::contact
 
 // process this primitive: Eventually also recursively travel an 
existing hierarchy,
 // e.g. for group objects, scenes or pages. This method will test 
geometrical visibility.
-virtual drawinglayer::primitive2d::Primitive2DContainer 
getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override;
+virtual void 

[Libreoffice-commits] core.git: 2 commits - cui/source editeng/source include/editeng sw/source

2021-03-20 Thread Caolán McNamara (via logerrit)
 cui/source/inc/autocdlg.hxx|6 ++
 cui/source/tabpages/autocdlg.cxx   |   13 -
 editeng/source/editeng/editview.cxx|8 
 include/editeng/editview.hxx   |2 ++
 sw/source/uibase/shells/langhelper.cxx |8 +---
 5 files changed, 21 insertions(+), 16 deletions(-)

New commits:
commit 9b3ce3a3192eb960341fc0d24423657f0559eff2
Author: Caolán McNamara 
AuthorDate: Fri Mar 19 20:39:39 2021 +
Commit: Caolán McNamara 
CommitDate: Sat Mar 20 13:47:25 2021 +0100

add GetInputLanguage to EditView

and hide the need to expose its vcl::Window

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

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index b101f7f08b85..5f3fb49e7a08 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -351,6 +351,14 @@ OutputDevice& EditView::GetOutputDevice() const
 return pImpEditView->GetOutputDevice();
 }
 
+LanguageType EditView::GetInputLanguage() const
+{
+// it might make sense to add this to getEditViewCallbacks
+if (const vcl::Window* pWindow = GetWindow())
+return pWindow->GetInputLanguage();
+return LANGUAGE_DONTKNOW;
+}
+
 bool EditView::HasOtherViewWindow( vcl::Window* pWin )
 {
 OutWindowSet& rOutWindowSet = pImpEditView->aOutWindowSet;
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 379218b1c619..6e06cdd77a97 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -171,6 +171,8 @@ public:
 vcl::Window*GetWindow() const;
 OutputDevice&   GetOutputDevice() const;
 
+LanguageTypeGetInputLanguage() const;
+
 boolHasOtherViewWindow( vcl::Window* pWin );
 boolAddOtherViewWindow( vcl::Window* pWin );
 boolRemoveOtherViewWindow( vcl::Window* pWin );
diff --git a/sw/source/uibase/shells/langhelper.cxx 
b/sw/source/uibase/shells/langhelper.cxx
index aa7f5ae06089..b5ceb23e5ddb 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -19,8 +19,6 @@
 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 
@@ -67,11 +65,7 @@ namespace SwLangHelper
 
 // get keyboard language
 OUString aKeyboardLang;
-LanguageType nLang = LANGUAGE_DONTKNOW;
-
-vcl::Window* pWin = rEditView.GetWindow();
-if(pWin)
-nLang = pWin->GetInputLanguage();
+LanguageType nLang = rEditView.GetInputLanguage();
 if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
 aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang );
 
commit beafe72de3427f20c0cb59f7c7ff7852ebcc7427
Author: Caolán McNamara 
AuthorDate: Fri Mar 19 15:59:46 2021 +
Commit: Caolán McNamara 
CommitDate: Sat Mar 20 13:45:32 2021 +0100

cid#1473926 Uninitialized scalar variable

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 86218a58a581..b084bdbd685a 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -135,6 +135,12 @@ struct DoubleString
 OUString  sShort;
 OUString  sLong;
 void*   pUserData; ///< CheckBox -> form. Text Bool -> selection text
+DoubleString(const OUString& rShort, const OUString& rLong)
+: sShort(rShort)
+, sLong(rLong)
+, pUserData(nullptr)
+{
+}
 };
 
 typedef std::vector DoubleStringArray;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 00ac479bac09..55fee3ede945 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -802,10 +802,9 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool 
bFromReset,
 }
 
 m_xReplaceTLB->all_foreach([this, ](weld::TreeIter& rIter) {
-pArray->push_back(DoubleString());
+pArray->push_back(DoubleString(m_xReplaceTLB->get_text(rIter, 0),
+   m_xReplaceTLB->get_text(rIter, 1)));
 DoubleString& rDouble = pArray->back();
-rDouble.sShort = m_xReplaceTLB->get_text(rIter, 0);
-rDouble.sLong = m_xReplaceTLB->get_text(rIter, 1);
 rDouble.pUserData = 
reinterpret_cast(m_xReplaceTLB->get_id(rIter).toInt64());
 return false;
 });
@@ -961,9 +960,7 @@ void OfaAutocorrReplacePage::NewEntry(const OUString& 
sShort, const OUString& sL
 }
 }
 
-DoubleString aNewString;
-aNewString.sShort = sShort;
-aNewString.sLong = sLong;
+DoubleString aNewString(sShort, sLong);
 

[Libreoffice-commits] core.git: 2 commits - cui/source sw/source

2021-03-05 Thread Stephan Bergmann (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |4 +++-
 sw/source/uibase/utlui/navipi.cxx  |2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6b99873a209f85a3322a318d45546d573a0a024e
Author: Stephan Bergmann 
AuthorDate: Fri Mar 5 13:52:50 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 5 19:30:33 2021 +0100

Avoid float-cast-overflow

...during UITest_sw_options
UITEST_TEST_NAME=optionsDialog.optionsDialog.test_moreIconsDialog,

> /cui/source/dialogs/AdditionsDialog.cxx:641:17: runtime error: nan is 
outside the range of representable values of type 'int'
> #0 0x2b73f252fab6 in AdditionsItem::AdditionsItem(weld::Widget*, 
AdditionsDialog*, AdditionInfo const&) 
/cui/source/dialogs/AdditionsDialog.cxx:641:17
> #1 0x2b73f2562963 in void 
__gnu_cxx::new_allocator::construct(AdditionsItem*, 
weld::Container*&&, AdditionsDialog*&, AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/ext/new_allocator.h:136:23
> #2 0x2b73f25618f8 in void 
std::allocator_traits >::construct(std::allocator&, AdditionsItem*, 
weld::Container*&&, AdditionsDialog*&, AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/alloc_traits.h:475:8
> #3 0x2b73f2560ea0 in std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace(std::allocator, 
weld::Container*&&, AdditionsDialog*&, AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:526:4
> #4 0x2b73f2560222 in 
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count, weld::Container*, AdditionsDialog*&, 
AdditionInfo&>(std::_Sp_make_shared_tag, AdditionsItem*, 
std::allocator const&, weld::Container*&&, AdditionsDialog*&, 
AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:637:18
> #5 0x2b73f255fc3d in std::__shared_ptr::__shared_ptr, 
weld::Container*, AdditionsDialog*&, AdditionInfo&>(std::_Sp_make_shared_tag, 
std::allocator const&, weld::Container*&&, AdditionsDialog*&, 
AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:1294:14
> #6 0x2b73f255f9bb in 
std::shared_ptr::shared_ptr, 
weld::Container*, AdditionsDialog*&, AdditionInfo&>(std::_Sp_make_shared_tag, 
std::allocator const&, weld::Container*&&, AdditionsDialog*&, 
AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr.h:344:4
> #7 0x2b73f255f5b7 in std::shared_ptr 
std::allocate_shared, 
weld::Container*, AdditionsDialog*&, 
AdditionInfo&>(std::allocator const&, weld::Container*&&, 
AdditionsDialog*&, AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr.h:690:14
> #8 0x2b73f253e5b1 in std::shared_ptr 
std::make_shared(weld::Container*&&, AdditionsDialog*&, AdditionInfo&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr.h:706:14
> #9 0x2b73f2510e97 in SearchAndParseThread::Append(AdditionInfo&) 
/cui/source/dialogs/AdditionsDialog.cxx:317:20
> #10 0x2b73f2517167 in SearchAndParseThread::Search() 
/cui/source/dialogs/AdditionsDialog.cxx:357:17
> #11 0x2b73f251c5fe in SearchAndParseThread::execute() 
/cui/source/dialogs/AdditionsDialog.cxx:426:9
> #12 0x2b6ecdd21dd7 in salhelper::Thread::run() 
/salhelper/source/thread.cxx:40:9
> #13 0x2b6ecdd2401f in threadFunc /include/osl/thread.hxx:189:15
> #14 0x2b6ebabcdda8 in osl_thread_start_Impl(void*) 
/sal/osl/unx/thread.cxx:264:9
> #15 0x2b6ebca70ea4 in start_thread (/lib64/libpthread.so.0+0x7ea4)
> #16 0x2b6ebd3a696c in clone (/lib64/libc.so.6+0xfe96c)

() in code introduced with
48a796c5bbdf897228eb4125512e4f80527f4b55 "tdf#133026: Additions: Rating 
image
implementation", when additionInfo.sName is "Colibre Icon Theme Legacy" and
additionInfo.sRating is "NaN".  (All those additionInfo strings are 
apparently
obtained from remote JSON data in parseResponse,
cui/source/dialogs/AdditionsDialog.cxx.)

Change-Id: I073990870c432591ee66fe5ec9580e46ea7e716a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112017
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 4ea381e385db..c41e6c262d0e 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -10,6 +10,8 @@
 
 #include 
 
+#include 
+#include 
 

[Libreoffice-commits] core.git: 2 commits - cui/source vcl/source

2020-10-12 Thread Luboš Luňák (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |1 +
 vcl/source/filter/jpeg/jpegc.cxx   |6 ++
 2 files changed, 7 insertions(+)

New commits:
commit 7c90ea5ebc18d36d44870fc829475e471c675a95
Author: Luboš Luňák 
AuthorDate: Fri Oct 9 20:52:05 2020 +0200
Commit: Luboš Luňák 
CommitDate: Mon Oct 12 15:11:28 2020 +0200

try to read JPEGs as BGR if wanted and available

BGR(A) is actually the format used by most VCL backends (Cairo and
Skia at least).

Change-Id: I1574aadabafcea274049d4c7021352913813bae2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104130
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index c1fbb535a8e4..0270cc448e82 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -231,6 +231,12 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* 
pJPEGReader, void* pInputS
 nPixelSize = 1;
 }
 #if defined(JCS_EXTENSIONS)
+else if (eFinalFormat == ScanlineFormat::N24BitTcBgr)
+{
+best_out_color_space = JCS_EXT_BGR;
+eScanlineFormat = eFinalFormat;
+nPixelSize = 3;
+}
 else if (eFinalFormat == ScanlineFormat::N32BitTcBgra)
 {
 best_out_color_space = JCS_EXT_BGRA;
commit e1eb5d616b701853532f8c6ba2e89366d596789e
Author: Heiko Tietze 
AuthorDate: Mon Oct 12 08:26:28 2020 +0200
Commit: Heiko Tietze 
CommitDate: Mon Oct 12 15:11:11 2020 +0200

Resolves tdf#137189 - Fixes crash at CheckInstalledExtensions()

SolarMutex added

Change-Id: I18c6683e7a26892ce7f1d019cb1ee59ce03981ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104198
Reviewed-by: Muhammet Kara 
Tested-by: Jenkins

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index ebd23ba077d9..7eb277b3d0f8 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -408,6 +408,7 @@ void SearchAndParseThread::CheckInstalledExtensions()
 }
 else
 {
+SolarMutexGuard aGuard;
 rInfo->m_xButtonInstall->set_sensitive(false);
 rInfo->m_xButtonInstall->set_label(
 CuiResId(RID_SVXSTR_ADDITIONS_INSTALLEDBUTTON));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source include/xmloff xmloff/inc xmloff/source

2020-08-25 Thread Yusuf Keten (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx  |1 +
 include/xmloff/prstylei.hxx |4 
 xmloff/inc/PageMasterImportContext.hxx  |5 ++---
 xmloff/source/style/PageMasterImportContext.cxx |6 +++---
 xmloff/source/style/prstylei.cxx|   10 ++
 xmloff/source/style/xmlstyle.cxx|   17 -
 6 files changed, 28 insertions(+), 15 deletions(-)

New commits:
commit ba9c11e0186844fffa02c594a5c49aad4a52242c
Author: Yusuf Keten 
AuthorDate: Tue Aug 25 02:09:20 2020 +0300
Commit: Muhammet Kara 
CommitDate: Tue Aug 25 11:18:24 2020 +0200

tdf#133026: Additions: Set label of install button for installed extensions

Change-Id: Ic45f5684c1b483e294179e151d6beec34de2e004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101297
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 680e519a60d0..7460fb576790 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -422,6 +422,7 @@ void SearchAndParseThread::CheckInstalledExtensions()
 else
 {
 rInfo->m_xButtonInstall->set_sensitive(false);
+rInfo->m_xButtonInstall->set_label("Installed");
 }
 }
 }
commit 4070818f586a46a2b572501aca152bb811fa2d5b
Author: Noel Grandin 
AuthorDate: Tue Aug 25 08:58:16 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 25 11:18:11 2020 +0200

use fastparser in PageStyleContext

Change-Id: Iaa433e5c8c5712bbcbef519c613927dbffa22906
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101305
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx
index 42f5c732c423..0bb6243b57f5 100644
--- a/include/xmloff/prstylei.hxx
+++ b/include/xmloff/prstylei.hxx
@@ -93,6 +93,10 @@ public:
 const css::uno::Reference< css::xml::sax::XAttributeList > & 
xAttrList,
 SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
 bool bDefaultStyle=false );
+XMLPropStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList,
+SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
+bool bDefaultStyle=false );
 virtual ~XMLPropStyleContext() override;
 
 virtual SvXMLImportContextRef CreateChildContext(
diff --git a/xmloff/inc/PageMasterImportContext.hxx 
b/xmloff/inc/PageMasterImportContext.hxx
index 66933da8c172..a60522249759 100644
--- a/xmloff/inc/PageMasterImportContext.hxx
+++ b/xmloff/inc/PageMasterImportContext.hxx
@@ -36,9 +36,8 @@ private:
 public:
 
 
-PageStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
-const OUString& rLName,
-const css::uno::Reference< css::xml::sax::XAttributeList > & 
xAttrList,
+PageStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList,
 SvXMLStylesContext& rStyles,
 bool bDefaultStyle);
 virtual ~PageStyleContext() override;
diff --git a/xmloff/source/style/PageMasterImportContext.cxx 
b/xmloff/source/style/PageMasterImportContext.cxx
index 3bb1483f1950..8e2caba9eb90 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -61,11 +61,11 @@ void PageStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
 
 
 PageStyleContext::PageStyleContext( SvXMLImport& rImport,
-sal_uInt16 nPrfx, const OUString& rLName,
-const uno::Reference< xml::sax::XAttributeList > & xAttrList,
+sal_Int32 nElement,
+const uno::Reference< xml::sax::XFastAttributeList > & xAttrList,
 SvXMLStylesContext& rStyles,
 bool bDefaultStyle) :
-XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, 
XmlStyleFamily::PAGE_MASTER, bDefaultStyle),
+XMLPropStyleContext( rImport, nElement, xAttrList, rStyles, 
XmlStyleFamily::PAGE_MASTER, bDefaultStyle),
 sPageUsage(),
 m_bIsFillStyleAlreadyConverted(false) //
 {
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 02362142ee41..f5389010fb4a 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -156,6 +156,16 @@ XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& 
rImport,
 {
 }
 
+XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport,
+sal_Int32 nElement,
+const Reference< XFastAttributeList > & xAttrList,
+SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
+bool bDefault )
+:   SvXMLStyleContext( rImport, nElement, xAttrList, nFamily, bDefault )
+,   mxStyles(  )
+{
+}
+
 

[Libreoffice-commits] core.git: 2 commits - cui/source writerfilter/source

2020-07-09 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/hltpbase.cxx  |2 +-
 writerfilter/source/dmapper/NumberingManager.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1f6842a5afea1a41ef67b9ee78da9bf30c02
Author: Caolán McNamara 
AuthorDate: Thu Jul 9 10:11:58 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jul 9 14:48:28 2020 +0200

cid#1465230 Dereference null return value

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

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 63d3eb1738c1..f79f5644e710 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -382,7 +382,7 @@ HyperDialogEvent SvxHyperlinkTabPageBase::GetMacroEvents() 
const
 const SvxHyperlinkItem *pHyperlinkItem = static_cast(
GetItemSet().GetItem 
(SID_HYPERLINK_GETLINK));
 
-return pHyperlinkItem->GetMacroEvents();
+return pHyperlinkItem ? pHyperlinkItem->GetMacroEvents() : 
HyperDialogEvent();
 }
 
 SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable()
commit c11ccaf57bad5d2aa12707abf26ae1fe8edcc4a5
Author: Caolán McNamara 
AuthorDate: Thu Jul 9 10:10:03 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jul 9 14:48:01 2020 +0200

cid#1465231 Improper user of negative value

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

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index e5c813d819a5..c30a9a120bee 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -713,10 +713,10 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
 break;
 case NS_ooxml::LN_CT_NumLvl_ilvl:
 //add a new level to the level vector and make it the current one
-m_pCurrentDefinition->AddLevel(rVal.getString().toInt32());
+m_pCurrentDefinition->AddLevel(rVal.getString().toUInt32());
 break;
 case NS_ooxml::LN_CT_Lvl_ilvl:
-m_pCurrentDefinition->AddLevel(rVal.getString().toInt32());
+m_pCurrentDefinition->AddLevel(rVal.getString().toUInt32());
 break;
 case NS_ooxml::LN_CT_AbstractNum_abstractNumId:
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/vcl officecfg/registry sc/sdi sc/source sfx2/sdi vcl/source

2020-03-11 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/dialogs/pastedlg.cxx   |   24 +++-
 cui/source/factory/dlgfact.cxx|5 
 cui/source/factory/dlgfact.hxx|1 
 cui/source/inc/pastedlg.hxx   |3 
 include/sfx2/sfxdlg.hxx   |1 
 include/sfx2/sfxsids.hrc  |1 
 include/vcl/commandinfoprovider.hxx   |2 
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   11 +
 sc/sdi/cellsh.sdi |1 
 sc/source/ui/docshell/impex.cxx   |4 
 sc/source/ui/view/cellsh.cxx  |3 
 sc/source/ui/view/cellsh1.cxx |   59 
++
 sfx2/sdi/sfx.sdi  |   16 ++
 vcl/source/helper/commandinfoprovider.cxx |8 +
 14 files changed, 137 insertions(+), 2 deletions(-)

New commits:
commit d08b428685dd7934c4576f1bf4aa7436f96a
Author: Samuel Mehrbrodt 
AuthorDate: Tue Mar 3 13:57:24 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Wed Mar 11 12:43:44 2020 +0100

tdf#125440 Allow raising text import dialog for paste

This adds an entry to the "Paste special" dialog to raise
the Text Import Dialog.

This way, users can correctly import CSV/TSV,
even when pasting just one line of formatted input.

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

diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index f9d9a76318ab..375a966c7786 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -26,6 +26,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 SvPasteObjectDialog::SvPasteObjectDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/pastespecial.ui", 
"PasteSpecialDialog")
@@ -70,6 +72,13 @@ void SvPasteObjectDialog::Insert( SotClipboardFormatId 
nFormat, const OUString&
 aSupplementMap.insert( std::make_pair( nFormat, rFormatName ) );
 }
 
+void SvPasteObjectDialog::InsertUno(const OUString& sCmd, const OUString& 
sLabel)
+{
+aExtraCommand.first = sCmd;
+aExtraCommand.second = sLabel;
+}
+
+
 void SvPasteObjectDialog::PreGetFormat( const TransferableDataHelper  )
 {
 //TODO/LATER: why is the Descriptor never used?!
@@ -286,6 +295,11 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const 
TransferableDataHelpe
 }
 }
 
+if (!aExtraCommand.first.isEmpty())
+{
+ObjectLB().append(aExtraCommand.first, aExtraCommand.second);
+}
+
 ObjectLB().thaw();
 SelectObject();
 
@@ -302,7 +316,15 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const 
TransferableDataHelpe
 
 if (run() == RET_OK)
 {
-nSelFormat = 
static_cast(ObjectLB().get_selected_id().toUInt32());
+if (ObjectLB().get_selected_id().startsWithIgnoreAsciiCase(".uno"))
+{
+comphelper::dispatchCommand(aExtraCommand.first, {});
+nSelFormat = SotClipboardFormatId::NONE;
+}
+else
+{
+nSelFormat = 
static_cast(ObjectLB().get_selected_id().toUInt32());
+}
 }
 
 return nSelFormat;
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 600882742427..d7868049d4c7 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -533,6 +533,11 @@ void AbstractPasteDialog_Impl::Insert(SotClipboardFormatId 
nFormat, const OUStri
 m_xDlg->Insert(nFormat, rFormatName);
 }
 
+void AbstractPasteDialog_Impl::InsertUno(const OUString& sCmd, const OUString& 
sLabel)
+{
+m_xDlg->InsertUno(sCmd, sLabel);
+}
+
 void AbstractPasteDialog_Impl::SetObjName(const SvGlobalName & rClass, const 
OUString& rObjName)
 {
 m_xDlg->SetObjName(rClass, rObjName);
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 0181e293f49d..cd4b4d36a9dd 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -609,6 +609,7 @@ public:
 virtual bool StartExecuteAsync(AsyncContext ) override;
 public:
 virtual void Insert( SotClipboardFormatId nFormat, const OUString & 
rFormatName ) override;
+virtual void InsertUno( const OUString & sCmd, const OUString& sLabel ) 
override;
 virtual void SetObjName( const SvGlobalName & rClass, const OUString & 
rObjName ) override;
 virtual void PreGetFormat( const TransferableDataHelper& aHelper ) 
override;
 virtual SotClipboardFormatId GetFormatOnly() override;
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index 565101d7fe19..a9a691b4f8f8 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig officecfg/registry vcl/skia

2020-02-10 Thread Luboš Luňák (via logerrit)
 cui/source/options/optgdlg.cxx |   43 -
 cui/source/options/optgdlg.hxx |2 
 cui/uiconfig/ui/optviewpage.ui |   21 +-
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |8 ++
 vcl/skia/SkiaHelper.cxx|   12 +++
 vcl/skia/zone.cxx  |5 -
 6 files changed, 85 insertions(+), 6 deletions(-)

New commits:
commit 67770fc41f409e9d7e179b34eb84434ed237a6ce
Author: Luboš Luňák 
AuthorDate: Fri Feb 7 15:55:21 2020 +0100
Commit: Luboš Luňák 
CommitDate: Mon Feb 10 10:10:17 2020 +0100

if OpenGL is forced, do not enable Skia in order to allow GL

Change-Id: I013db819b66252a25e0a6fddd8e777c3d8d36372
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88210
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index cdbb2c0b7977..39588aedcf53 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -122,6 +122,12 @@ bool isVCLSkiaEnabled()
 {
 bRet = true;
 }
+else if (getenv("SAL_FORCEGL"))
+{
+// Skia usage is checked before GL usage, so if GL is forced (and Skia 
is not), do not
+// enable Skia in order to allow GL.
+bRet = false;
+}
 else if (bSupportsVCLSkia)
 {
 static bool bEnableSkiaEnv = !!getenv("SAL_ENABLESKIA");
commit 90b02dd4a465f312a6b9c27ff572b5a304e857de
Author: Luboš Luňák 
AuthorDate: Fri Feb 7 15:36:26 2020 +0100
Commit: Luboš Luňák 
CommitDate: Mon Feb 10 10:10:01 2020 +0100

in case of Skia problems force raster mode, don't disable it all

Skia's CPU-based raster mode should be safe (at least from driver problems),
so it should be enough to make the failsafe mechanism just disable Vulkan
use.
Also add UI option controlling forced raster rendering.

Change-Id: I6be1745782816e5468e55635ae5613b6a6afded6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88206
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index e10f743361c8..fb73341b9897 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -188,6 +188,7 @@ class SkiaCfg
 private:
 bool mbUseSkia;
 bool mbForceSkia;
+bool mbForceSkiaRaster;
 bool mbModified;
 
 public:
@@ -196,9 +197,11 @@ public:
 
 bool useSkia() const;
 bool forceSkia() const;
+bool forceSkiaRaster() const;
 
 void setUseSkia(bool bSkia);
 void setForceSkia(bool bSkia);
+void setForceSkiaRaster(bool bSkia);
 
 void reset();
 };
@@ -213,6 +216,7 @@ void SkiaCfg::reset()
 {
 mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get();
 mbForceSkia = officecfg::Office::Common::VCL::ForceSkia::get();
+mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get();
 mbModified = false;
 }
 
@@ -227,6 +231,8 @@ SkiaCfg::~SkiaCfg()
 officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch);
 if (!officecfg::Office::Common::VCL::ForceSkia::isReadOnly())
 officecfg::Office::Common::VCL::ForceSkia::set(mbForceSkia, 
batch);
+if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
+
officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch);
 batch->commit();
 }
 catch (...)
@@ -245,6 +251,11 @@ bool SkiaCfg::forceSkia() const
 return mbForceSkia;
 }
 
+bool SkiaCfg::forceSkiaRaster() const
+{
+return mbForceSkiaRaster;
+}
+
 void SkiaCfg::setUseSkia(bool bSkia)
 {
 if (bSkia != mbUseSkia)
@@ -263,6 +274,15 @@ void SkiaCfg::setForceSkia(bool bSkia)
 }
 }
 
+void SkiaCfg::setForceSkiaRaster(bool bSkia)
+{
+if (mbForceSkiaRaster != bSkia)
+{
+mbForceSkiaRaster = bSkia;
+mbModified = true;
+}
+}
+
 }
 
 // class OfaMiscTabPage --
@@ -759,6 +779,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xForceOpenGL(m_xBuilder->weld_check_button("forceopengl"))
 , m_xUseSkia(m_xBuilder->weld_check_button("useskia"))
 , m_xForceSkia(m_xBuilder->weld_check_button("forceskia"))
+, m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
 , m_xOpenGLStatusEnabled(m_xBuilder->weld_label("openglenabled"))
 , m_xOpenGLStatusDisabled(m_xBuilder->weld_label("opengldisabled"))
 , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
@@ -774,6 +795,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xOpenGLStatusDisabled->hide();
 m_xUseSkia->hide();
 m_xForceSkia->hide();
+m_xForceSkiaRaster->hide();
 m_xSkiaStatusEnabled->hide();
 

[Libreoffice-commits] core.git: 2 commits - cui/source include/svx svx/source sw/qa sw/source

2019-12-29 Thread erto (via logerrit)
 cui/source/options/optopencl.hxx |6 
 cui/source/options/optsave.hxx   |5 
 include/svx/AccessibilityCheck.hxx   |7 -
 include/svx/AccessibilityCheckDialog.hxx |   12 -
 include/svx/AccessibilityIssue.hxx   |   13 +
 svx/source/dialog/AccessibilityCheckDialog.cxx   |   17 +-
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |6 
 sw/source/core/access/AccessibilityCheck.cxx |  100 +++
 sw/source/core/inc/AccessibilityIssue.hxx|   31 
 9 files changed, 113 insertions(+), 84 deletions(-)

New commits:
commit 22db41d4078f56d03905efbc71c16c322b2df091
Author: erto 
AuthorDate: Fri Dec 20 21:22:06 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sun Dec 29 17:00:18 2019 +0100

tdf#124176 Use pragma once instead of header guard

Change-Id: I904c2b37a51c03d51503c0b460201392ec8894a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85628
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index f9fbca43edf1..f7097d3fdba6 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -16,9 +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_CUI_SOURCE_OPTIONS_OPTOPENCL_HXX
-#define INCLUDED_CUI_SOURCE_OPTIONS_OPTOPENCL_HXX
+#pragma once
 
 #include 
 #include 
@@ -41,6 +39,4 @@ public:
 virtual voidReset( const SfxItemSet* rSet ) override;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 4314bdda1ddf..6c9226285972 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.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_CUI_SOURCE_OPTIONS_OPTSAVE_HXX
-#define INCLUDED_CUI_SOURCE_OPTIONS_OPTSAVE_HXX
+#pragma once
 
 #include 
 #include 
@@ -79,6 +78,4 @@ public:
 virtual voidReset( const SfxItemSet* rSet ) override;
 };
 
-#endif // INCLUDED_CUI_SOURCE_OPTIONS_OPTSAVE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 976960791fb3c770c00ee8e94ee4f56bfe610eeb
Author: Tomaž Vajngerl 
AuthorDate: Fri Dec 20 09:57:23 2019 +0100
Commit: Tomaž Vajngerl 
CommitDate: Sun Dec 29 17:00:14 2019 +0100

acc. check: add writer specific accessibility issue

This adds sw::AccessibilityIssue and refactors the existing
code to work with it.

In addition adds AccessibilityIssueCollection which holds
the vector of results.

Change-Id: Ide0fdbdba337bbf8c2fd18770895fb63a22528b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85919
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 

diff --git a/include/svx/AccessibilityCheck.hxx 
b/include/svx/AccessibilityCheck.hxx
index 14e31065b879..f31b39d1d165 100644
--- a/include/svx/AccessibilityCheck.hxx
+++ b/include/svx/AccessibilityCheck.hxx
@@ -11,9 +11,10 @@
 #ifndef INCLUDED_SVX_ACCESSIBILITYCHECK_HXX
 #define INCLUDED_SVX_ACCESSIBILITYCHECK_HXX
 
+#include 
 #include 
+#include 
 #include 
-#include 
 #include 
 
 namespace svx
@@ -21,14 +22,14 @@ namespace svx
 class SVX_DLLPUBLIC AccessibilityCheck
 {
 protected:
-std::vector m_aIssueCollection;
+AccessibilityIssueCollection m_aIssueCollection;
 
 public:
 virtual ~AccessibilityCheck() {}
 
 virtual void check() = 0;
 
-std::vector const& getIssueCollecton() { return 
m_aIssueCollection; }
+AccessibilityIssueCollection& getIssueCollecton() { return 
m_aIssueCollection; }
 };
 
 } // end svx namespace
diff --git a/include/svx/AccessibilityCheckDialog.hxx 
b/include/svx/AccessibilityCheckDialog.hxx
index c55d69cbc696..d1cb2b8e20ab 100644
--- a/include/svx/AccessibilityCheckDialog.hxx
+++ b/include/svx/AccessibilityCheckDialog.hxx
@@ -27,27 +27,27 @@ private:
 std::unique_ptr m_xContainer;
 std::unique_ptr m_xLabel;
 
-svx::AccessibilityIssue const& m_rAccessibilityIssue;
+std::shared_ptr const& m_pAccessibilityIssue;
 
 public:
 AccessibilityCheckEntry(weld::Container* pParent,
-svx::AccessibilityIssue const& 
rAccessibilityIssue);
+std::shared_ptr const& 
pAccessibilityIssue);
+
 weld::Widget* get_widget() const { return m_xContainer.get(); }
 };
 
 class SVX_DLLPUBLIC AccessibilityCheckDialog final : public 
weld::GenericDialogController
 {
 private:
-std::vector m_rAccessibilityIssueCollection;
+AccessibilityIssueCollection m_aIssueCollection;
 std::vector> 
m_aAccessibilityCheckEntries;
 
 // Controls
 std::unique_ptr 

[Libreoffice-commits] core.git: 2 commits - cui/source

2019-12-12 Thread Caolán McNamara (via logerrit)
 cui/source/customize/cfgutil.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit dcad3c08b10ca6ef6ff01a43316d6dafcd0170b8
Author: Caolán McNamara 
AuthorDate: Thu Dec 12 15:29:43 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 12 21:13:13 2019 +0100

theChild->getName() already available as uiName

Change-Id: I2792b2ac4f0d17dfc2fe68eeacb4dee2173fe5d2
Reviewed-on: https://gerrit.libreoffice.org/85068
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 51b41faf2e26..b464ff53f4e4 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -519,8 +519,8 @@ void CuiConfigGroupListBox::FillScriptList(const 
css::uno::Reference< css::scrip
 OUString uiName = theChild->getName();
 if ( bIsRootNode )
 {
-if (  ! (theChild->getName() == user  || 
theChild->getName() == share ||
- theChild->getName() == currentDocTitle ) )
+if (  ! (uiName == user  || uiName == share ||
+ uiName == currentDocTitle ) )
 {
 bDisplay=false;
 }
commit f2c6faa72c60f1438340173f5a6dc5533bce55ba
Author: Caolán McNamara 
AuthorDate: Thu Dec 12 15:28:08 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 12 21:12:45 2019 +0100

children[n] already available as theChild

Change-Id: I3eeb072ff393033fb681956b4ac7fe1c71745a0d
Reviewed-on: https://gerrit.libreoffice.org/85067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 1d94255e73eb..51b41faf2e26 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -536,17 +536,17 @@ void CuiConfigGroupListBox::FillScriptList(const 
css::uno::Reference< css::scrip
 }
 }
 }
-if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT  
&& bDisplay )
+if (theChild->getType() != browse::BrowseNodeTypes::SCRIPT  && 
bDisplay )
 {
 //  We call acquire on the XBrowseNode so that it does not
 //  get autodestructed and become invalid when accessed later.
 theChild->acquire();
 
 bool bChildOnDemand = false;
-if ( !bCheapChildrenOnDemand && 
children[n]->hasChildNodes() )
+if ( !bCheapChildrenOnDemand && theChild->hasChildNodes() )
 {
 Sequence< Reference< browse::XBrowseNode > > 
grandchildren =
-children[n]->getChildNodes();
+theChild->getChildNodes();
 
 for ( sal_Int32 m = 0; m < grandchildren.getLength(); 
++m )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source sc/inc sc/source

2019-12-11 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/align.cxx |   56 ++
 sc/inc/attrib.hxx |   12 +
 sc/inc/globstr.hrc|1 
 sc/inc/scitems.hxx|2 
 sc/source/core/data/attarray.cxx  |2 
 sc/source/core/data/attrib.cxx|   33 +++
 sc/source/core/data/column2.cxx   |2 
 sc/source/core/data/docpool.cxx   |2 
 sc/source/filter/excel/xistyle.cxx|2 
 sc/source/filter/oox/stylesbuffer.cxx |2 
 sc/source/ui/Accessibility/AccessibleText.cxx |2 
 sc/source/ui/unoobj/cellsuno.cxx  |6 +-
 sc/source/ui/unoobj/styleuno.cxx  |7 +--
 sc/source/ui/view/output2.cxx |2 
 sc/source/ui/view/viewfunc.cxx|2 
 15 files changed, 109 insertions(+), 24 deletions(-)

New commits:
commit 5d44be6c13e6da2d50c0b75d0794a69e796072b5
Author: Caolán McNamara 
AuthorDate: Wed Dec 11 14:05:45 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 11 17:09:53 2019 +0100

Related: tdf#129300 clear properties that are set back to their original 
state

Change-Id: Ic957afbdcf6decef07d15fa10a560e560de5795a
Reviewed-on: https://gerrit.libreoffice.org/84951
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 48ee07764cd5..d0dbae16e685 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -174,8 +174,11 @@ std::unique_ptr 
AlignmentTabPage::Create(weld::Container* pPage, wel
 
 bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 {
+const SfxItemSet& rOldSet = GetItemSet();
+
 bool bChanged = SfxTabPage::FillItemSet(rSet);
 
+sal_uInt16 nWhich = GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY);
 if (m_xLbHorAlign->get_value_changed_from_saved())
 {
 SvxCellHorJustify eJustify(SvxCellHorJustify::Standard);
@@ -201,10 +204,13 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 eJustify = SvxCellHorJustify::Repeat;
 break;
 }
-rSet->Put(SvxHorJustifyItem(eJustify, 
GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY)));
+rSet->Put(SvxHorJustifyItem(eJustify, nWhich));
 bChanged = true;
 }
+else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false))
+rSet->InvalidateItem(nWhich);
 
+nWhich = GetWhich(SID_ATTR_ALIGN_INDENT);
 if (m_xEdIndent->get_value_changed_from_saved())
 {
 const SfxUInt16Item* pIndentItem = static_cast(GetOldItem(
@@ -215,7 +221,10 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 rSet->Put(*pNewIndentItem);
 bChanged = true;
 }
+else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false))
+rSet->InvalidateItem(nWhich);
 
+nWhich = GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY);
 if (m_xLbVerAlign->get_value_changed_from_saved())
 {
 SvxCellVerJustify eJustify(SvxCellVerJustify::Standard);
@@ -238,10 +247,13 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 eJustify = SvxCellVerJustify::Block;
 break;
 }
-rSet->Put(SvxVerJustifyItem(eJustify, 
GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY)));
+rSet->Put(SvxVerJustifyItem(eJustify, nWhich));
 bChanged = true;
 }
+else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false))
+rSet->InvalidateItem(nWhich);
 
+nWhich = GetWhich(SID_ATTR_ALIGN_DEGREES);
 if (m_xNfRotate->get_value_changed_from_saved())
 {
 const SdrAngleItem* pAngleItem = static_cast(GetOldItem(
@@ -252,19 +264,22 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 rSet->Put(*pNewAngleItem);
 bChanged = true;
 }
+else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false))
+rSet->InvalidateItem(nWhich);
 
+nWhich = GetWhich(SID_ATTR_ALIGN_LOCKPOS);
 if (m_aVsRefEdge.IsValueChangedFromSaved())
 {
 switch (m_aVsRefEdge.GetSelectedItemId())
 {
 case IID_CELLLOCK:
-
rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_STANDARD, 
GetWhich(SID_ATTR_ALIGN_LOCKPOS)));
+
rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_STANDARD, nWhich));
 break;
 case IID_TOPLOCK:
-
rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_TOP, 
GetWhich(SID_ATTR_ALIGN_LOCKPOS)));
+
rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_TOP, nWhich));
 break;
 case IID_BOTTOMLOCK:
-
rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_BOTTOM, 
GetWhich(SID_ATTR_ALIGN_LOCKPOS)));
+
rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_BOTTOM, 

[Libreoffice-commits] core.git: 2 commits - cui/source sc/inc sc/qa sc/source

2019-12-11 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/align.cxx |   14 ++-
 sc/inc/attrib.hxx |   24 +
 sc/inc/globstr.hrc|4 ++
 sc/inc/scitems.hxx|8 ++--
 sc/qa/extras/anchor.cxx   |2 -
 sc/source/core/data/attrib.cxx|   46 --
 sc/source/core/data/column2.cxx   |2 -
 sc/source/core/data/docpool.cxx   |4 +-
 sc/source/core/data/patattr.cxx   |2 -
 sc/source/core/tool/autoform.cxx  |6 +--
 sc/source/filter/excel/xistyle.cxx|2 -
 sc/source/filter/html/htmlpars.cxx|3 +
 sc/source/filter/oox/stylesbuffer.cxx |2 -
 sc/source/filter/qpro/qprostyle.cxx   |4 +-
 sc/source/ui/Accessibility/AccessibleText.cxx |2 -
 sc/source/ui/app/inputhdl.cxx |1 
 sc/source/ui/view/formatsh.cxx|2 -
 sc/source/ui/view/output2.cxx |2 -
 18 files changed, 106 insertions(+), 24 deletions(-)

New commits:
commit cfbac86a0423c552a042ae7b9702c0904d4e232a
Author: Caolán McNamara 
AuthorDate: Tue Dec 10 20:03:38 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 11 17:09:01 2019 +0100

Related: tdf#129300 add ScHyphenateCell to provide a description

Change-Id: If00a50a36cf2bb5c9b775a4ca1000af5c5be7bf4
Reviewed-on: https://gerrit.libreoffice.org/84892
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 1994a7e8699c..ead7d7d4f014 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -298,7 +298,12 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 
 if (m_xBtnHyphen->get_state_changed_from_saved())
 {
-rSet->Put(SfxBoolItem(GetWhich(SID_ATTR_ALIGN_HYPHENATION), 
m_xBtnHyphen->get_active()));
+const SfxBoolItem* pHyphItem = static_cast(GetOldItem(
+*rSet, 
SID_ATTR_ALIGN_HYPHENATION));
+assert(pHyphItem);
+std::unique_ptr 
pNewHyphItem(static_cast(pHyphItem->Clone()));
+pNewHyphItem->SetValue(m_xBtnHyphen->get_active());
+rSet->Put(*pNewHyphItem);
 bChanged = true;
 }
 
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 100766e3afa9..59be64fb243d 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -333,6 +333,18 @@ public:
  const IntlWrapper& rIntl) const override;
 };
 
+class SC_DLLPUBLIC ScHyphenateCell final : public SfxBoolItem
+{
+public:
+ScHyphenateCell(bool bHyphenate= false);
+virtual ScHyphenateCell* Clone(SfxItemPool *pPool = nullptr) const 
override;
+virtual bool GetPresentation(SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString ,
+ const IntlWrapper& rIntl) const override;
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 518d033814ee..4f13865ca778 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -521,6 +521,8 @@
 #define STR_VERTICALSTACKCELL_OFF   
NC_("STR_VERTICALSTACKCELL_OFF", "Vertically stacked: Off")
 #define STR_LINEBREAKCELL_ONNC_("STR_LINEBREAKCELL_ON", 
"Wrap text automatically: On")
 #define STR_LINEBREAKCELL_OFF   NC_("STR_LINEBREAKCELL_OFF", 
"Wrap text automatically: Off")
+#define STR_HYPHENATECELL_ONNC_("STR_HYPHENATECELL_ON", 
"Hyphenate: On")
+#define STR_HYPHENATECELL_OFF   NC_("STR_HYPHENATECELL_OFF", 
"Hyphenate: Off")
 
 #endif
 
diff --git a/sc/inc/scitems.hxx b/sc/inc/scitems.hxx
index ce40a2c4a267..674bf07fa3e9 100644
--- a/sc/inc/scitems.hxx
+++ b/sc/inc/scitems.hxx
@@ -111,7 +111,7 @@ class SvxSizeItem;
 #define ATTR_USERDEFTypedWhichId(122)
// not saved in binary files
 #define ATTR_FONT_WORDLINE  TypedWhichId(123)
 #define ATTR_FONT_RELIEFTypedWhichId(124)
-#define ATTR_HYPHENATE  TypedWhichId(125)
+#define ATTR_HYPHENATE  TypedWhichId(125)
 #define ATTR_SCRIPTSPACETypedWhichId(126)
 #define ATTR_HANGPUNCTUATIONTypedWhichId(127)
 #define ATTR_FORBIDDEN_RULESTypedWhichId(128)
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 75337c00f75d..4ed61887a67a 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -808,4 +808,24 @@ bool ScLineBreakCell::GetPresentation(SfxItemPresentation,
 return true;
 }
 
+ScHyphenateCell::ScHyphenateCell(bool bHyphenate)
+: SfxBoolItem(ATTR_HYPHENATE, bHyphenate)
+{
+}
+
+ScHyphenateCell* ScHyphenateCell::Clone(SfxItemPool*) const
+{
+return new 

[Libreoffice-commits] core.git: 2 commits - cui/source editeng/inc

2019-12-11 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/align.cxx |6 +-
 editeng/inc/strings.hrc   |4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 6156d2fa9f67469d55fc9d01632e6d33a698fdf6
Author: Caolán McNamara 
AuthorDate: Tue Dec 10 20:11:04 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 11 12:26:56 2019 +0100

Related: tdf#129300 make Automatic/Distributed state what is automatic

Change-Id: Ib246479761556858e92052edf86a18753d44c583
Reviewed-on: https://gerrit.libreoffice.org/84893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 77b325d9f81b..44203405b9ff 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -315,7 +315,6 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 
 // Special treatment for distributed alignment; we need to set the justify
 // method to 'distribute' to distinguish from the normal justification.
-
 sal_uInt16 nWhichHorJM = GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD);
 lcl_SetJustifyMethodToItemSet(*rSet, nWhichHorJM, *m_xLbHorAlign, 
ALIGNDLG_HORALIGN_DISTRIBUTED);
 if (!bChanged)
diff --git a/editeng/inc/strings.hrc b/editeng/inc/strings.hrc
index 7982997116b8..7ed30a3ef599 100644
--- a/editeng/inc/strings.hrc
+++ b/editeng/inc/strings.hrc
@@ -36,8 +36,8 @@ const char* RID_SVXITEMS_VERJUST[] =
 const char* RID_SVXITEMS_JUSTMETHOD[] =
 {
 // enum SvxCellJustifyMethod 

-NC_("RID_SVXITEMS_JUSTMETHOD_AUTO", "Automatic"),
-NC_("RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE", "Distributed")
+NC_("RID_SVXITEMS_JUSTMETHOD_AUTO", "Automatic Justify"),
+NC_("RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE", "Distributed Justify")
 };
 
 #endif
commit 2f13f0693de4c301898f304999225738334aadb0
Author: Caolán McNamara 
AuthorDate: Tue Dec 10 20:15:27 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 11 12:26:43 2019 +0100

tdf#129300 If it would create no change, don't force it

otherwise a bogus "change" from the parent style is shown in the organizer

this dates to...

commit 755ad6834625488c5d31d4bacc9370eae7ffd8f3
Date:   Tue Oct 5 11:15:56 2010 -0400

Ported calc-distributed-cell-text-*.diff from ooo-build.

Change-Id: I49fc654a232d3c0f43f8add9a9f9fee34a6c5add
Reviewed-on: https://gerrit.libreoffice.org/84894
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 7e68685beee2..77b325d9f81b 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -92,6 +92,11 @@ void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, 
sal_uInt16 nWhichJM, const
 if (rLB.get_active() == nListPos)
 eJM = SvxCellJustifyMethod::Distribute;
 
+// tdf#129300 If it would create no change, don't force it
+const SvxJustifyMethodItem& rOldItem = static_cast(rSet.Get(nWhichJM));
+if (rOldItem.GetValue() == eJM)
+return;
+
 SvxJustifyMethodItem aItem(eJM, nWhichJM);
 rSet.Put(aItem);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source include/vcl

2019-12-08 Thread Caolán McNamara (via logerrit)
 cui/source/options/optcolor.cxx |6 --
 include/vcl/weld.hxx|9 +
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 05117c0dc231ea5c195c8de9a46d46def2e565ac
Author: Caolán McNamara 
AuthorDate: Sat Dec 7 20:21:18 2019 +
Commit: Caolán McNamara 
CommitDate: Sun Dec 8 21:23:01 2019 +0100

document get_extents_relative_to return code

Change-Id: I25d3d6a2ca6155adc43f2e1079033cacbd16ccb8
Reviewed-on: https://gerrit.libreoffice.org/84697
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index c8eeb9ba04a0..82dd5fb2c00c 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -146,6 +146,15 @@ public:
 virtual int get_margin_left() const = 0;
 virtual int get_margin_right() const = 0;
 
+/*
+ * Report the extents of this widget relative to the rRelative target 
widget.
+ *
+ * To succeed, both widgets must be realized, and must share a common 
toplevel.
+ *
+ * returns false if the relative extents could not be determined, e.g. if
+ * either widget was not realized, or there was no common ancestor.
+ * Otherwise true.
+ */
 virtual bool get_extents_relative_to(Widget& rRelative, int& x, int& y, 
int& width, int& height)
 = 0;
 
commit 235e1efd2fd938ac673a7c196a6264a0df5cfbc5
Author: Caolán McNamara 
AuthorDate: Sat Dec 7 20:11:53 2019 +
Commit: Caolán McNamara 
CommitDate: Sun Dec 8 21:22:50 2019 +0100

Resolves: tdf#129243 check return to see if results valid

Change-Id: Ia4169cda3c1a596ceedd074dd0e59898f9c72ff9
Reviewed-on: https://gerrit.libreoffice.org/84695
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 0e6cb822715a..360c18e80d49 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -876,8 +876,10 @@ IMPL_LINK_NOARG(SvxColorOptionsTabPage, AdjustHeaderBar, 
const Size&, void)
 {
 // horizontal positions
 int nX0 = 0, nX1, nX2, y, width, height;
-m_rWidget1.get_extents_relative_to(*m_xTable, nX1, y, width, height);
-m_rWidget2.get_extents_relative_to(*m_xTable, nX2, y, width, height);
+if (!m_rWidget1.get_extents_relative_to(*m_xTable, nX1, y, width, height))
+return;
+if (!m_rWidget2.get_extents_relative_to(*m_xTable, nX2, y, width, height))
+return;
 auto nTextWidth1 = nX1 - nX0;
 auto nTextWidth2 = nX2 - nX1;
 m_xOnFT->set_size_request(nTextWidth1, -1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source

2019-11-26 Thread Caolán McNamara (via logerrit)
 cui/source/customize/cfg.cxx |   33 +++--
 cui/source/inc/cfg.hxx   |1 +
 2 files changed, 12 insertions(+), 22 deletions(-)

New commits:
commit 6e6233a5d0940e5bbdb346142091b0ae2e54e640
Author: Caolán McNamara 
AuthorDate: Mon Nov 25 12:15:58 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 26 13:52:21 2019 +0100

tdf#126043 identify the frame module just once

Change-Id: I7f68cf67838bb08672975e7a38cf213022e39ed8
Reviewed-on: https://gerrit.libreoffice.org/83672
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index e47bb5d4bf7f..30dd22c71325 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1040,12 +1040,12 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
 
 m_xFrame = GetFrame();
-OUString aModuleId = GetFrameWithDefaultAndIdentify( m_xFrame );
+m_aModuleId = GetFrameWithDefaultAndIdentify( m_xFrame );
 
 // replace %MODULENAME in the label with the correct module name
 uno::Reference< css::frame::XModuleManager2 > xModuleManager(
 css::frame::ModuleManager::create( xContext ));
-OUString aModuleName = SvxConfigPageHelper::GetUIModuleName( 
aModuleId, xModuleManager );
+OUString aModuleName = SvxConfigPageHelper::GetUIModuleName( 
m_aModuleId, xModuleManager );
 
 uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier >
 xModuleCfgSupplier( 
css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
@@ -1056,11 +1056,11 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 try
 {
 xCfgMgr =
-xModuleCfgSupplier->getUIConfigurationManager( aModuleId );
+xModuleCfgSupplier->getUIConfigurationManager( m_aModuleId );
 
 pModuleData = CreateSaveInData( xCfgMgr,
 uno::Reference< 
css::ui::XUIConfigurationManager >(),
-aModuleId,
+m_aModuleId,
 false );
 }
 catch ( container::NoSuchElementException& )
@@ -1077,7 +1077,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 OUString aTitle;
 uno::Reference< frame::XController > xController =
 m_xFrame->getController();
-if ( CanConfig( aModuleId ) && xController.is() )
+if ( CanConfig( m_aModuleId ) && xController.is() )
 {
 uno::Reference< frame::XModel > xModel( xController->getModel() );
 if ( xModel.is() )
@@ -1096,7 +1096,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 SaveInData* pDocData = nullptr;
 if ( xDocCfgMgr.is() )
 {
-pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, true 
);
+pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, m_aModuleId, 
true );
 
 if ( !pDocData->IsReadOnly() )
 {
@@ -1144,7 +1144,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 DBG_ASSERT( pCurrentSaveInData, "SvxConfigPage::Reset(): no 
SaveInData" );
 #endif
 
-if ( CanConfig( aModuleId ) )
+if ( CanConfig( m_aModuleId ) )
 {
 // Load configuration for other open documents which have
 // same module type
@@ -1178,7 +1178,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 } catch(const uno::Exception&)
 { aCheckId.clear(); }
 
-if ( aModuleId == aCheckId )
+if ( m_aModuleId == aCheckId )
 {
 // try to get the document based ui configuration 
manager
 OUString aTitle2;
@@ -1207,7 +1207,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
 
 if ( xDocCfgMgr.is() )
 {
-SaveInData* pData = CreateSaveInData( xDocCfgMgr, 
xCfgMgr, aModuleId, true );
+SaveInData* pData = CreateSaveInData( xDocCfgMgr, 
xCfgMgr, m_aModuleId, true );
 
 if ( pData && !pData->IsReadOnly() )
 {
@@ -1406,9 +1406,8 @@ int SvxConfigPage::AddFunction(int nTarget, bool 
bAllowDuplicates)
 }
 
 OUString aDisplayName;
-OUString aModuleId = vcl::CommandInfoProvider::GetModuleIdentifier( 
m_xFrame );
 
-auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aURL, 
aModuleId);
+auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aURL, 
m_aModuleId);
 
 if ( typeid(*pCurrentSaveInData) == typeid(ContextMenuSaveInData) )
 aDisplayName = 

[Libreoffice-commits] core.git: 2 commits - cui/source

2019-10-23 Thread Jan-Marek Glogowski (via logerrit)
 cui/source/options/certpath.cxx |   39 ++-
 cui/source/options/certpath.hxx |   11 ---
 2 files changed, 18 insertions(+), 32 deletions(-)

New commits:
commit aceab9cbf10486d2179d016b36511d907d402825
Author: Jan-Marek Glogowski 
AuthorDate: Tue Oct 1 14:06:10 2019 +
Commit: Jan-Marek Glogowski 
CommitDate: Wed Oct 23 10:26:20 2019 +0200

tdf#127909 don't always select the first entry

Change-Id: Ic65667c748a62d989a4f38113155ba2715830629
Reviewed-on: https://gerrit.libreoffice.org/79977
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 95898629c7e8..dae67fb379e6 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -67,14 +67,9 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
 
 if (!profile.isEmpty())
 {
-m_xCertPathList->append();
-const int nRow = m_xCertPathList->n_children() - 1;
-m_xCertPathList->set_toggle(nRow, TRISTATE_FALSE, 0);
 OUString sEntry = OUString::createFromAscii(productNames[i]) + 
":" + profile;
-m_xCertPathList->set_text(nRow, sEntry, 1);
 OUString sProfilePath = xMozillaBootstrap->getProfilePath( 
productTypes[i], profile );
-m_xCertPathList->set_text(nRow, sProfilePath, 2);
-m_xCertPathList->set_id(nRow, sProfilePath);
+AddCertPath(sEntry, sProfilePath);
 }
 }
 }
@@ -114,12 +109,6 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
 const char* pEnv = getenv("MOZILLA_CERTIFICATE_FOLDER");
 if (pEnv)
 AddCertPath("$MOZILLA_CERTIFICATE_FOLDER", OUString(pEnv, 
strlen(pEnv), osl_getThreadTextEncoding()));
-
-if (m_xCertPathList->n_children())
-{
-m_xCertPathList->set_toggle(0, TRISTATE_TRUE, 0);
-HandleEntryChecked(0);
-}
 }
 
 IMPL_LINK_NOARG(CertPathDialog, OKHdl_Impl, weld::Button&, void)
commit 162629610dc07f0ed4e15aeed9bd4cad6bea79d1
Author: Jan-Marek Glogowski 
AuthorDate: Tue Oct 1 16:10:42 2019 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Wed Oct 23 10:26:07 2019 +0200

tdf#127909 refactoring of the cert path dialog

* Drop some unused memeber variables
* Rename some member variables
* Add a few const

Change-Id: Iea3018f03ab855a357d27b93902323197077ea04
Reviewed-on: https://gerrit.libreoffice.org/79976
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 2fa4d3e0e7b9..95898629c7e8 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -23,14 +23,13 @@ using namespace ::com::sun::star;
 
 CertPathDialog::CertPathDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/certdialog.ui", "CertDialog")
-, m_xAddBtn(m_xBuilder->weld_button("add"))
-, m_xOKBtn(m_xBuilder->weld_button("ok"))
+, m_xManualButton(m_xBuilder->weld_button("add"))
+, m_xOKButton(m_xBuilder->weld_button("ok"))
 , m_xCertPathList(m_xBuilder->weld_tree_view("paths"))
-, m_xAddDialogLabel(m_xBuilder->weld_label("certdir"))
-, m_xManualLabel(m_xBuilder->weld_label("manual"))
 {
-m_sAddDialogText = m_xAddDialogLabel->get_label();
-m_sManual = m_xManualLabel->get_label();
+// these are just used to get translated strings
+m_sAddDialogText = m_xBuilder->weld_label("certdir")->get_label();
+m_sManualLabel = m_xBuilder->weld_label("manual")->get_label();
 
 
m_xCertPathList->set_size_request(m_xCertPathList->get_approximate_digit_width()
 * 70,
   m_xCertPathList->get_height_rows(6));
@@ -45,11 +44,12 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
 m_xCertPathList->set_toggle_columns_as_radio(aRadioColumns);
 
 m_xCertPathList->connect_toggled(LINK(this, CertPathDialog, 
CheckHdl_Impl));
-m_xAddBtn->connect_clicked( LINK( this, CertPathDialog, AddHdl_Impl ) );
-m_xOKBtn->connect_clicked( LINK( this, CertPathDialog, OKHdl_Impl ) );
+m_xManualButton->connect_clicked( LINK( this, CertPathDialog, 
ManualHdl_Impl ) );
+m_xOKButton->connect_clicked( LINK( this, CertPathDialog, OKHdl_Impl ) );
 
 try
 {
+// In the reverse order of preference for the default selected profile
 mozilla::MozillaProductType const productTypes[3] = {
 mozilla::MozillaProductType_Thunderbird,
 mozilla::MozillaProductType_Firefox,
@@ -101,7 +101,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
 if ( result == ::osl::FileBase::E_None  )
 {
 // the cert path exists
-AddCertPath(m_sManual, sUserSetCertPath);
+AddCertPath(m_sManualLabel, sUserSetCertPath);
  

[Libreoffice-commits] core.git: 2 commits - cui/source vcl/unx

2019-10-15 Thread Caolán McNamara (via logerrit)
 cui/source/options/dbregister.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   36 ++--
 2 files changed, 31 insertions(+), 7 deletions(-)

New commits:
commit 4a983f3b2ff9a9cbc593ae8a69e744f4bbf5df11
Author: Caolán McNamara 
AuthorDate: Tue Oct 15 16:24:32 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Oct 15 20:51:54 2019 +0200

honour per-widget RTL override

Change-Id: I29a499d29a3c0fabc594efbd5f966b108659b166
Reviewed-on: https://gerrit.libreoffice.org/80853
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f1de1bbfbacb..333f0e395f8b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1670,6 +1670,19 @@ static MouseEventModifiers 
ImplGetMouseMoveMode(sal_uInt16 nCode)
 return nMode;
 }
 
+namespace
+{
+bool SwapForRTL(GtkWidget* pWidget)
+{
+GtkTextDirection eDir = gtk_widget_get_direction(pWidget);
+if (eDir == GTK_TEXT_DIR_RTL)
+return true;
+if (eDir == GTK_TEXT_DIR_LTR)
+return false;
+return AllSettings::GetLayoutRTL();
+}
+}
+
 class GtkInstanceWidget : public virtual weld::Widget
 {
 protected:
@@ -1812,6 +1825,16 @@ protected:
 return pThis->signal_popup_menu(aCEvt);
 }
 
+bool SwapForRTL() const
+{
+GtkTextDirection eDir = gtk_widget_get_direction(m_pWidget);
+if (eDir == GTK_TEXT_DIR_RTL)
+return true;
+if (eDir == GTK_TEXT_DIR_LTR)
+return false;
+return AllSettings::GetLayoutRTL();
+}
+
 private:
 bool m_bTakeOwnership;
 bool m_bFrozen;
@@ -1922,7 +1945,8 @@ private:
 }
 
 Point aPos(pEvent->x, pEvent->y);
-if (AllSettings::GetLayoutRTL())
+
+if (SwapForRTL())
 aPos.setX(gtk_widget_get_allocated_width(m_pWidget) - 1 - 
aPos.X());
 
 if 
(gdk_event_triggers_context_menu(reinterpret_cast(pEvent)) && 
pEvent->type == GDK_BUTTON_PRESS)
@@ -1962,7 +1986,7 @@ private:
 return false;
 
 Point aPos(pEvent->x, pEvent->y);
-if (AllSettings::GetLayoutRTL())
+if (SwapForRTL())
 aPos.setX(gtk_widget_get_allocated_width(m_pWidget) - 1 - 
aPos.X());
 sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state);
 sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | 
KEY_MOD1 | KEY_MOD2));
@@ -1985,7 +2009,7 @@ private:
 return false;
 
 Point aPos(pEvent->x, pEvent->y);
-if (AllSettings::GetLayoutRTL())
+if (SwapForRTL())
 aPos.setX(gtk_widget_get_allocated_width(m_pWidget) - 1 - 
aPos.X());
 sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state);
 sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | 
KEY_MOD1 | KEY_MOD2));
@@ -6575,7 +6599,7 @@ public:
 {
 GdkRectangle aRect{static_cast(rRect.Left()), 
static_cast(rRect.Top()),
static_cast(rRect.GetWidth()), 
static_cast(rRect.GetHeight())};
-if (AllSettings::GetLayoutRTL())
+if (SwapForRTL(pWidget))
 aRect.x = gtk_widget_get_allocated_width(pWidget) - 
aRect.width - 1 - aRect.x;
 
 // Send a keyboard event through gtk_main_do_event to toggle any 
active tooltip offs
@@ -10168,7 +10192,7 @@ private:
 aGdkHelpArea.y = aHelpArea.Top();
 aGdkHelpArea.width = aHelpArea.GetWidth();
 aGdkHelpArea.height = aHelpArea.GetHeight();
-if (AllSettings::GetLayoutRTL())
+if (pThis->SwapForRTL())
 aGdkHelpArea.x = gtk_widget_get_allocated_width(pGtkWidget) - 
aGdkHelpArea.width - 1 - aGdkHelpArea.x;
 gtk_tooltip_set_tip_area(tooltip, );
 return true;
@@ -10181,7 +10205,7 @@ private:
 {
 SalWheelMouseEvent aEvt(GtkSalFrame::GetWheelEvent(*pEvent));
 
-if (AllSettings::GetLayoutRTL())
+if (SwapForRTL())
 aEvt.mnX = gtk_widget_get_allocated_width(m_pWidget) - 1 - 
aEvt.mnX;
 
 CommandWheelMode nMode;
commit 6cfbec5f561929e020b68f5a79738d38c0806cd4
Author: Caolán McNamara 
AuthorDate: Tue Oct 15 17:13:01 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Oct 15 20:51:41 2019 +0200

database options page too tall

Change-Id: I79ce30e2254980994e64764525efc307c1a79db1
Reviewed-on: https://gerrit.libreoffice.org/80852
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 0cf15071adf8..171e3f869ecc 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -90,7 +90,7 @@ 
DbRegistrationOptionsPage::DbRegistrationOptionsPage(weld::Container* pPage, wel
 , m_xIter(m_xPathBox->make_iterator())
 {

[Libreoffice-commits] core.git: 2 commits - cui/source include/vcl reportdesign/source

2019-10-13 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx   |2 +-
 include/vcl/toolbox.hxx  |   10 --
 include/vcl/vclenum.hxx  |   10 ++
 reportdesign/source/ui/dlg/Condition.hxx |6 --
 4 files changed, 11 insertions(+), 17 deletions(-)

New commits:
commit 414d10d8a3041e5e2aa899b59c1919e41c75371d
Author: Caolán McNamara 
AuthorDate: Sat Oct 12 20:04:46 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 13 16:18:19 2019 +0200

move ToolBoxButtonSize into vclenum

Change-Id: I684d192296642bc507a6f75dd52a5ce72b028157
Reviewed-on: https://gerrit.libreoffice.org/80721
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index fb320a25c289..1aae24ea20e1 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -68,10 +68,10 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
-#include 
 #if HAVE_FEATURE_OPENGL
 #include 
 #endif
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 0fa569248dd2..56fe90bff710 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -58,16 +58,6 @@ namespace o3tl
 template<> struct typed_flags : 
is_typed_flags {};
 }
 
-// small, large, size32 force an exact toolbox size for proper alignment
-// DontCare will let the toolbox decide about its size
-enum class ToolBoxButtonSize
-{
-DontCare,
-Small,
-Large,
-Size32,
-};
-
 enum class ToolBoxLayoutMode
 {
 Normal,  // traditional layout, items are centered in the toolbar
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index c7ced830da49..7d8728e90dc1 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -288,6 +288,16 @@ namespace o3tl
 template<> struct typed_flags : 
is_typed_flags {};
 }
 
+// small, large, size32 force an exact toolbox size for proper alignment
+// DontCare will let the toolbox decide about its size
+enum class ToolBoxButtonSize
+{
+DontCare,
+Small,
+Large,
+Size32,
+};
+
 #endif // INCLUDED_VCL_VCLENUM_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d0a537a26a5f9def5d85f5c027a9029dda1e58bd
Author: Caolán McNamara 
AuthorDate: Sat Oct 12 19:51:13 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 13 16:18:08 2019 +0200

drop some unnecessary includes

Change-Id: I07693dd5199a1fcc08c7ba25bd986d9da76958b3
Reviewed-on: https://gerrit.libreoffice.org/80720
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/dlg/Condition.hxx 
b/reportdesign/source/ui/dlg/Condition.hxx
index 680632e8db51..d16e81ce8ca3 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -27,12 +27,6 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source include/svx reportdesign/inc reportdesign/source sc/source svx/source sw/source

2019-10-13 Thread Caolán McNamara (via logerrit)
 cui/source/inc/FontFeaturesDialog.hxx  |2 
 cui/source/inc/chardlg.hxx |2 
 include/svx/fntctrl.hxx|6 +-
 reportdesign/inc/pch/precompiled_rpt.hxx   |   37 +++--
 reportdesign/inc/pch/precompiled_rptui.hxx |6 +-
 reportdesign/inc/pch/precompiled_rptxml.hxx|4 +
 reportdesign/source/ui/dlg/Condition.hxx   |2 
 sc/source/ui/condformat/condformatdlgentry.cxx |2 
 sc/source/ui/inc/condformatdlgentry.hxx|6 +-
 svx/source/dialog/fntctrl.cxx  |   52 -
 sw/source/ui/config/optpage.cxx|   12 ++---
 sw/source/uibase/inc/optpage.hxx   |8 +--
 12 files changed, 60 insertions(+), 79 deletions(-)

New commits:
commit b883c7142b081ec121c546845ca1a228ea31ebb7
Author: Caolán McNamara 
AuthorDate: Sat Oct 12 16:39:46 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 13 16:17:33 2019 +0200

rename FontPrevWindow back to SvxFontPrevWindow

Change-Id: Ife6f7bbc64f397e502d50c629769a8b637a591c8
Reviewed-on: https://gerrit.libreoffice.org/80718
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/FontFeaturesDialog.hxx 
b/cui/source/inc/FontFeaturesDialog.hxx
index d30f92305067..93e5f7c4a76e 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -48,7 +48,7 @@ private:
 OUString m_sFontName;
 OUString m_sResultFontName;
 
-FontPrevWindow m_aPreviewWindow;
+SvxFontPrevWindow m_aPreviewWindow;
 std::unique_ptr m_xContentWindow;
 std::unique_ptr m_xContentGrid;
 std::unique_ptr m_xPreviewWindow;
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 15906a085657..7cf7f8e315ec 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -35,7 +35,7 @@ class FontList;
 class SvxCharBasePage : public SfxTabPage
 {
 protected:
-FontPrevWindow   m_aPreviewWin;
+SvxFontPrevWindow   m_aPreviewWin;
 std::unique_ptr m_xPreviewWin;
 
 boolm_bPreviewBackgroundToCharacter;
diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx
index f2489c750f3c..af085725dc3d 100644
--- a/include/svx/fntctrl.hxx
+++ b/include/svx/fntctrl.hxx
@@ -28,7 +28,7 @@
 class SfxItemSet;
 class FontPrevWin_Impl;
 
-class SAL_WARN_UNUSED SVX_DLLPUBLIC FontPrevWindow : public 
weld::CustomWidgetController
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontPrevWindow : public 
weld::CustomWidgetController
 {
 private:
 std::unique_ptr pImpl;
@@ -39,8 +39,8 @@ private:
 SVX_DLLPRIVATE static void SetFontLang(const SfxItemSet& rSet, sal_uInt16 
nSlot, SvxFont& rFont);
 
 public:
-FontPrevWindow();
-virtual ~FontPrevWindow() override;
+SvxFontPrevWindow();
+virtual ~SvxFontPrevWindow() override;
 
 SvxFont&GetFont();
 const SvxFont&  GetFont() const;
diff --git a/reportdesign/source/ui/dlg/Condition.hxx 
b/reportdesign/source/ui/dlg/Condition.hxx
index 1b9a5ea365fa..680632e8db51 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -89,7 +89,7 @@ namespace rptui
 
 ConditionalExpressions  m_aConditionalExpressions;
 
-FontPrevWindow m_aPreview;
+SvxFontPrevWindow m_aPreview;
 weld::Window* m_pDialog;
 std::unique_ptr m_xBuilder;
 std::unique_ptr   m_xContainer;
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx 
b/sc/source/ui/condformat/condformatdlgentry.cxx
index 39170fcb9c77..4471ea81f80b 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -417,7 +417,7 @@ void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const 
SfxHint& rHint)
 
 namespace {
 
-void StyleSelect(weld::Window* pDialogParent, weld::ComboBox& rLbStyle, const 
ScDocument* pDoc, FontPrevWindow& rWdPreview)
+void StyleSelect(weld::Window* pDialogParent, weld::ComboBox& rLbStyle, const 
ScDocument* pDoc, SvxFontPrevWindow& rWdPreview)
 {
 if (rLbStyle.get_active() == 0)
 {
diff --git a/sc/source/ui/inc/condformatdlgentry.hxx 
b/sc/source/ui/inc/condformatdlgentry.hxx
index ed987a03c7ae..7110115355d6 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -99,7 +99,7 @@ public:
 class ScConditionFrmtEntry : public ScCondFrmtEntry, public SfxListener
 {
 //cond format ui elements
-FontPrevWindow maWdPreview;
+SvxFontPrevWindow maWdPreview;
 std::unique_ptr mxLbCondType;
 std::unique_ptr mxEdVal1;
 std::unique_ptr mxEdVal2;
@@ -149,7 +149,7 @@ public:
 
 class ScFormulaFrmtEntry : public ScCondFrmtEntry
 {
-FontPrevWindow maWdPreview;
+SvxFontPrevWindow maWdPreview;
 std::unique_ptr mxFtStyle;
 std::unique_ptr 

[Libreoffice-commits] core.git: 2 commits - cui/source helpcontent2

2019-10-09 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/screenshotannotationdlg.cxx |1 +
 cui/source/inc/screenshotannotationdlg.hxx |1 -
 helpcontent2   |2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9ad0852245732133d2b5d454ebbaceb6b4a4cc03
Author: Caolán McNamara 
AuthorDate: Tue Oct 8 17:04:23 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 9 09:57:15 2019 +0200

no need to include vcl.dialog here anymore

Change-Id: Ic902f09be90ec3989a20333a13562b3af679ff92
Reviewed-on: https://gerrit.libreoffice.org/80489
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index 582e6cf1c474..67373ec6f323 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cui/source/inc/screenshotannotationdlg.hxx 
b/cui/source/inc/screenshotannotationdlg.hxx
index 6730ef0514fe..94972219dc9f 100644
--- a/cui/source/inc/screenshotannotationdlg.hxx
+++ b/cui/source/inc/screenshotannotationdlg.hxx
@@ -19,7 +19,6 @@
 #ifndef INCLUDED_CUI_SOURCE_INC_SCREENSHANNDLG_HXX
 #define INCLUDED_CUI_SOURCE_INC_SCREENSHANNDLG_HXX
 
-#include 
 #include 
 #include 
 
commit eaa5952b01c8834bf2faac4b0e82dd063268bc32
Author: Olivier Hallot 
AuthorDate: Tue Oct 8 17:28:39 2019 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Oct 9 09:57:05 2019 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Typo

Change-Id: I2ac2e142b2700912292a2a127ed28a99f34f6edc
Reviewed-on: https://gerrit.libreoffice.org/80498
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 360d9cfe12b1..658042bc3240 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 360d9cfe12b151b55b9db7daeaed60b1ce60a476
+Subproject commit 658042bc32406ef2046fbf611bcd4bad68581609
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig include/vcl sc/source vcl/source

2019-10-07 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/screenshotannotationdlg.cxx |  299 -
 cui/source/factory/dlgfact.cxx |   10 
 cui/source/factory/dlgfact.hxx |   13 -
 cui/source/inc/screenshotannotationdlg.hxx |5 
 cui/uiconfig/ui/screenshotannotationdialog.ui  |   14 -
 include/vcl/abstdlg.hxx|3 
 sc/source/core/data/dpcache.cxx|3 
 vcl/source/window/layout.cxx   |2 
 8 files changed, 182 insertions(+), 167 deletions(-)

New commits:
commit 3a1043284b99823191ff4ee4d7285d5703288216
Author: Caolán McNamara 
AuthorDate: Mon Oct 7 09:27:23 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 7 20:24:18 2019 +0200

cid#1454630 Uninitialized scalar field

Change-Id: Id8b7e4dfb021b836d5d14ce9ca73f3835288a7a4
Reviewed-on: https://gerrit.libreoffice.org/80343
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 8a834614f94e..e2d595a5bef4 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -172,7 +172,8 @@ struct Bucket
 ScDPItemData maValue;
 SCROW mnOrderIndex;
 SCROW mnDataIndex;
-Bucket() {}
+Bucket() :
+mnOrderIndex(0), mnDataIndex(0) {}
 Bucket(const ScDPItemData& rValue, SCROW nData) :
 maValue(rValue), mnOrderIndex(0), mnDataIndex(nData) {}
 };
commit d46456b07df11bf774c3a7dcbcd843bb97efbe38
Author: Caolán McNamara 
AuthorDate: Mon Oct 7 13:36:56 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 7 20:24:04 2019 +0200

weld ScreenshotAnnotationDlg

Change-Id: I94e42c1d10922170f53af917bba6848c9f006a11
Reviewed-on: https://gerrit.libreoffice.org/80383
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index fb1f41d29525..f9ed955f2afa 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -29,17 +29,16 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -128,20 +127,39 @@ private:
 
 typedef std::vector< ControlDataEntry > ControlDataCollection;
 
+class Picture : public weld::CustomWidgetController
+{
+private:
+ScreenshotAnnotationDlg_Impl *m_pDialog;
+bool m_bMouseOver;
+private:
+virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&) override;
+virtual bool MouseMove(const MouseEvent& rMouseEvent) override;
+virtual bool MouseButtonUp(const MouseEvent& rMouseEvent) override;
+public:
+Picture(ScreenshotAnnotationDlg_Impl* pDialog)
+: m_pDialog(pDialog)
+, m_bMouseOver(false)
+{
+}
+
+bool IsMouseOver() const
+{
+return m_bMouseOver;
+}
+};
+
 class ScreenshotAnnotationDlg_Impl
 {
 public:
 ScreenshotAnnotationDlg_Impl(
-ScreenshotAnnotationDlg& rParent,
+weld::Builder& rParent,
 Dialog& rParentDialog);
 ~ScreenshotAnnotationDlg_Impl();
 
 private:
 // Handler for click on save
-DECL_LINK(saveButtonHandler, Button*, void);
-
-// Handler for clicks on picture frame
-DECL_LINK(pictureFrameListener, VclWindowEvent&, void);
+DECL_LINK(saveButtonHandler, weld::Button&, void);
 
 // helper methods
 void CollectChildren(
@@ -167,7 +185,7 @@ private:
 SizemaParentDialogSize;
 
 // VirtualDevice for buffered interaction paints
-VclPtr   mpVirtualBufferDevice;
+VclPtr   mxVirtualBufferDevice;
 
 // all detected children
 ControlDataCollection   maAllChildren;
@@ -178,9 +196,10 @@ private:
 maSelected;
 
 // list of detected controls
-VclPtr  mpPicture;
-VclPtrmpText;
-VclPtr  mpSave;
+Picture maPicture;
+std::unique_ptr mxPicture;
+std::unique_ptr mxText;
+std::unique_ptr mxSave;
 
 // save as text
 OUStringmaSaveAsText;
@@ -188,24 +207,26 @@ private:
 
 // folder URL
 static OUString maLastFolderURL;
+public:
+void Paint(vcl::RenderContext& rRenderContext);
+bool MouseMove(const MouseEvent& rMouseEvent);
+bool MouseButtonUp();
 };
 
 OUString ScreenshotAnnotationDlg_Impl::maLastFolderURL = OUString();
 
 ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
-ScreenshotAnnotationDlg& rParent,
+weld::Builder& rParent,
 Dialog& rParentDialog)
 :   mrParentDialog(rParentDialog),
 maParentDialogBitmap(rParentDialog.createScreenshot()),
 maDimmedDialogBitmap(maParentDialogBitmap),
 

[Libreoffice-commits] core.git: 2 commits - cui/source embedserv/source vcl/source winaccessibility/source

2019-10-01 Thread Stephan Bergmann (via logerrit)
 cui/source/customize/SvxNotebookbarConfigPage.cxx |   12 
 embedserv/source/embed/docholder.cxx  |   15 ++
 vcl/source/window/NotebookBarAddonsMerger.cxx |8 -
 winaccessibility/source/service/AccContainerEventListener.cxx |8 ++---
 winaccessibility/source/service/AccObject.cxx |2 -
 winaccessibility/source/service/AccObjectWinManager.cxx   |8 ++---
 winaccessibility/source/service/AccTopWindowListener.cxx  |6 ++--
 7 files changed, 29 insertions(+), 30 deletions(-)

New commits:
commit 6115082b5ff93db323246e535baaeef405978aca
Author: Stephan Bergmann 
AuthorDate: Tue Oct 1 10:41:53 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 1 18:56:15 2019 +0200

loplugin:loopvartoosmall (clang-cl)

Change-Id: I682fccecd94d1d1524fcb12e93f5d53b0c94ea03
Reviewed-on: https://gerrit.libreoffice.org/79935
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index a8dcfb6e334b..4ab507ed4824 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -25,6 +25,8 @@
 #include 
 
 #include 
+#include 
+
 #include 
 #include 
 
@@ -64,7 +66,7 @@ static bool isCategoryAvailable(const OUString& sClassId, 
const OUString& sUIIte
 static OUString charToString(const char* cString)
 {
 OUStringBuffer aString;
-for (unsigned long i = 0; i < strlen(cString); i++)
+for (std::size_t i = 0; i < strlen(cString); i++)
 {
 aString.append(cString[i]);
 }
@@ -458,7 +460,7 @@ void SvxNotebookbarConfigPage::SelectElement()
 
 if (m_xTopLevelListBox->get_count() == 1)
 {
-for (unsigned long nIdx = 0; nIdx < aCategoryList.size(); nIdx++)
+for (std::size_t nIdx = 0; nIdx < aCategoryList.size(); nIdx++)
 m_xTopLevelListBox->append(aCategoryList[nIdx].sUIItemId,
aCategoryList[nIdx].sDisplayName);
 }
@@ -468,7 +470,7 @@ void SvxNotebookbarConfigPage::SelectElement()
 nStart = 1;
 
 std::vector aTempEntries;
-for (unsigned long nIdx = nStart; nIdx < aEntries.size(); nIdx++)
+for (std::size_t nIdx = nStart; nIdx < aEntries.size(); nIdx++)
 {
 if (aEntries[nIdx].sClassId == "svtlo-ManagedMenuButton")
 {
@@ -477,7 +479,7 @@ void SvxNotebookbarConfigPage::SelectElement()
 sal_Int32 rPos = 1;
 sActiveCategory = aEntries[nIdx].sUIItemId.getToken(rPos, ':', 
rPos);
 FillFunctionsList(aGtkEntries, aCategoryList, sActiveCategory);
-for (unsigned long Idx = 0; Idx < aGtkEntries.size(); Idx++)
+for (std::size_t Idx = 0; Idx < aGtkEntries.size(); Idx++)
 aTempEntries.push_back(aGtkEntries[Idx]);
 aGtkEntries.clear();
 }
@@ -489,7 +491,7 @@ void SvxNotebookbarConfigPage::SelectElement()
 aTempEntries.clear();
 
 sal_Int64 nId = 0;
-for (unsigned long nIdx = 0; nIdx < aEntries.size(); nIdx++)
+for (std::size_t nIdx = 0; nIdx < aEntries.size(); nIdx++)
 {
 OUString sId(OUString::number(nId));
 m_xContentsListBox->insert(nIdx, sId);
diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx 
b/vcl/source/window/NotebookBarAddonsMerger.cxx
index 01c8bbd0977e..1bd4547e5987 100644
--- a/vcl/source/window/NotebookBarAddonsMerger.cxx
+++ b/vcl/source/window/NotebookBarAddonsMerger.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
@@ -118,7 +122,7 @@ void NotebookBarAddonsMerger::MergeNotebookBarAddons(
 unsigned long nIter = 0;
 sal_uInt16 nPriorityIdx = aImageVec.size();
 css::uno::Sequence> 
aExtension;
-for (unsigned long nIdx = 0; nIdx < 
aNotebookBarAddonsItem.aAddonValues.size(); nIdx++)
+for (std::size_t nIdx = 0; nIdx < 
aNotebookBarAddonsItem.aAddonValues.size(); nIdx++)
 {
 aExtension = aNotebookBarAddonsItem.aAddonValues[nIdx];
 
@@ -154,7 +158,7 @@ void NotebookBarAddonsMerger::MergeNotebookBarMenuAddons(
 std::vector aImageVec = aNotebookBarAddonsItem.aImageValues;
 unsigned long nIter = 0;
 css::uno::Sequence> 
aExtension;
-for (unsigned long nIdx = 0; nIdx < 
aNotebookBarAddonsItem.aAddonValues.size(); nIdx++)
+for (std::size_t nIdx = 0; nIdx < 
aNotebookBarAddonsItem.aAddonValues.size(); nIdx++)
 {
 aExtension = aNotebookBarAddonsItem.aAddonValues[nIdx];
 
commit a2ab2b31b8b8f1fd17d7d6c8f68e5adc1e8d381d
Author: Stephan Bergmann 
AuthorDate: Tue Oct 1 10:40:07 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 1 18:56:06 2019 +0200

loplugin:referencecasting (clang-cl)

Change-Id: Ie534212b09b92a02b377d0bb348e11c96bf61786
Reviewed-on: 

[Libreoffice-commits] core.git: 2 commits - cui/source

2019-09-24 Thread Caolán McNamara (via logerrit)
 cui/source/inc/cuitabline.hxx|1 -
 cui/source/tabpages/border.cxx   |4 +++-
 cui/source/tabpages/tplneend.cxx |7 ---
 3 files changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 473736e0afefa658b8c1357307f6c4fd5469a7d0
Author: Caolán McNamara 
AuthorDate: Mon Sep 23 19:47:58 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 24 12:30:25 2019 +0200

remove SvxLineEndDefTabPage::Resize

Change-Id: I70128f34ab1ab56ec4f99a5533606bd1d49561c8
Reviewed-on: https://gerrit.libreoffice.org/79439
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index f7b123502b3a..305c6b3d3f90 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -386,7 +386,6 @@ public:
 voidSetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; }
 
 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
-virtual void Resize() override;
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_CUITABLINE_HXX
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 7901503d2d9e..b146fecff049 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -101,13 +101,6 @@ void SvxLineEndDefTabPage::dispose()
 SfxTabPage::dispose();
 }
 
-void SvxLineEndDefTabPage::Resize()
-{
-rXLSet.Put(XLineStartWidthItem(m_aCtlPreview.GetOutputSize().Height()  / 
2));
-rXLSet.Put(XLineEndWidthItem(m_aCtlPreview.GetOutputSize().Height() / 2));
-SfxTabPage::Resize();
-}
-
 void SvxLineEndDefTabPage::Construct()
 {
 m_xLbLineEnds->Fill( pLineEndList );
commit cda309c1b8302c6bf4e2bbc24afd82f05d552599
Author: Caolán McNamara 
AuthorDate: Tue Sep 24 09:35:21 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 24 12:30:05 2019 +0200

get text colour without vcl::Window

Change-Id: Ib1a9d438de9a310cf101aeda37f36a791b86ec76
Reviewed-on: https://gerrit.libreoffice.org/79438
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index d8bed85f67cd..4ff40e150845 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -758,7 +759,8 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
 aColor = COL_BLACK;
 
 m_xLbLineColor->SelectEntry(aColor);
-m_xLbLineStyle->SetColor(GetTextColor());
+auto nTextColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
+m_xLbLineStyle->SetColor(nTextColor);
 
 // Select all visible lines, if they are all equal.
 if( bWidthEq && bColorEq )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source filter/source

2019-09-24 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx  |2 +-
 cui/source/options/optinet2.cxx |2 +-
 filter/source/pdf/impdialog.cxx |   14 --
 3 files changed, 6 insertions(+), 12 deletions(-)

New commits:
commit 8684de9aae185ff340adc63ec8f1e5207e6e8cec
Author: Caolán McNamara 
AuthorDate: Mon Sep 23 19:43:36 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 24 10:04:35 2019 +0200

enable/disable page toplevel container

instead of the vcl TabPage that contains it

Change-Id: I1d1da894afce4cf6d8fc109a77fd809e993de454
Reviewed-on: https://gerrit.libreoffice.org/79424
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index b2e864674705..deb1503f8743 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1220,7 +1220,7 @@ void ImpPDFTabSecurityPage::enablePermissionControls()
 }
 else
 {
-if (mbHaveUserPassword && IsEnabled())
+if (mbHaveUserPassword && m_xContainer->get_sensitive())
 {
 mxUserPwdSet->show();
 mxUserPwdUnset->hide();
@@ -1234,7 +1234,7 @@ void ImpPDFTabSecurityPage::enablePermissionControls()
 }
 }
 
-bool bLocalEnable = mbHaveOwnerPassword && IsEnabled();
+bool bLocalEnable = mbHaveOwnerPassword && m_xContainer->get_sensitive();
 if (bIsPDFASel)
 {
 mxOwnerPwdPdfa->show();
@@ -1264,16 +1264,10 @@ void ImpPDFTabSecurityPage::enablePermissionControls()
 
 // This tab page is under control of the PDF/A-1a checkbox:
 // TODO: implement a method to do it.
-voidImpPDFTabSecurityPage::ImplPDFASecurityControl( bool bEnableSecurity )
+void ImpPDFTabSecurityPage::ImplPDFASecurityControl( bool bEnableSecurity )
 {
-if( bEnableSecurity )
-{
-Enable();
+m_xContainer->set_sensitive(bEnableSecurity);
 // after enable, check the status of control as if the dialog was 
initialized
-}
-else
-Enable( false );
-
 enablePermissionControls();
 }
 
commit 0bd2ebaa039633659d0aab816d72306cc9660872
Author: Caolán McNamara 
AuthorDate: Mon Sep 23 20:10:11 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 24 10:04:17 2019 +0200

options dialog has a controller now

Change-Id: I34b486ba54c361401327dbe8fcee007da4ca72c1
Reviewed-on: https://gerrit.libreoffice.org/79426
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 657bd23ffb66..ff1e2a7bf245 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -912,7 +912,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 if( svtools::executeRestartDialog(
 comphelper::getProcessComponentContext(), nullptr,
 svtools::RESTART_REASON_OPENGL))
-GetParentDialog()->EndDialog(RET_OK);
+GetDialogController()->response(RET_OK);
 }
 
 return bModified;
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 10c6fd9b8c7e..36cb6917599b 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -705,7 +705,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl, 
weld::Button&, void)
 {
 SolarMutexGuard aGuard;
 if 
(svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ADDING_PATH))
-GetParentDialog()->EndDialog(RET_OK);
+GetDialogController()->response(RET_OK);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source sc/source

2019-09-23 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx |4 ++--
 sc/source/ui/optdlg/tpcalc.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7d1803d346ce4bf57d95e84563253c592caf4b3c
Author: Caolán McNamara 
AuthorDate: Mon Sep 23 16:15:00 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 23 20:28:41 2019 +0200

Resolves: tdf#127683 options dialog has a controller now

Change-Id: I1143bb27f524960e44aa2cdb76f063a9b93d42be
Reviewed-on: https://gerrit.libreoffice.org/79415
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 1d95f8ab8720..657bd23ffb66 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1317,9 +1317,9 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
 // display info
 SolarMutexGuard aGuard;
 if (svtools::executeRestartDialog(
-comphelper::getProcessComponentContext(), GetFrameWeld(),
+comphelper::getProcessComponentContext(), 
GetDialogFrameWeld(),
 svtools::RESTART_REASON_LANGUAGE_CHANGE))
-GetParentDialog()->EndDialog(RET_OK);
+GetDialogController()->response(RET_OK);
 
 // tell quickstarter to stop being a veto listener
 
commit 4e1ed8f321074d7f7f347badf44cf48e7931f99a
Author: Caolán McNamara 
AuthorDate: Mon Sep 23 16:57:01 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 23 20:28:15 2019 +0200

config dialog uses a controller now

Change-Id: I0341b0b51d638b5ea8f28d16dca87d50376873a4
Reviewed-on: https://gerrit.libreoffice.org/79417
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 5a6f60337911..f38ef51c443a 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -184,7 +184,7 @@ bool ScTpCalcOptions::FillItemSet( SfxItemSet* rCoreAttrs )
 if (svtools::executeRestartDialog(
  comphelper::getProcessComponentContext(), GetFrameWeld(),
  svtools::RESTART_REASON_THREADING))
-GetParentDialog()->EndDialog(RET_OK);
+GetDialogController()->response(RET_OK);
 }
 if ( *pLocalOptions != *pOldOptions )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source editeng/source include/sfx2 include/vcl sc/source sd/source solenv/clang-format svx/source sw/source vcl/inc vcl/source

2019-08-31 Thread Caolán McNamara (via logerrit)
 cui/source/inc/optpath.hxx |2 --
 editeng/source/misc/hangulhanja.cxx|2 --
 include/sfx2/printopt.hxx  |6 +-
 sc/source/ui/inc/PivotLayoutDialog.hxx |1 -
 sc/source/ui/inc/areasdlg.hxx  |1 -
 sd/source/ui/inc/prntopts.hxx  |2 --
 sd/source/ui/view/drviews5.cxx |2 +-
 solenv/clang-format/blacklist  |2 +-
 svx/source/dialog/imapdlg.cxx  |2 --
 sw/source/ui/fldui/fldpage.cxx |   13 +
 sw/source/uibase/misc/redlndlg.cxx |3 +--
 vcl/inc/hyperlabel.hxx |2 +-
 vcl/source/control/hyperlabel.cxx  |2 +-
 vcl/source/control/roadmap.cxx |2 +-
 14 files changed, 12 insertions(+), 30 deletions(-)

New commits:
commit 53046ce16303824a231f106c2a747a02f7bb3bcf
Author: Caolán McNamara 
AuthorDate: Sat Aug 31 13:41:14 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 31 16:19:21 2019 +0200

drop some unnecessary includes

Change-Id: I1abef2c2318e83aa8045d2b4763e74f45b4755e5
Reviewed-on: https://gerrit.libreoffice.org/78347
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index 40ceb1156805..1082f1354f85 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -21,8 +21,6 @@
 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include 
diff --git a/editeng/source/misc/hangulhanja.cxx 
b/editeng/source/misc/hangulhanja.cxx
index da40ec6c103a..50130a24ae2b 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include 
 #include 
 
@@ -33,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index 87a8638174d0..a30fba19b292 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -22,14 +22,10 @@
 
 #include 
 #include 
+#include 
 #include 
-#include 
-#include 
-#include 
 #include 
 
-#include 
-
 
 class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage : public SfxTabPage
 {
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx 
b/sc/source/ui/inc/PivotLayoutDialog.hxx
index ca78e004bb74..7397972a7ada 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -11,7 +11,6 @@
 #ifndef INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTDIALOG_HXX
 #define INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTDIALOG_HXX
 
-#include 
 #include "anyrefdg.hxx"
 #include 
 #include "viewdata.hxx"
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index a421049e28a4..a685120ab14b 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -21,7 +21,6 @@
 
 #include 
 
-#include 
 #include "anyrefdg.hxx"
 
 class ScDocument;
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 9e71b6637647..46077ef749a1 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -20,8 +20,6 @@
 #ifndef INCLUDED_SD_SOURCE_UI_INC_PRNTOPTS_HXX
 #define INCLUDED_SD_SOURCE_UI_INC_PRNTOPTS_HXX
 
-#include 
-#include 
 #include 
 
 class SdPrintOptions : public SfxTabPage
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 3edf0bdab4c0..38e0d38ffe54 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -24,8 +24,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index cdd3508c87c3..ab0de72dfd88 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -36,8 +36,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index e65a0a186a58..30521244396a 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
 #include 
 #include 
 #include 
@@ -49,8 +48,8 @@ SwFieldPage::SwFieldPage(TabPageParent pParent, const 
OUString& rUIXMLDescriptio
 : SfxTabPage(pParent, rUIXMLDescription, rID, pAttrSet)
 , m_pCurField(nullptr)
 , m_pWrtShell(nullptr)
-, m_nTypeSel(LISTBOX_ENTRY_NOTFOUND)
-, m_nSelectionSel(LISTBOX_ENTRY_NOTFOUND)
+, m_nTypeSel(-1)
+, m_nSelectionSel(-1)
 , m_bFieldEdit(false)
 , m_bInsert(true)
 , m_bFieldDlgHtmlMode(false)
@@ -107,11 +106,9 @@ void SwFieldPage::ActivatePage()
 // complete reset; edit new field
 void SwFieldPage::EditNewField( bool bOnlyActivate )
 {
-if( !bOnlyActivate )
-{
-m_nTypeSel = LISTBOX_ENTRY_NOTFOUND;
-}
-m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND;
+if (!bOnlyActivate)
+m_nTypeSel = 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig include/vcl vcl/source vcl/unx

2019-07-31 Thread Caolán McNamara (via logerrit)
 cui/source/options/fontsubs.cxx |  564 +++-
 cui/source/options/fontsubs.hxx |   82 +
 cui/uiconfig/ui/optfontspage.ui |  238 +++-
 include/vcl/weld.hxx|1 
 vcl/source/app/salvtables.cxx   |5 
 vcl/source/treelist/svtabbx.cxx |7 
 vcl/unx/gtk3/gtk3gtkinst.cxx|   20 +
 7 files changed, 423 insertions(+), 494 deletions(-)

New commits:
commit b3cf88ffa1fe7f4d0dc2a7fdca755eaaef323c81
Author: Caolán McNamara 
AuthorDate: Wed Jul 31 11:30:47 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 31 21:03:40 2019 +0200

weld SvxFontSubstTabPage

Change-Id: If24e80da4042ea37ea2613a6c62e015d0d925dc8
Reviewed-on: https://gerrit.libreoffice.org/76753
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index b80dc786dcf9..3d9c7550a961 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -35,165 +35,153 @@
 /*   */
 /*/
 
-SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent,
-const SfxItemSet& rSet )
-: SfxTabPage(pParent, "OptFontsPage", "cui/ui/optfontspage.ui", )
-, pConfig(new SvtFontSubstConfig)
+SvxFontSubstTabPage::SvxFontSubstTabPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/optfontspage.ui", "OptFontsPage", )
+, m_xConfig(new SvtFontSubstConfig)
+, m_bSorted(false)
+, m_xUseTableCB(m_xBuilder->weld_check_button("usetable"))
+, m_xFont1CB(m_xBuilder->weld_combo_box("font1"))
+, m_xFont2CB(m_xBuilder->weld_combo_box("font2"))
+, m_xApply(m_xBuilder->weld_button("apply"))
+, m_xDelete(m_xBuilder->weld_button("delete"))
+, m_xCheckLB(m_xBuilder->weld_tree_view("checklb"))
+, m_xFontNameLB(m_xBuilder->weld_combo_box("fontname"))
+, m_xNonPropFontsOnlyCB(m_xBuilder->weld_check_button("nonpropfontonly"))
+, m_xFontHeightLB(m_xBuilder->weld_combo_box("fontheight"))
 {
-get(m_pUseTableCB, "usetable");
-get(m_pReplacements, "replacements");
-get(m_pFont1CB, "font1");
-get(m_pFont2CB, "font2");
-m_pFont1CB->SetStyle(m_pFont1CB->GetStyle() | WB_SORT);
-m_pFont2CB->SetStyle(m_pFont2CB->GetStyle() | WB_SORT);
-get(m_pApply, "apply");
-get(m_pDelete, "delete");
-get(m_pFontNameLB, "fontname");
-m_sAutomatic = m_pFontNameLB->GetEntry(0);
+m_xFont1CB->make_sorted();
+m_xFont1CB->set_size_request(1, -1);
+m_xFont2CB->make_sorted();
+m_xFont2CB->set_size_request(1, -1);
+m_sAutomatic = m_xFontNameLB->get_text(0);
 assert(!m_sAutomatic.isEmpty());
-get(m_pNonPropFontsOnlyCB, "nonpropfontonly");
-get(m_pFontHeightLB, "fontheight");
-
-SvSimpleTableContainer *pCheckLBContainer = 
get("checklb");
-Size aControlSize(248, 75);
-aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont));
-pCheckLBContainer->set_width_request(aControlSize.Width());
-pCheckLBContainer->set_height_request(aControlSize.Height());
-
-m_pCheckLB = VclPtr::Create(*pCheckLBContainer, 
0);
-m_pCheckLB->SetHelpId(HID_OFA_FONT_SUBST_CLB);
-
-m_pCheckLB->SetStyle(m_pCheckLB->GetStyle()|WB_HSCROLL|WB_VSCROLL);
-m_pCheckLB->SetSelectionMode(SelectionMode::Multiple);
-m_pCheckLB->SortByCol(2);
-long aStaticTabs[] = { 0, 0, 0, 0 };
-m_pCheckLB->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), 
aStaticTabs);
-
-OUString sHeader1(get("always")->GetText());
-OUString sHeader2(get("screenonly")->GetText());
-OUString sHeader = sHeader1 + "\t" + sHeader2
-+ "\t " + get("font")->GetText()
-+ "\t " + get("replacewith")->GetText();
-m_pCheckLB->InsertHeaderEntry(sHeader);
-
-HeaderBar  = m_pCheckLB->GetTheHeaderBar();
-HeaderBarItemBits nBits = rBar.GetItemBits(1) | 
HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED;
-nBits &= ~HeaderBarItemBits::CLICKABLE;
-rBar.SetItemBits(1, nBits);
-rBar.SetItemBits(2, nBits);
-
-m_pCheckLB->setColSizes();
-
-aTextColor = m_pCheckLB->GetTextColor();
-Link aLink(LINK(this, SvxFontSubstTabPage, SelectEditHdl));
-Link aLink2(LINK(this, SvxFontSubstTabPage, 
SelectComboBoxHdl));
-Link aClickLink(LINK(this, SvxFontSubstTabPage, ClickHdl));
-
-m_pCheckLB->SetSelectHdl(LINK(this, SvxFontSubstTabPage, 
TreeListBoxSelectHdl));
-m_pUseTableCB->SetClickHdl(aClickLink);
-m_pFont1CB->SetSelectHdl(aLink2);
-m_pFont1CB->SetModifyHdl(aLink);
-m_pFont2CB->SetSelectHdl(aLink2);
-m_pFont2CB->SetModifyHdl(aLink);
-m_pApply->SetClickHdl(aClickLink);
-m_pDelete->SetClickHdl(aClickLink);
-
-m_pNonPropFontsOnlyCB->SetClickHdl(LINK(this, SvxFontSubstTabPage, 
NonPropFontsHdl));
+
+

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2019-07-30 Thread Caolán McNamara (via logerrit)
 cui/source/options/optctl.cxx  |  111 +++-
 cui/source/options/optctl.hxx  |   22 +--
 cui/source/options/optgdlg.cxx |  268 ++---
 cui/source/options/optgdlg.hxx |   57 
 cui/uiconfig/ui/optctlpage.ui  |3 
 cui/uiconfig/ui/optviewpage.ui |   16 --
 6 files changed, 208 insertions(+), 269 deletions(-)

New commits:
commit 16073ff56f792144bf262795869f7e5413eca8fc
Author: Caolán McNamara 
AuthorDate: Mon Jul 29 20:01:09 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 30 09:52:54 2019 +0200

weld OfaViewTabPage

Change-Id: I259e10ad8bdf3d1630ab1d24590c43919a351a86
Reviewed-on: https://gerrit.libreoffice.org/76567
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index a1e6e777656c..32802f75a3ed 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -605,8 +605,8 @@ static bool DisplayNameCompareLessThan(const 
vcl::IconThemeInfo& rInfo1, const v
 return rInfo1.GetDisplayName().compareTo(rInfo2.GetDisplayName()) < 0;
 }
 
-OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
-: SfxTabPage(pParent, "OptViewPage", "cui/ui/optviewpage.ui", )
+OfaViewTabPage::OfaViewTabPage(TabPageParent pParent, const SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/optviewpage.ui", "OptViewPage", )
 , nSizeLB_InitialSelection(0)
 , nSidebarSizeLB_InitialSelection(0)
 , nNotebookbarSizeLB_InitialSelection(0)
@@ -615,50 +615,48 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, 
const SfxItemSet& rSet)
 , pCanvasSettings(new CanvasSettings)
 , mpDrawinglayerOpt(new SvtOptionsDrawinglayer)
 , mpOpenGLConfig(new svt::OpenGLCfg)
+, m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize"))
+, m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize"))
+, 
m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize"))
+, m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle"))
+, m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont"))
+, m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom"))
+, m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", 
FieldUnit::PIXEL))
+, m_xMenuIconsLB(m_xBuilder->weld_combo_box("menuicons"))
+, 
m_xContextMenuShortcutsLB(m_xBuilder->weld_combo_box("contextmenushortcuts"))
+, m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview"))
+, m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
+, m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
+, m_xUseOpenGL(m_xBuilder->weld_check_button("useopengl"))
+, m_xForceOpenGL(m_xBuilder->weld_check_button("forceopengl"))
+, m_xOpenGLStatusEnabled(m_xBuilder->weld_label("openglenabled"))
+, m_xOpenGLStatusDisabled(m_xBuilder->weld_label("opengldisabled"))
+, m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos"))
+, m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
 {
-get(m_pIconSizeLB, "iconsize");
-get(m_pSidebarIconSizeLB, "sidebariconsize");
-get(m_pNotebookbarIconSizeLB, "notebookbariconsize");
-get(m_pIconStyleLB, "iconstyle");
-
-get(m_pFontAntiAliasing, "aafont");
-get(m_pAAPointLimitLabel, "aafrom");
-get(m_pAAPointLimit, "aanf");
-get(m_pMenuIconsLB, "menuicons");
-get(m_pContextMenuShortcutsLB, "contextmenushortcuts");
-get(m_pFontShowCB, "showfontpreview");
-get(m_pUseHardwareAccell, "useaccel");
-get(m_pUseAntiAliase, "useaa");
-get(m_pUseOpenGL, "useopengl");
-get(m_pForceOpenGL, "forceopengl");
-get(m_pOpenGLStatusEnabled, "openglenabled");
-get(m_pOpenGLStatusDisabled, "opengldisabled");
-get(m_pMousePosLB, "mousepos");
-get(m_pMouseMiddleLB, "mousemiddle");
-
 if (Application::GetToolkitName() == "gtk3")
 {
-m_pUseOpenGL->Hide();
-m_pForceOpenGL->Hide();
-m_pOpenGLStatusEnabled->Hide();
-m_pOpenGLStatusDisabled->Hide();
+m_xUseOpenGL->hide();
+m_xForceOpenGL->hide();
+m_xOpenGLStatusEnabled->hide();
+m_xOpenGLStatusDisabled->hide();
 }
 
 #if defined( UNX )
-m_pFontAntiAliasing->SetToggleHdl( LINK( this, OfaViewTabPage, 
OnAntialiasingToggled ) );
+m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, 
OnAntialiasingToggled ) );
 #else
 // on this platform, we do not have the anti aliasing options
-m_pFontAntiAliasing->Hide();
-m_pAAPointLimitLabel->Hide();
-m_pAAPointLimit->Hide();
+m_xFontAntiAliasing->hide();
+m_xAAPointLimitLabel->hide();
+m_xAAPointLimit->hide();
 
 #endif
 
-m_pForceOpenGL->SetToggleHdl(LINK(this, OfaViewTabPage, 
OnForceOpenGLToggled));
+m_xForceOpenGL->connect_toggled(LINK(this, OfaViewTabPage, 
OnForceOpenGLToggled));
 
 // Set known icon themes
-OUString sAutoStr( 

[Libreoffice-commits] core.git: 2 commits - cui/source sc/inc

2019-07-27 Thread Caolán McNamara (via logerrit)
 cui/source/options/optbasic.cxx |  108 
 cui/source/options/optbasic.hxx |   15 ++---
 sc/inc/scmod.hxx|2 
 3 files changed, 53 insertions(+), 72 deletions(-)

New commits:
commit 7360ddd34aa446e6439c733ef0f819a58d709744
Author: Caolán McNamara 
AuthorDate: Sat Jul 27 11:46:17 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jul 27 14:11:45 2019 +0200

cid#1401328 Uncaught exception

Change-Id: I1c4bdd4afec30d7d52054d8c9bd4958191c480f8
Reviewed-on: https://gerrit.libreoffice.org/76470
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index a82ac9337b12..363a9dd2a354 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -87,7 +87,7 @@ class SAL_DLLPUBLIC_RTTI ScModule: public SfxModule, public 
SfxListener, public
 ScMessagePool*  m_pMessagePool;
 // there is no global InputHandler anymore, each View has its own
 ScInputHandler* m_pRefInputHandler;
-std::unique_ptrm_pViewCfg;
+std::unique_ptr> m_pViewCfg;
 std::unique_ptr> m_pDocCfg;
 std::unique_ptr> m_pAppCfg;
 std::unique_ptrm_pDefaultsCfg;
commit bee82941206bfae3f57a3008babec7c16b129b5d
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 17:33:06 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jul 27 14:11:30 2019 +0200

weld SvxBasicIDEOptionsPage

Change-Id: I3f5a7fe106075194e90e0da6f6538882024adec1
Reviewed-on: https://gerrit.libreoffice.org/76454
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index 688b4e7e4f83..56a52fbcd45c 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -22,49 +22,36 @@
 #include 
 #include 
 
-SvxBasicIDEOptionsPage::SvxBasicIDEOptionsPage( vcl::Window* pParent, const 
SfxItemSet& rSet )
-: SfxTabPage(pParent, "OptBasicIDEPage", "cui/ui/optbasicidepage.ui", )
+SvxBasicIDEOptionsPage::SvxBasicIDEOptionsPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/optbasicidepage.ui", "OptBasicIDEPage", 
)
+, m_xCodeCompleteChk(m_xBuilder->weld_check_button("codecomplete_enable"))
+, m_xAutocloseProcChk(m_xBuilder->weld_check_button("autoclose_proc"))
+, m_xAutocloseParenChk(m_xBuilder->weld_check_button("autoclose_paren"))
+, m_xAutocloseQuotesChk(m_xBuilder->weld_check_button("autoclose_quotes"))
+, m_xAutoCorrectChk(m_xBuilder->weld_check_button("autocorrect"))
+, 
m_xUseExtendedTypesChk(m_xBuilder->weld_check_button("extendedtypes_enable"))
 {
-get(pCodeCompleteChk, "codecomplete_enable");
-get(pAutocloseProcChk, "autoclose_proc");
-get(pAutocloseParenChk, "autoclose_paren");
-get(pAutocloseQuotesChk, "autoclose_quotes");
-get(pAutoCorrectChk, "autocorrect");
-get(pUseExtendedTypesChk, "extendedtypes_enable");
-
 LoadConfig();
 }
 
 SvxBasicIDEOptionsPage::~SvxBasicIDEOptionsPage()
 {
-disposeOnce();
-}
-
-void SvxBasicIDEOptionsPage::dispose()
-{
-pCodeCompleteChk.clear();
-pAutocloseProcChk.clear();
-pAutocloseParenChk.clear();
-pAutocloseQuotesChk.clear();
-pAutoCorrectChk.clear();
-pUseExtendedTypesChk.clear();
-SfxTabPage::dispose();
 }
 
 void SvxBasicIDEOptionsPage::LoadConfig()
 {
-pCodeCompleteChk->Check( 
officecfg::Office::BasicIDE::Autocomplete::CodeComplete::get() );
-pCodeCompleteChk->Enable( 
!officecfg::Office::BasicIDE::Autocomplete::CodeComplete::isReadOnly() );
-pAutocloseProcChk->Check( 
officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get() );
-pAutocloseProcChk->Enable( 
!officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::isReadOnly() );
-pAutocloseQuotesChk->Check( 
officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::get() );
-pAutocloseQuotesChk->Enable( 
!officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::isReadOnly() 
);
-pAutocloseParenChk->Check( 
officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::get() );
-pAutocloseParenChk->Enable( 
!officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::isReadOnly() 
);
-pAutoCorrectChk->Check( 
officecfg::Office::BasicIDE::Autocomplete::AutoCorrect::get() );
-pAutoCorrectChk->Enable( 
!officecfg::Office::BasicIDE::Autocomplete::AutoCorrect::isReadOnly() );
-pUseExtendedTypesChk->Check( 
officecfg::Office::BasicIDE::Autocomplete::UseExtended::get() );
-pUseExtendedTypesChk->Enable( 
!officecfg::Office::BasicIDE::Autocomplete::UseExtended::isReadOnly() );
+m_xCodeCompleteChk->set_active( 
officecfg::Office::BasicIDE::Autocomplete::CodeComplete::get() );
+m_xCodeCompleteChk->set_sensitive( 
!officecfg::Office::BasicIDE::Autocomplete::CodeComplete::isReadOnly() );
+m_xAutocloseProcChk->set_active( 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig

2019-07-27 Thread Caolán McNamara (via logerrit)
 cui/source/inc/optasian.hxx |   45 +++-
 cui/source/options/optaccessibility.cxx |   80 ++-
 cui/source/options/optaccessibility.hxx |   18 +--
 cui/source/options/optasian.cxx |  169 ++--
 cui/uiconfig/ui/optasianpage.ui |   21 +--
 5 files changed, 142 insertions(+), 191 deletions(-)

New commits:
commit 31bdf49b8c96f408d7b02c9925633eb419f65211
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 20:32:10 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jul 27 12:52:26 2019 +0200

weld SvxAsianLayoutPage

Change-Id: I0bea0026177dcb056edd073cdd9c51e76273d169
Reviewed-on: https://gerrit.libreoffice.org/76456
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx
index c6999c279460..1aaeafa583df 100644
--- a/cui/source/inc/optasian.hxx
+++ b/cui/source/inc/optasian.hxx
@@ -21,41 +21,34 @@
 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
+
 struct SvxAsianLayoutPage_Impl;
 class SvxAsianLayoutPage : public SfxTabPage
 {
-VclPtr m_pCharKerningRB;
-VclPtr m_pCharPunctKerningRB;
-
-VclPtr m_pNoCompressionRB;
-VclPtr m_pPunctCompressionRB;
-VclPtr m_pPunctKanaCompressionRB;
-
-VclPtr  m_pLanguageFT;
-VclPtr m_pLanguageLB;
-VclPtr   m_pStandardCB;
-
-VclPtr   m_pStartFT;
-VclPtrm_pStartED;
-VclPtr   m_pEndFT;
-VclPtrm_pEndED;
-VclPtr   m_pHintFT;
-
 std::unique_ptr pImpl;
 
-DECL_LINK(LanguageHdl, ListBox&, void);
-DECL_LINK(ChangeStandardHdl, Button*, void);
-DECL_LINK(ModifyHdl, Edit&, void);
+std::unique_ptr m_xCharKerningRB;
+std::unique_ptr m_xCharPunctKerningRB;
+std::unique_ptr m_xNoCompressionRB;
+std::unique_ptr m_xPunctCompressionRB;
+std::unique_ptr m_xPunctKanaCompressionRB;
+std::unique_ptr m_xLanguageFT;
+std::unique_ptr m_xLanguageLB;
+std::unique_ptr m_xStandardCB;
+std::unique_ptr m_xStartFT;
+std::unique_ptr m_xStartED;
+std::unique_ptr m_xEndFT;
+std::unique_ptr m_xEndED;
+std::unique_ptr m_xHintFT;
+
+DECL_LINK(LanguageHdl, weld::ComboBox&, void);
+DECL_LINK(ChangeStandardHdl, weld::ToggleButton&, void);
+DECL_LINK(ModifyHdl, weld::Entry&, void);
 
 public:
-SvxAsianLayoutPage( vcl::Window* pParent, const SfxItemSet& rSet );
+SvxAsianLayoutPage(TabPageParent pParent, const SfxItemSet& rSet );
 virtual ~SvxAsianLayoutPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet );
 static const sal_uInt16*  GetRanges();
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 8c4dc9e90e0d..883bcbb984a7 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -102,81 +102,60 @@ void SvxAsianLayoutPage_Impl::addForbiddenCharacters(
 
 static LanguageType eLastUsedLanguageTypeForForbiddenCharacters(USHRT_MAX);
 
-SvxAsianLayoutPage::SvxAsianLayoutPage( vcl::Window* pParent, const 
SfxItemSet& rSet ) :
-SfxTabPage(pParent, "OptAsianPage", "cui/ui/optasianpage.ui", ),
-pImpl(new SvxAsianLayoutPage_Impl)
+SvxAsianLayoutPage::SvxAsianLayoutPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/optasianpage.ui", "OptAsianPage", )
+, pImpl(new SvxAsianLayoutPage_Impl)
+, m_xCharKerningRB(m_xBuilder->weld_radio_button("charkerning"))
+, m_xCharPunctKerningRB(m_xBuilder->weld_radio_button("charpunctkerning"))
+, m_xNoCompressionRB(m_xBuilder->weld_radio_button("nocompression"))
+, m_xPunctCompressionRB(m_xBuilder->weld_radio_button("punctcompression"))
+, 
m_xPunctKanaCompressionRB(m_xBuilder->weld_radio_button("punctkanacompression"))
+, m_xLanguageFT(m_xBuilder->weld_label("languageft"))
+, m_xLanguageLB(new LanguageBox(m_xBuilder->weld_combo_box("language")))
+, m_xStandardCB(m_xBuilder->weld_check_button("standard"))
+, m_xStartFT(m_xBuilder->weld_label("startft"))
+, m_xStartED(m_xBuilder->weld_entry("start"))
+, m_xEndFT(m_xBuilder->weld_label("endft"))
+, m_xEndED(m_xBuilder->weld_entry("end"))
+, m_xHintFT(m_xBuilder->weld_label("hintft"))
 {
-get(m_pCharKerningRB, "charkerning");
-get(m_pCharPunctKerningRB, "charpunctkerning");
-get(m_pNoCompressionRB, "nocompression");
-get(m_pPunctCompressionRB, "punctcompression");
-get(m_pPunctKanaCompressionRB, "punctkanacompression");
-get(m_pLanguageFT, "languageft");
-get(m_pLanguageLB, "language");
-get(m_pStandardCB, "standard");
-get(m_pStartFT, "startft");
-get(m_pStartED, "start");
-get(m_pEndFT, "endft");
-get(m_pEndED, "end");
-get(m_pHintFT, "hintft");
+LanguageHdl(*m_xLanguageLB->get_widget());
+m_xLanguageLB->connect_changed(LINK(this, SvxAsianLayoutPage, 

[Libreoffice-commits] core.git: 2 commits - cui/source include/vcl sd/source vcl/source vcl/unx

2019-07-27 Thread Caolán McNamara (via logerrit)
 cui/source/options/optopencl.cxx   |   46 ++---
 cui/source/options/optopencl.hxx   |   12 ++-
 include/vcl/weld.hxx   |2 +
 sd/source/ui/dlg/RemoteDialogClientBox.cxx |3 +
 vcl/source/app/salvtables.cxx  |   20 +---
 vcl/unx/gtk3/gtk3gtkinst.cxx   |6 +++
 6 files changed, 46 insertions(+), 43 deletions(-)

New commits:
commit e171aec015212aa295e5e1831474b8af636e477b
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 20:44:53 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jul 27 12:51:24 2019 +0200

weld SvxOpenCLTabPage

Change-Id: I8cc47aa63daa76794f1ec2e4fc7b64a1a0a18564
Reviewed-on: https://gerrit.libreoffice.org/76457
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index ba1ea2de7294..5131714e18c8 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -17,9 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -27,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include "optHeaderTabListbox.hxx"
 
 #include 
@@ -40,39 +37,28 @@
 #include 
 #include "optopencl.hxx"
 
-SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& 
rSet) :
-SfxTabPage(pParent, "OptOpenCLPage", "cui/ui/optopenclpage.ui", ),
-maConfig(OpenCLConfig::get())
+SvxOpenCLTabPage::SvxOpenCLTabPage(TabPageParent pParent, const SfxItemSet& 
rSet)
+: SfxTabPage(pParent, "cui/ui/optopenclpage.ui", "OptOpenCLPage", )
+, maConfig(OpenCLConfig::get())
+, mxUseOpenCL(m_xBuilder->weld_check_button("useopencl"))
+, mxOclUsed(m_xBuilder->weld_label("openclused"))
+, mxOclNotUsed(m_xBuilder->weld_label("openclnotused"))
 {
-get(mpUseOpenCL, "useopencl");
-get(mpOclUsed,"openclused");
-get(mpOclNotUsed,"openclnotused");
-
-mpUseOpenCL->Check(maConfig.mbUseOpenCL);
-
mpUseOpenCL->Enable(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly());
+mxUseOpenCL->set_active(maConfig.mbUseOpenCL);
+
mxUseOpenCL->set_sensitive(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly());
 
 bool bCLUsed = openclwrapper::GPUEnv::isOpenCLEnabled();
-mpOclUsed->Show(bCLUsed);
-mpOclNotUsed->Show(!bCLUsed);
+mxOclUsed->set_visible(bCLUsed);
+mxOclNotUsed->set_visible(!bCLUsed);
 }
 
 SvxOpenCLTabPage::~SvxOpenCLTabPage()
 {
-disposeOnce();
-}
-
-void SvxOpenCLTabPage::dispose()
-{
-mpUseOpenCL.clear();
-mpOclUsed.clear();
-mpOclNotUsed.clear();
-
-SfxTabPage::dispose();
 }
 
-VclPtr SvxOpenCLTabPage::Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet )
+VclPtr SvxOpenCLTabPage::Create(TabPageParent pParent, const 
SfxItemSet* rAttrSet)
 {
-return VclPtr::Create(pParent.pParent, *rAttrSet);
+return VclPtr::Create(pParent, *rAttrSet);
 }
 
 bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
@@ -80,8 +66,8 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
 bool bModified = false;
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
-if (mpUseOpenCL->IsValueChangedFromSaved())
-maConfig.mbUseOpenCL = mpUseOpenCL->IsChecked();
+if (mxUseOpenCL->get_state_changed_from_saved())
+maConfig.mbUseOpenCL = mxUseOpenCL->get_active();
 
 if (maConfig != OpenCLConfig::get())
 {
@@ -105,8 +91,8 @@ void SvxOpenCLTabPage::Reset( const SfxItemSet* )
 {
 maConfig = OpenCLConfig::get();
 
-mpUseOpenCL->Check(maConfig.mbUseOpenCL);
-mpUseOpenCL->SaveValue();
+mxUseOpenCL->set_active(maConfig.mbUseOpenCL);
+mxUseOpenCL->save_state();
 }
 
 
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index cc07698e50ca..ddb74e07643a 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -22,23 +22,19 @@
 
 #include 
 #include 
-#include 
-#include 
 
 class SvxOpenCLTabPage : public SfxTabPage
 {
 private:
 OpenCLConfig maConfig;
 
-VclPtr mpUseOpenCL;
-
-VclPtr mpOclUsed;
-VclPtr mpOclNotUsed;
+std::unique_ptr mxUseOpenCL;
+std::unique_ptr mxOclUsed;
+std::unique_ptr mxOclNotUsed;
 
 public:
-SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+SvxOpenCLTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 virtual ~SvxOpenCLTabPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rSet );
 
commit f9fee27333e97e2251fc9b9b56072abc77a227fd
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 10:54:05 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jul 27 12:51:02 2019 +0200

enable setting a highlight bg

(cherry picked from commit 9b618c846835abb1fe664b5951dffb3c133380fe)


[Libreoffice-commits] core.git: 2 commits - cui/source sw/source

2019-07-24 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |1 +
 sw/source/filter/ww8/ww8scan.cxx   |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 00af4b1e5157d1a7f71da168dc7b48707e9113cd
Author: Caolán McNamara 
AuthorDate: Wed Jul 24 09:02:41 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 24 14:25:29 2019 +0200

cid#1451635 silence Dereference after null check

Change-Id: Ie5978be908647fe1215e1517a2bf638c7936dae2
Reviewed-on: https://gerrit.libreoffice.org/76225
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 9c6e90b74c25..dc2a9b4ef83e 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1483,6 +1483,7 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& 
rKeyEvt)
 if (pErrorAttrib->nStart != m_nErrorStart || 
pErrorAttrib->nEnd != m_nErrorEnd)
 {
 std::unique_ptr 
xNewError(pErrorAttrib->pAttr->Clone());
+assert(pErrorAttr);
 m_xEditEngine->RemoveAttribs(ESelection(0, 
pErrorAttr->nStart, 0, pErrorAttr->nEnd), false, EE_CHAR_GRABBAG);
 SetAttrib(*xNewError, m_nErrorStart, m_nErrorEnd);
 }
commit b055dda3c82086f5c633403bd952209d6ed4288f
Author: Caolán McNamara 
AuthorDate: Wed Jul 24 10:05:59 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 24 14:25:08 2019 +0200

cid#1448539 try silence Double free

Change-Id: I05f30f33acc06325eba59965a84fa43749d6f394
Reviewed-on: https://gerrit.libreoffice.org/76230
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 19e0d81e7850..196c0eef3936 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2859,13 +2859,14 @@ WW8PLCFx_Fc_FKP::WW8Fkp::Entry&
 mnIStd = rEntry.mnIStd;
 mbMustDelete = rEntry.mbMustDelete;
 
-if (mbMustDelete)
+if (rEntry.mbMustDelete)
 {
 mpData = new sal_uInt8[mnLen];
 memcpy(mpData, rEntry.mpData, mnLen);
 }
 else
 mpData = rEntry.mpData;
+
 return *this;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source extensions/source

2019-07-08 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/backgrnd.cxx  |   16 
 extensions/source/scanner/sanedlg.cxx |8 
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 3eeb5e19e73978b394d2610b776fbc7efbfa0c26
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:18:42 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 16:02:01 2019 +0200

use BitmapEx in BackgroundPreviewImpl

Change-Id: Iecbb528c526389d7eed0205c06a21c3cd0753644
Reviewed-on: https://gerrit.libreoffice.org/75211
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 1bec48871dfb..5b70f37d88e0 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -117,7 +117,7 @@ public:
 void setBmp(bool bBmp);
 
 voidNotifyChange(const Color&  rColor);
-voidNotifyChange(const Bitmap* pBitmap);
+voidNotifyChange(const BitmapEx* pBitmap);
 voidSetFillColor(const Color& rColor) { aColor = rColor; }
 
 protected:
@@ -130,7 +130,7 @@ private:
 void recalcDrawPos();
 
 boolbIsBmp;
-std::unique_ptr pBitmap;
+std::unique_ptr pBitmap;
 Point   aDrawPos;
 SizeaDrawSize;
 ::tools::Rectangle aDrawRect;
@@ -168,14 +168,14 @@ void BackgroundPreviewImpl::NotifyChange( const Color& 
rColor )
 }
 }
 
-void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap )
+void BackgroundPreviewImpl::NotifyChange( const BitmapEx* pNewBitmap )
 {
 if (bIsBmp && (pNewBitmap || pBitmap))
 {
 if (pNewBitmap && pBitmap)
 *pBitmap = *pNewBitmap;
 else if (pNewBitmap && !pBitmap)
-pBitmap.reset( new Bitmap(*pNewBitmap) );
+pBitmap.reset( new BitmapEx(*pNewBitmap) );
 else if (!pNewBitmap)
 pBitmap.reset();
 
@@ -248,7 +248,7 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& 
rRenderContext, const ::to
 if (bIsBmp)
 {
 if (pBitmap)
-rRenderContext.DrawBitmap(aDrawPos, aDrawSize, *pBitmap);
+rRenderContext.DrawBitmapEx(aDrawPos, aDrawSize, *pBitmap);
 else
 {
 Size aSize(GetOutputSizePixel());
@@ -998,7 +998,7 @@ IMPL_LINK(SvxBackgroundTabPage, FileClickHdl_Impl, 
weld::ToggleButton&, rBox, vo
 
 if ( bIsGraphicValid )
 {
-Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
+BitmapEx aBmp = aBgdGraphic.GetBitmapEx();
 m_xPreview2->NotifyChange(  );
 }
 else
@@ -1106,7 +1106,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, 
Timer*, pIdle, void )
 
 if (m_xBtnPreview->get_active() && bIsGraphicValid)
 {
-Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
+BitmapEx aBmp = aBgdGraphic.GetBitmapEx();
 m_xPreview2->NotifyChange(  );
 }
 else
@@ -1317,7 +1317,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const 
SvxBrushItem& rBgdAttr,
 
 if (m_xBtnPreview->get_active() && bIsGraphicValid)
 {
-Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
+BitmapEx aBmp = aBgdGraphic.GetBitmapEx();
 m_xPreview2->NotifyChange(  );
 }
 else
commit 5a60a01af104b48aa9569ecb6204c865db74df9e
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:22:51 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 16:01:52 2019 +0200

use BitmapEx in ScanPreview

Change-Id: Ief3dc627ad0e0096eb8d3ef4dc4e538fa34cb703
Reviewed-on: https://gerrit.libreoffice.org/75212
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/extensions/source/scanner/sanedlg.cxx 
b/extensions/source/scanner/sanedlg.cxx
index 2f9d710a41e7..0a7bdb2565c3 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -75,7 +75,7 @@ private:
 enum DragDirection { TopLeft, Top, TopRight, Right, BottomRight, Bottom,
  BottomLeft, Left };
 
-BitmapmaPreviewBitmap;
+BitmapEx  maPreviewBitmapEx;
 tools::Rectangle maPreviewRect;
 Point maTopLeft, maBottomRight;
 Point maMinTopLeft, maMaxBottomRight;
@@ -193,7 +193,7 @@ public:
 void UpdatePreviewBounds();
 void SetBitmap(SvStream )
 {
-ReadDIB(maPreviewBitmap, rStream, true);
+ReadDIBBitmapEx(maPreviewBitmapEx, rStream, true);
 }
 virtual Size GetOptimalSize() const override
 {
@@ -928,7 +928,7 @@ void ScanPreview::UpdatePreviewBounds()
 }
 else
 {
-Size aBMSize( maPreviewBitmap.GetSizePixel() );
+Size aBMSize( maPreviewBitmapEx.GetSizePixel() );
 if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() )
 {
 int nVHeight = (maBottomRight.X() 

[Libreoffice-commits] core.git: 2 commits - cui/source dbaccess/source

2019-06-15 Thread Noel Grandin (via logerrit)
 cui/source/customize/SvxToolbarConfigPage.cxx |   12 ++--
 cui/source/customize/cfg.cxx  |8 
 cui/source/customize/cfgutil.cxx  |5 +++--
 cui/source/dialogs/linkdlg.cxx|5 +++--
 cui/source/dialogs/scriptdlg.cxx  |4 ++--
 cui/source/options/certpath.cxx   |   13 +++--
 cui/source/options/optaboutconfig.cxx |5 +++--
 cui/source/options/optgdlg.cxx|9 +
 cui/source/options/optinet2.cxx   |5 +++--
 cui/source/options/optjava.cxx|4 ++--
 cui/source/options/optpath.cxx|4 ++--
 cui/source/options/tsaurls.cxx|5 +++--
 dbaccess/source/core/api/RowSetCache.cxx  |   20 ++--
 dbaccess/source/filter/xml/xmlfilter.cxx  |6 ++
 dbaccess/source/ui/browser/sbagrid.cxx|9 +
 dbaccess/source/ui/browser/unodatbr.cxx   |4 +++-
 16 files changed, 63 insertions(+), 55 deletions(-)

New commits:
commit ec87e11f0e4bb6f53eb0c5d2575f590aea95269f
Author: Noel Grandin 
AuthorDate: Fri Jun 14 15:29:16 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Jun 15 12:25:00 2019 +0200

loplugin:logexceptionnicely in dbaccess

Change-Id: I2d702b699c2e61dbb363eff671bb43d4ddbf8ee3
Reviewed-on: https://gerrit.libreoffice.org/74045
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index ee4491d52606..c93067ab2944 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -135,9 +135,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 
::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) != 
ResultSetType::FORWARD_ONLY)
 _xRs->beforeFirst();
 }
-catch(const SQLException& e)
+catch(const SQLException&)
 {
-SAL_WARN("dbaccess.core", "ORowSetCache: " << e);
+TOOLS_WARN_EXCEPTION("dbaccess.core", "ORowSetCache");
 }
 
 // check if all keys of the updateable table are fetched
@@ -181,9 +181,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 m_aKeyColumns = pCursor->getJoinedKeyColumns();
 return;
 }
-catch (const Exception& e)
+catch (const Exception&)
 {
-SAL_WARN("dbaccess.core", "ORowSetCache: " << e);
+TOOLS_WARN_EXCEPTION("dbaccess.core", "ORowSetCache");
 }
 m_xCacheSet.clear();
 }
@@ -221,9 +221,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 }
 }
 }
-catch (Exception const& e)
+catch (Exception const&)
 {
-SAL_WARN("dbaccess.core", "ORowSetCache: " << e);
+TOOLS_WARN_EXCEPTION("dbaccess.core", "ORowSetCache");
 }
 }
 
@@ -249,9 +249,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 }
 }
 }
-catch (const SQLException& e)
+catch (const SQLException&)
 {
-SAL_WARN("dbaccess.core", "ORowSetCache: " << e);
+TOOLS_WARN_EXCEPTION("dbaccess.core", "ORowSetCache");
 bNeedKeySet = true;
 }
 
@@ -328,9 +328,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 if(bNoInsert)
 m_nPrivileges |= ~Privilege::INSERT; // remove the insert 
privilege
 }
-catch (const SQLException& e)
+catch (const SQLException&)
 {
-SAL_WARN("dbaccess.core", "ORowSetCache: " << e);
+TOOLS_WARN_EXCEPTION("dbaccess.core", "ORowSetCache");
 // we couldn't create a keyset here so we have to create a 
static cache
 m_xCacheSet = new OStaticSet(i_nMaxRows);
 m_xCacheSet->construct(_xRs,i_sRowSetFilter);
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx 
b/dbaccess/source/filter/xml/xmlfilter.cxx
index 27bc17bd762d..355f9cafcf0b 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -115,12 +115,10 @@ static ErrCode ReadThroughComponent(
 {
 xParser->parseStream( aParserInput );
 }
-catch (const SAXParseException& r)
+catch (const SAXParseException&)
 {
 #if OSL_DEBUG_LEVEL > 0
-SAL_WARN("dbaccess", "SAX parse exception caught while importing: " << 
r << r.LineNumber << "," << r.ColumnNumber);
-#else
-(void)r;
+TOOLS_WARN_EXCEPTION("dbaccess", "SAX parse exception caught while 
importing");
 #endif
 return ErrCode(1);
 }
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 

[Libreoffice-commits] core.git: 2 commits - cui/source dbaccess/source include/vcl sd/inc sd/source starmath/inc starmath/source vcl/source

2019-06-09 Thread Noel Grandin (via logerrit)
 cui/source/customize/SvxToolbarConfigPage.cxx   |4 +-
 cui/source/inc/SvxToolbarConfigPage.hxx |2 -
 dbaccess/source/ui/control/tabletree.cxx|   36 +---
 dbaccess/source/ui/inc/tabletree.hxx|3 --
 include/vcl/bitmapex.hxx|6 
 sd/inc/sdabstdlg.hxx|1 
 sd/source/ui/dlg/sddlgfact.cxx  |5 +++
 sd/source/ui/dlg/sddlgfact.hxx  |1 
 sd/source/ui/dlg/sdtreelb.cxx   |4 +-
 sd/source/ui/dlg/tpaction.cxx   |4 +-
 sd/source/ui/inc/sdtreelb.hxx   |2 -
 starmath/inc/AccessibleSmElementsControl.hxx|2 -
 starmath/source/AccessibleSmElementsControl.cxx |4 --
 starmath/source/ElementsDockingWindow.cxx   |2 -
 vcl/source/gdi/bitmapex.cxx |9 ++
 15 files changed, 38 insertions(+), 47 deletions(-)

New commits:
commit 13e5d52fc37f9283edd8a055d6b86108701182f1
Author: Noel Grandin 
AuthorDate: Sun Jun 9 08:50:02 2019 +0200
Commit: Noel Grandin 
CommitDate: Sun Jun 9 13:49:39 2019 +0200

loplugin:constantparam

Change-Id: I7bbc4e1546acf58f1ca24bfec5e465bad5ca90de
Reviewed-on: https://gerrit.libreoffice.org/73732
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx 
b/cui/source/customize/SvxToolbarConfigPage.cxx
index 178a9c851ac3..fde5b58dd58b 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -856,7 +856,7 @@ void SvxToolbarConfigPage::SelectElement()
 UpdateButtonStates();
 }
 
-void SvxToolbarConfigPage::AddFunction(int nTarget, bool bFront)
+void SvxToolbarConfigPage::AddFunction(int nTarget)
 {
 SvxConfigEntry* pToolbar = GetTopLevelSelection();
 
@@ -865,7 +865,7 @@ void SvxToolbarConfigPage::AddFunction(int nTarget, bool 
bFront)
 
 // Add the command to the contents listbox of the selected toolbar
 int nNewLBEntry =
-SvxConfigPage::AddFunction(nTarget, bFront, true/*bAllowDuplicates*/);
+SvxConfigPage::AddFunction(nTarget, /*bFront*/false, 
true/*bAllowDuplicates*/);
 
 if (nNewLBEntry == -1)
 return;
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx 
b/cui/source/inc/SvxToolbarConfigPage.hxx
index 7c82bd8a61ea..bd0d32f3b3ea 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -70,7 +70,7 @@ public:
 virtual ~SvxToolbarConfigPage() override;
 virtual void dispose() override;
 
-voidAddFunction(int nTarget = -1, bool bFront = false);
+voidAddFunction(int nTarget = -1);
 
 voidMoveEntry( bool bMoveUp ) override;
 
diff --git a/dbaccess/source/ui/control/tabletree.cxx 
b/dbaccess/source/ui/control/tabletree.cxx
index 4cc0885d8112..a0e126254062 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -410,11 +410,7 @@ void TableTreeListBox::UpdateTableList( const Reference< 
XConnection >& _rxConne
 for (auto const& table : _rTables)
 {
 // add the entry
-implAddEntry(
-xMeta,
-table.first,
-false
-);
+implAddEntry(xMeta, table.first);
 }
 
 if ( !m_bNoEmptyFolders && lcl_shouldDisplayEmptySchemasAndCatalogs( 
_rxConnection ) )
@@ -684,8 +680,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
 
 void TableTreeListBox::implAddEntry(
 const Reference< XDatabaseMetaData >& _rxMeta,
-const OUString& _rTableName,
-bool _bCheckName
+const OUString& _rTableName
 )
 {
 OSL_PRECOND( _rxMeta.is(), "OTableTreeListBox::implAddEntry: invalid meta 
data!" );
@@ -746,23 +741,20 @@ void TableTreeListBox::implAddEntry(
 xParentEntry = std::move(xFolder);
 }
 
-if (!_bCheckName || !GetEntryPosByName(sName, xParentEntry.get()))
-{
-std::unique_ptr xEntry = m_xTreeView->make_iterator();
-m_xTreeView->insert(xParentEntry.get(), -1, nullptr, nullptr, nullptr, 
nullptr, nullptr, false, xEntry.get());
+std::unique_ptr xEntry = m_xTreeView->make_iterator();
+m_xTreeView->insert(xParentEntry.get(), -1, nullptr, nullptr, nullptr, 
nullptr, nullptr, false, xEntry.get());
 
-auto xGraphic = m_xImageProvider->getXGraphic(_rTableName, 
DatabaseObject::TABLE);
-if (xGraphic.is())
-m_xTreeView->set_image(*xEntry, xGraphic, -1);
-else
-{
-OUString sImageId(m_xImageProvider->getImageId(_rTableName, 
DatabaseObject::TABLE));
-m_xTreeView->set_image(*xEntry, sImageId, -1);
-}
-if (m_bShowToggles)
-m_xTreeView->set_toggle(*xEntry, TRISTATE_FALSE, 0);
-m_xTreeView->set_text(*xEntry, sName, m_nTextColumn);
+auto xGraphic = 

[Libreoffice-commits] core.git: 2 commits - cui/source include/editeng nlpsolver/src writerfilter/source xmloff/source

2019-06-03 Thread László Németh (via logerrit)
 cui/source/tabpages/chardlg.cxx|2 -
 include/editeng/escapementitem.hxx |5 +--
 nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java |4 +-
 writerfilter/source/dmapper/DomainMapper.cxx   |   16 
--
 xmloff/source/style/escphdl.cxx|7 ++--
 5 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit 32262b0a537207832d7d126d8427d8949b9e821d
Author: László Németh 
AuthorDate: Wed May 29 16:36:41 2019 +0200
Commit: László Németh 
CommitDate: Mon Jun 3 16:12:27 2019 +0200

tdf#120412 char formatting UI: clean-up DFLT_ESC_AUTO

Default auto values must be outside of the new
enlarged range of the superscript/subscript percent values.

Note: the raising limit was modified to 13999 from 14400,
because the RTF unit test tdf112208_hangingIndent.rtf
lost its hanging from the bigger value.

Change-Id: I3a7e9715a27570278ee4ee70f9fc9ad29457e100
Reviewed-on: https://gerrit.libreoffice.org/73166
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index d1340a4463b3..8fa64293fe87 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2705,7 +2705,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
 m_nSubProp = static_cast(sUser.getToken( 0, ';', nIdx 
).toInt32());
 
 // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters)
-m_xHighLowMF->set_max(14400, FieldUnit::PERCENT);
+m_xHighLowMF->set_max(MAX_ESC_POS, FieldUnit::PERCENT);
 
 //fdo#75307 validate all the entries and discard all of them if any are
 //out of range
diff --git a/include/editeng/escapementitem.hxx 
b/include/editeng/escapementitem.hxx
index 86e148361051..82f9dde70823 100644
--- a/include/editeng/escapementitem.hxx
+++ b/include/editeng/escapementitem.hxx
@@ -28,8 +28,9 @@
 #define DFLT_ESC_SUPER   33 // 1/3
 #define DFLT_ESC_SUB-33 // also 1/3 previously 8/100
 #define DFLT_ESC_PROP58
-#define DFLT_ESC_AUTO_SUPER 101
-#define DFLT_ESC_AUTO_SUB  -101
+#define MAX_ESC_POS  13999
+#define DFLT_ESC_AUTO_SUPER  (MAX_ESC_POS+1)
+#define DFLT_ESC_AUTO_SUB-DFLT_ESC_AUTO_SUPER
 
 /*  [Description]
 
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 6276d56a1b01..195e360a671d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -68,6 +68,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2206,9 +2207,9 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 sal_Int16 nEscapement = 0;
 sal_Int8 nProp  = 58;
 if ( sStringValue == "superscript" )
-nEscapement = 101;
+nEscapement = DFLT_ESC_AUTO_SUPER;
 else if ( sStringValue == "subscript" )
-nEscapement = -101;
+nEscapement = DFLT_ESC_AUTO_SUB;
 else
 nProp = 100;
 
@@ -2839,8 +2840,17 @@ void DomainMapper::processDeferredCharacterProperties( 
const std::map< sal_Int32
 nEscapement = ( nIntValue > 0 ) ? 58: -58;
 }
 }
+
 // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters)
-if( nEscapement > 14400 ) nEscapement = 14400;
+if ( nEscapement > MAX_ESC_POS )
+{
+nEscapement = MAX_ESC_POS;
+}
+else if ( nEscapement < -MAX_ESC_POS )
+{
+nEscapement = -MAX_ESC_POS;
+}
+
 rContext->Insert(PROP_CHAR_ESCAPEMENT, uno::makeAny( 
nEscapement ) );
 rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT,  uno::makeAny( nProp 
) );
 }
diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx
index f97ca6ee1f2f..f52c360d0865 100644
--- a/xmloff/source/style/escphdl.cxx
+++ b/xmloff/source/style/escphdl.cxx
@@ -28,10 +28,11 @@
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 
-// this is a copy of defines in svx/inc/escpitem.hxx
+// this is a copy of defines in include/editeng/escapementitem.hxx
 #define DFLT_ESC_PROP58
-#define DFLT_ESC_AUTO_SUPER 101
-#define DFLT_ESC_AUTO_SUB  -101
+#define MAX_ESC_POS  13999
+#define DFLT_ESC_AUTO_SUPER  (MAX_ESC_POS+1)
+#define DFLT_ESC_AUTO_SUB-DFLT_ESC_AUTO_SUPER
 
 
 // class XMLEscapementPropHdl
commit a2720a24328fcee3bde431dc632c068b266228c9
Author: Todor Balabanov 
AuthorDate: Fri May 17 17:13:13 2019 +0300
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 3 16:12:17 2019 +0200

Checking of min and max factor value was added.

It is possible user to swap these two values.

Change-Id: 

[Libreoffice-commits] core.git: 2 commits - cui/source editeng/source sw/qa writerfilter/source

2019-05-29 Thread László Németh (via logerrit)
 cui/source/tabpages/chardlg.cxx   |3 +++
 editeng/source/items/textitem.cxx |3 ++-
 sw/qa/extras/ooxmlexport/data/test_tdf120412.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|   11 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |2 ++
 5 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 868d9212a1b4cce7faa3eabc047ab7f312c613de
Author: László Németh 
AuthorDate: Wed May 29 11:56:50 2019 +0200
Commit: László Németh 
CommitDate: Wed May 29 14:31:15 2019 +0200

tdf#120412 character formatting UI: allow >100% raising

in superscript/subscript text positions instead of
changing the greater values (eg. imported from DOCX)
to 100% by accident, simply using the character
formatting window.

Change-Id: I3adf6445070c183bd6005a02239962f18f504f9d
Reviewed-on: https://gerrit.libreoffice.org/73151
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 9236a26a2dbd..d1340a4463b3 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2704,6 +2704,9 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
 m_nSuperProp = static_cast(sUser.getToken( 0, ';', nIdx 
).toInt32());
 m_nSubProp = static_cast(sUser.getToken( 0, ';', nIdx 
).toInt32());
 
+// tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters)
+m_xHighLowMF->set_max(14400, FieldUnit::PERCENT);
+
 //fdo#75307 validate all the entries and discard all of them if any are
 //out of range
 bool bValid = true;
commit bdfb3edb981ff04f1f3f6dc1ef335e37a0980245
Author: Jozsef Szakacs 
AuthorDate: Wed Mar 13 12:32:20 2019 +0100
Commit: László Németh 
CommitDate: Wed May 29 14:31:03 2019 +0200

tdf#120412 DOCX filter: fix missing superscript

by editeng support of large superscript raising.

Maximal raising of superscript text is 1584 pt in MSO,
while LibreOffice didn't import the values greater
than 100% of the current font height. Using the maximal
percent value of the default 11 pt font, the limit
is 14400% now, fixing most of the import problems.
Greater raisings will be limited to 14400% during the
DOCX import.

Note: the standard doesn't limit the bigger percent
values, see "20.374 style:text-position" and
"18.3.23 percent" in OpenDocument 1.2.

Change-Id: I3d0d08f273f2067180f74fba40c47d62364fcc59
Reviewed-on: https://gerrit.libreoffice.org/69164
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index 13c5c04ffbbe..e4ce386c68c9 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1782,7 +1782,8 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 case MID_ESC:
 {
 sal_Int16 nVal = sal_Int16();
-if( (rVal >>= nVal) && (std::abs(nVal) <= 101))
+// tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters)
+if( (rVal >>= nVal) && (std::abs(nVal) <= 14400))
 nEsc = nVal;
 else
 return false;
diff --git a/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx 
b/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx
new file mode 100644
index ..6ce527842c9b
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 3b1250f11fd9..9cb85a8d11f0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -203,6 +203,17 @@ DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, 
"textbox-wpg-only.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(100), 
getProperty(getRun(getParagraphOfText(1, xText), 1), 
"CharEscapementHeight"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testFontEsc, "test_tdf120412.docx")
+{
+xmlDocPtr pXmlDoc =parseExport("word/document.xml");
+if (!pXmlDoc)
+return;
+// don't lose the run with superscript formatting
+assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2);
+// raising is greater, than 100%
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r[2]/w:rPr/w:position","val", "24");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testMceWpg, "mce-wpg.docx")
 {
 // Make sure that we read the primary branch, if wpg is requested as a 
feature.
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index cc7b7c720e05..6276d56a1b01 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2839,6 +2839,8 @@ void DomainMapper::processDeferredCharacterProperties( 
const std::map< sal_Int32
 nEscapement = ( nIntValue 

[Libreoffice-commits] core.git: 2 commits - cui/source vcl/source

2019-05-21 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/transfrm.cxx |2 
 vcl/source/window/dialog.cxx |  111 +--
 2 files changed, 60 insertions(+), 53 deletions(-)

New commits:
commit c1816feaa9c6ab30f01e14f621402307543c82ac
Author: Caolán McNamara 
AuthorDate: Mon May 20 16:13:40 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 21 09:54:15 2019 +0200

Resolves: tdf#125394 consider unwelded dialogs

Change-Id: Ic66a622bb8b5481656ffe8e29a345a435042402e
Reviewed-on: https://gerrit.libreoffice.org/72625
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 5348e206f2c0..03512eb76178 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1445,25 +1445,28 @@ vcl::Window* Dialog::get_widget_for_response(int 
response)
 //copy explicit responses
 std::map, short> aResponses(mpDialogImpl->maResponses);
 
-//add implicit responses
-for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
- pChild = pChild->GetWindow(GetWindowType::Next))
+if (mpActionArea)
 {
-if (aResponses.find(pChild) != aResponses.end())
-continue;
-switch (pChild->GetType())
+//add implicit responses
+for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
+ pChild = pChild->GetWindow(GetWindowType::Next))
 {
-case WindowType::OKBUTTON:
-aResponses[pChild] = RET_OK;
-break;
-case WindowType::CANCELBUTTON:
-aResponses[pChild] = RET_CANCEL;
-break;
-case WindowType::HELPBUTTON:
-aResponses[pChild] = RET_HELP;
-break;
-default:
-break;
+if (aResponses.find(pChild) != aResponses.end())
+continue;
+switch (pChild->GetType())
+{
+case WindowType::OKBUTTON:
+aResponses[pChild] = RET_OK;
+break;
+case WindowType::CANCELBUTTON:
+aResponses[pChild] = RET_CANCEL;
+break;
+case WindowType::HELPBUTTON:
+aResponses[pChild] = RET_HELP;
+break;
+default:
+break;
+}
 }
 }
 
@@ -1481,25 +1484,28 @@ int Dialog::get_default_response()
 //copy explicit responses
 std::map, short> aResponses(mpDialogImpl->maResponses);
 
-//add implicit responses
-for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
- pChild = pChild->GetWindow(GetWindowType::Next))
+if (mpActionArea)
 {
-if (aResponses.find(pChild) != aResponses.end())
-continue;
-switch (pChild->GetType())
+//add implicit responses
+for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
+ pChild = pChild->GetWindow(GetWindowType::Next))
 {
-case WindowType::OKBUTTON:
-aResponses[pChild] = RET_OK;
-break;
-case WindowType::CANCELBUTTON:
-aResponses[pChild] = RET_CANCEL;
-break;
-case WindowType::HELPBUTTON:
-aResponses[pChild] = RET_HELP;
-break;
-default:
-break;
+if (aResponses.find(pChild) != aResponses.end())
+continue;
+switch (pChild->GetType())
+{
+case WindowType::OKBUTTON:
+aResponses[pChild] = RET_OK;
+break;
+case WindowType::CANCELBUTTON:
+aResponses[pChild] = RET_CANCEL;
+break;
+case WindowType::HELPBUTTON:
+aResponses[pChild] = RET_HELP;
+break;
+default:
+break;
+}
 }
 }
 
@@ -1518,25 +1524,28 @@ void Dialog::set_default_response(int response)
 //copy explicit responses
 std::map, short> aResponses(mpDialogImpl->maResponses);
 
-//add implicit responses
-for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
- pChild = pChild->GetWindow(GetWindowType::Next))
+if (mpActionArea)
 {
-if (aResponses.find(pChild) != aResponses.end())
-continue;
-switch (pChild->GetType())
+//add implicit responses
+for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
+ pChild = pChild->GetWindow(GetWindowType::Next))
 {
-case WindowType::OKBUTTON:
-aResponses[pChild] = 

[Libreoffice-commits] core.git: 2 commits - cui/source desktop/source sc/uiconfig svx/source

2019-05-20 Thread Kiyotaka Nishibori (via logerrit)
 cui/source/tabpages/transfrm.cxx|   47 --
 desktop/source/lib/init.cxx |   32 +
 sc/uiconfig/scalc/ui/condformatmanager.ui   |4 -
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   65 +---
 svx/source/svdraw/svdedtv1.cxx  |   38 +--
 5 files changed, 45 insertions(+), 141 deletions(-)

New commits:
commit 2141f6d44a4f72396d9ab8effe8d1619a25dca8b
Author: Kiyotaka Nishibori 
AuthorDate: Sun May 19 11:05:07 2019 +0900
Commit: Katarina Behrens 
CommitDate: Mon May 20 10:31:09 2019 +0200

swapped column titles in condformatmanager.ui to fit the contents.

Change-Id: Ia4c9a32e91b5bc65d223f7d1b2aa6d8b2c64454e
Reviewed-on: https://gerrit.libreoffice.org/72543
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/sc/uiconfig/scalc/ui/condformatmanager.ui 
b/sc/uiconfig/scalc/ui/condformatmanager.ui
index c5e06da45e58..6423fa41829f 100644
--- a/sc/uiconfig/scalc/ui/condformatmanager.ui
+++ b/sc/uiconfig/scalc/ui/condformatmanager.ui
@@ -133,7 +133,7 @@
   
 True
 6
-First Condition
+Range
 
   
   
@@ -146,7 +146,7 @@
   
 True
 6
-Range
+First 
Condition
 
   
   
commit 89189743b9795cae13c69f69cdf6901b9ed354a7
Author: Marco Cecchetti 
AuthorDate: Fri Nov 30 17:20:37 2018 +0100
Commit: Marco Cecchetti 
CommitDate: Mon May 20 10:31:05 2019 +0200

lok: shape selection: perform the needed unit conversion in a clever way

Change-Id: I505bd41801b5fd1898a9eddc81b102f2f7ae20b5
Reviewed-on: https://gerrit.libreoffice.org/70563
Tested-by: Jenkins
Reviewed-by: Marco Cecchetti 

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 9adcea111d85..397803c96e5c 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -88,28 +88,6 @@ const sal_uInt16 SvxSlantTabPage::pSlantRanges[] =
 0
 };
 
-namespace {
-
-bool lcl_twipsNeeded(const SdrView* pView)
-{
-const bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
-if (bTiledRendering)
-{
-// We gets the position in twips
-if (OutputDevice* pOutputDevice = pView->GetFirstOutputDevice())
-{
-if (pOutputDevice->GetMapMode().GetMapUnit() == 
MapUnit::Map100thMM)
-{
-return true;
-}
-}
-}
-return false;
-}
-
-} // anonymous ns
-
-
 /*
 |*
 |* constructor of the tab dialog: adds the pages to the dialog
@@ -279,18 +257,9 @@ bool SvxAngleTabPage::FillItemSet(SfxItemSet* rSet)
 const double fTmpX((GetCoreValue(*m_xMtrPosX, ePoolUnit) + 
maAnchor.getX()) * fUIScale);
 const double fTmpY((GetCoreValue(*m_xMtrPosY, ePoolUnit) + 
maAnchor.getY()) * fUIScale);
 
-long nRotateX = basegfx::fround(fTmpX);
-long nRotateY = basegfx::fround(fTmpY);
-
-if (lcl_twipsNeeded(pView))
-{
-nRotateX = OutputDevice::LogicToLogic(nRotateX, 
MapUnit::Map100thMM, MapUnit::MapTwip);
-nRotateY = OutputDevice::LogicToLogic(nRotateY, 
MapUnit::Map100thMM, MapUnit::MapTwip);
-}
-
 rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ANGLE), 
m_aCtlAngle.GetRotation()));
-rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_X), nRotateX));
-rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_Y), nRotateY));
+rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_X), 
basegfx::fround(fTmpX)));
+rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_Y), 
basegfx::fround(fTmpY)));
 
 bModified = true;
 }
@@ -965,12 +934,6 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* 
rOutAttrs )
 // #101581# GetTopLeftPosition(...) needs coordinates after UI 
scaling, in real PagePositions
 GetTopLeftPosition(fX, fY, maRange);
 
-if (lcl_twipsNeeded(mpView))
-{
-fX = OutputDevice::LogicToLogic(fX, MapUnit::Map100thMM, 
MapUnit::MapTwip);
-fY = OutputDevice::LogicToLogic(fY, MapUnit::Map100thMM, 
MapUnit::MapTwip);
-}
-
 rOutAttrs->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_X), 
basegfx::fround(fX)));
 rOutAttrs->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_Y), 
basegfx::fround(fY)));
 
@@ -1010,12 +973,6 @@ bool 

[Libreoffice-commits] core.git: 2 commits - cui/source svx/source

2019-05-18 Thread Caolán McNamara (via logerrit)
 cui/source/inc/align.hxx  |   12 +-
 cui/source/tabpages/align.cxx |   48 ++
 svx/source/items/pageitem.cxx |   31 +++
 3 files changed, 77 insertions(+), 14 deletions(-)

New commits:
commit e79befa6898aef6616adca9e89398242abe9dc5a
Author: Caolán McNamara 
AuthorDate: Fri May 17 17:09:16 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 18 22:39:43 2019 +0200

Resolves: tdf#124467 enable wrap text to return to TRISTATE_INDET

Change-Id: Ie956560885fd9bb9e7367018a2f6e37a26c3c6af
Reviewed-on: https://gerrit.libreoffice.org/72494
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 374a57c7e25a..063d5b1f59f5 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -71,9 +71,19 @@ private:
 boolHasAlignmentChanged( const SfxItemSet& rNew, 
sal_uInt16 nWhich ) const;
 
 DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void);
-DECL_LINK(UpdateEnableClickHdl, weld::ToggleButton&, void);
+DECL_LINK(StackedClickHdl, weld::ToggleButton&, void);
+DECL_LINK(AsianModeClickHdl, weld::ToggleButton&, void);
+DECL_LINK(WrapClickHdl, weld::ToggleButton&, void);
+DECL_LINK(HyphenClickHdl, weld::ToggleButton&, void);
+DECL_LINK(ShrinkClickHdl, weld::ToggleButton&, void);
 
 private:
+weld::TriStateEnabled m_aStackedState;
+weld::TriStateEnabled m_aAsianModeState;
+weld::TriStateEnabled m_aWrapState;
+weld::TriStateEnabled m_aHyphenState;
+weld::TriStateEnabled m_aShrinkState;
+
 SvxDialControl m_aCtrlDial;
 SvtValueSet m_aVsRefEdge;
 
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index e9cf3930b3fb..900a91f7acd8 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -143,8 +143,12 @@ AlignmentTabPage::AlignmentTabPage(TabPageParent pParent, 
const SfxItemSet& rCor
 InitVsRefEgde();
 
 m_xLbHorAlign->connect_changed(LINK(this, AlignmentTabPage, 
UpdateEnableHdl));
-m_xBtnWrap->connect_toggled(LINK(this, AlignmentTabPage, 
UpdateEnableClickHdl));
-m_xCbStacked->connect_toggled(LINK(this, AlignmentTabPage, 
UpdateEnableClickHdl));
+
+m_xCbStacked->connect_toggled(LINK(this, AlignmentTabPage, 
StackedClickHdl));
+m_xCbAsianMode->connect_toggled(LINK(this, AlignmentTabPage, 
AsianModeClickHdl));
+m_xBtnWrap->connect_toggled(LINK(this, AlignmentTabPage, WrapClickHdl));
+m_xBtnHyphen->connect_toggled(LINK(this, AlignmentTabPage, 
HyphenClickHdl));
+m_xBtnShrink->connect_toggled(LINK(this, AlignmentTabPage, 
ShrinkClickHdl));
 
 // Asian vertical mode
 m_xCbAsianMode->set_visible(SvtCJKOptions().IsVerticalTextEnabled());
@@ -322,26 +326,30 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 
 namespace
 {
-void ResetBool(sal_uInt16 nWhich, const SfxItemSet* pSet, 
weld::CheckButton& rBtn)
+void ResetBool(sal_uInt16 nWhich, const SfxItemSet* pSet, 
weld::CheckButton& rBtn, weld::TriStateEnabled& rTriState)
 {
 SfxItemState eState = pSet->GetItemState(nWhich);
 switch (eState)
 {
 case SfxItemState::UNKNOWN:
 rBtn.hide();
+rTriState.bTriStateEnabled = false;
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
 rBtn.set_sensitive(false);
+rTriState.bTriStateEnabled = false;
 break;
 case SfxItemState::DONTCARE:
 rBtn.set_state(TRISTATE_INDET);
+rTriState.bTriStateEnabled = true;
 break;
 case SfxItemState::DEFAULT:
 case SfxItemState::SET:
 {
 const SfxBoolItem& rItem = static_cast(pSet->Get(nWhich));
 rBtn.set_state(static_cast(rItem.GetValue()));
+rTriState.bTriStateEnabled = false;
 break;
 }
 }
@@ -353,11 +361,11 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 {
 SfxTabPage::Reset(pCoreAttrs);
 
-ResetBool(GetWhich(SID_ATTR_ALIGN_STACKED), pCoreAttrs, *m_xCbStacked);
-ResetBool(GetWhich(SID_ATTR_ALIGN_ASIANVERTICAL), pCoreAttrs, 
*m_xCbAsianMode);
-ResetBool(GetWhich(SID_ATTR_ALIGN_LINEBREAK), pCoreAttrs, *m_xBtnWrap);
-ResetBool(GetWhich(SID_ATTR_ALIGN_HYPHENATION), pCoreAttrs, *m_xBtnHyphen);
-ResetBool(GetWhich(SID_ATTR_ALIGN_SHRINKTOFIT), pCoreAttrs, *m_xBtnShrink);
+ResetBool(GetWhich(SID_ATTR_ALIGN_STACKED), pCoreAttrs, *m_xCbStacked, 
m_aStackedState);
+ResetBool(GetWhich(SID_ATTR_ALIGN_ASIANVERTICAL), pCoreAttrs, 
*m_xCbAsianMode, m_aAsianModeState);
+ResetBool(GetWhich(SID_ATTR_ALIGN_LINEBREAK), pCoreAttrs, *m_xBtnWrap, 
m_aWrapState);
+ResetBool(GetWhich(SID_ATTR_ALIGN_HYPHENATION), pCoreAttrs, *m_xBtnHyphen, 

[Libreoffice-commits] core.git: 2 commits - cui/source dbaccess/source include/IwyuFilter_include.yaml include/o3tl include/svl include/svx sc/qa sc/source sd/source svl/source svx/source sw/inc sw/qa

2019-05-16 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/cuigaldlg.cxx  |1 
 cui/source/inc/cuigaldlg.hxx  |1 
 dbaccess/source/ui/browser/brwctrlr.cxx   |1 
 include/IwyuFilter_include.yaml   |   30 ++
 include/o3tl/sorted_vector.hxx|5 +
 include/svl/listener.hxx  |4 
 include/svx/EnhancedCustomShape2d.hxx |6 -
 include/svx/EnhancedCustomShapeFunctionParser.hxx |1 
 include/svx/e3ditem.hxx   |2 
 include/svx/e3dundo.hxx   |2 
 include/svx/extrusionbar.hxx  |1 
 include/svx/fillctrl.hxx  |1 
 include/svx/float3d.hxx   |6 -
 include/svx/fmglob.hxx|1 
 include/svx/fmgridcl.hxx  |6 -
 include/svx/fmgridif.hxx  |9 +-
 include/svx/fmmodel.hxx   |4 
 include/svx/fmobjfac.hxx  |1 
 include/svx/fmpage.hxx|2 
 include/svx/fmsearch.hxx  |   11 +-
 include/svx/fmshell.hxx   |   15 ++-
 include/svx/fmsrcimp.hxx  |   13 +--
 include/svx/fmtools.hxx   |   43 ++
 include/svx/fmview.hxx|1 
 include/svx/fontlb.hxx|3 
 include/svx/fontwork.hxx  |8 -
 include/svx/fontworkbar.hxx   |1 
 include/svx/fontworkgallery.hxx   |4 
 include/svx/framelink.hxx |9 --
 include/svx/framelinkarray.hxx|7 -
 include/svx/frmdirlbox.hxx|2 
 include/svx/frmsel.hxx|6 -
 include/svx/galctrl.hxx   |8 -
 include/svx/gallery.hxx   |7 -
 include/svx/gallery1.hxx  |2 
 include/svx/galleryitem.hxx   |5 -
 include/svx/galmisc.hxx   |9 --
 include/svx/galtheme.hxx  |7 -
 include/svx/grafctrl.hxx  |1 
 include/svx/graphctl.hxx  |1 
 include/svx/graphichelper.hxx |5 -
 include/svx/grfflt.hxx|2 
 include/svx/gridctrl.hxx  |   18 +---
 sc/qa/unit/screenshots/screenshots.cxx|1 
 sc/source/core/data/fillinfo.cxx  |1 
 sc/source/ui/docshell/docsh3.cxx  |1 
 sc/source/ui/drawfunc/fuconarc.cxx|1 
 sc/source/ui/drawfunc/fuconpol.cxx|1 
 sc/source/ui/drawfunc/fuconrec.cxx|1 
 sc/source/ui/drawfunc/fuconstr.cxx|1 
 sc/source/ui/drawfunc/fuconuno.cxx|2 
 sc/source/ui/drawfunc/fuins1.cxx  |1 
 sc/source/ui/drawfunc/fupoor.cxx  |1 
 sc/source/ui/miscdlgs/autofmt.cxx |2 
 sc/source/ui/view/gridwin3.cxx|1 
 sc/source/ui/view/printfun.cxx|1 
 sc/source/ui/view/tabvwsh9.cxx|1 
 sd/source/ui/animations/CustomAnimationDialog.cxx |1 
 sd/source/ui/view/drviews7.cxx|1 
 sd/source/ui/view/drviewsa.cxx|1 
 svl/source/notify/listener.cxx|6 -
 svx/source/customshapes/EnhancedCustomShape2d.cxx |3 
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |2 
 svx/source/dialog/frmsel.cxx  |1 
 svx/source/engine3d/float3d.cxx   |2 
 svx/source/engine3d/view3d1.cxx   |1 
 svx/source/fmcomp/fmgridcl.cxx|2 
 svx/source/fmcomp/fmgridif.cxx|1 
 svx/source/fmcomp/gridcell.cxx|4 
 svx/source/fmcomp/gridctrl.cxx  

[Libreoffice-commits] core.git: 2 commits - cui/source vcl/source

2019-05-03 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuigaldlg.cxx |7 +--
 vcl/source/app/salvtables.cxx|4 
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit c0038f61aff45595c962911f16dfdef93f41924e
Author: Caolán McNamara 
AuthorDate: Fri May 3 10:28:44 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 3 13:38:32 2019 +0200

Resolves: tdf#125080 crashing adding a ref to a non-VclPtr

Change-Id: I72a0deaab3d86ac0772092ab5f60bcace7632847
Reviewed-on: https://gerrit.libreoffice.org/71729
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index f54c1b3cf727..d9ea30e9ff20 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -217,8 +217,6 @@ IMPL_LINK_NOARG(SearchProgress, CleanUpHdl, void*, void)
 m_aSearchThread->join();
 
 m_xDialog->response(RET_OK);
-
-m_xDialog.reset();
 }
 
 void SearchProgress::LaunchThread()
@@ -245,7 +243,6 @@ TakeThread::~TakeThread()
 {
 }
 
-
 void TakeThread::execute()
 {
 sal_Int32   nEntries;
@@ -290,10 +287,9 @@ void TakeThread::execute()
 pStatusProgress.reset();
 }
 
-Application::PostUserEvent( LINK( mpProgress, TakeProgress, CleanUpHdl ), 
nullptr, true );
+Application::PostUserEvent(LINK(mpProgress, TakeProgress, CleanUpHdl));
 }
 
-
 TakeProgress::TakeProgress(weld::Window* pParent, TPGalleryThemeProperties* 
pTabPage)
 : GenericDialogController(pParent, "cui/ui/galleryapplyprogress.ui",
   "GalleryApplyProgress")
@@ -365,7 +361,6 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 xWait.reset();
 
 m_xDialog->response(RET_OK);
-m_xDialog.reset();
 }
 
 void TakeProgress::LaunchThread()
commit b329d6f4ce4a594c35125fbe180aed876a66c454
Author: Caolán McNamara 
AuthorDate: Fri May 3 10:29:15 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 3 13:38:20 2019 +0200

block/unblock notify events for TextView text/selection change

Change-Id: I7745c04b9331b98c9c405544fe262c24ed066ddd
Reviewed-on: https://gerrit.libreoffice.org/71731
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 72011c1667cf..4ed1d96158e4 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3940,12 +3940,16 @@ public:
 
 virtual void set_text(const OUString& rText) override
 {
+disable_notify_events();
 m_xTextView->SetText(rText);
+enable_notify_events();
 }
 
 virtual void replace_selection(const OUString& rText) override
 {
+disable_notify_events();
 m_xTextView->ReplaceSelected(rText);
+enable_notify_events();
 }
 
 virtual OUString get_text() const override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/svtools include/svx include/vcl sc/source sc/uiconfig sfx2/source solenv/sanitizers svtools/source svx/source svx/uiconfig s

2019-04-27 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/postdlg.cxx   |2 
 cui/source/factory/dlgfact.cxx   |6 
 cui/source/factory/dlgfact.hxx   |6 
 cui/source/inc/postdlg.hxx   |4 
 cui/source/tabpages/numfmt.cxx   |2 
 include/sfx2/basedlgs.hxx|1 
 include/sfx2/childwin.hxx|8 
 include/svtools/ctrlbox.hxx  |9 
 include/svx/ctredlin.hxx |  176 +--
 include/svx/sidebar/PanelLayout.hxx  |7 
 include/svx/svxdlg.hxx   |2 
 include/vcl/treelistbox.hxx  |2 
 include/vcl/weld.hxx |   24 
 sc/source/ui/docshell/docsh3.cxx |6 
 sc/source/ui/inc/acredlin.hxx|   66 -
 sc/source/ui/inc/conflictsdlg.hxx|   46 -
 sc/source/ui/inc/highred.hxx |   36 
 sc/source/ui/inc/reffact.hxx |   86 -
 sc/source/ui/inc/simpref.hxx |2 
 sc/source/ui/miscdlgs/acredlin.cxx   | 1014 ++-
 sc/source/ui/miscdlgs/conflictsdlg.cxx   |  308 +++---
 sc/source/ui/miscdlgs/highred.cxx|  221 ++---
 sc/source/ui/miscdlgs/simpref.cxx|9 
 sc/source/ui/view/reffact.cxx|   60 -
 sc/source/ui/view/tabview3.cxx   |   24 
 sc/source/ui/view/tabvwsh4.cxx   |   11 
 sc/source/ui/view/tabvwshc.cxx   |   14 
 sc/uiconfig/scalc/ui/conflictsdialog.ui  |   92 +-
 sc/uiconfig/scalc/ui/showchangesdialog.ui|   15 
 sfx2/source/appl/workwin.cxx |   10 
 sfx2/source/dialog/basedlgs.cxx  |   13 
 solenv/sanitizers/ui/modules/scalc.false |3 
 solenv/sanitizers/ui/modules/scalc.suppr |2 
 svtools/source/control/ctrlbox.cxx   |   12 
 svx/source/dialog/ctredlin.cxx   |  875 +--
 svx/source/sidebar/PanelLayout.cxx   |9 
 svx/uiconfig/ui/acceptrejectchangesdialog.ui |   45 -
 svx/uiconfig/ui/redlinefilterpage.ui |   63 -
 svx/uiconfig/ui/redlineviewpage.ui   |  288 --
 sw/inc/swabstdlg.hxx |2 
 sw/inc/viewsh.hxx|3 
 sw/source/core/view/viewsh.cxx   |8 
 sw/source/ui/dialog/swdlgfact.cxx|   15 
 sw/source/ui/dialog/swdlgfact.hxx|   12 
 sw/source/ui/dialog/wordcountdialog.cxx  |2 
 sw/source/ui/misc/swmodalredlineacceptdlg.cxx|   41 
 sw/source/uibase/inc/redlndlg.hxx|   46 -
 sw/source/uibase/inc/swmodalredlineacceptdlg.hxx |8 
 sw/source/uibase/lingu/hhcwrp.cxx|2 
 sw/source/uibase/misc/redlndlg.cxx   |  591 ++---
 sw/source/uibase/shells/textsh1.cxx  |8 
 sw/source/uibase/uiview/viewport.cxx |   14 
 sw/uiconfig/swriter/ui/managechangessidebar.ui   |   10 
 vcl/headless/svpgdi.cxx  |   14 
 vcl/source/app/salvtables.cxx|   85 +
 vcl/source/treelist/treelistbox.cxx  |3 
 vcl/unx/gtk3/gtk3gtkinst.cxx |  135 ++-
 57 files changed, 2424 insertions(+), 2154 deletions(-)

New commits:
commit 56dd851cfc77c362c3db5c0aae4a490c7f6782cc
Author: Caolán McNamara 
AuthorDate: Thu Apr 18 16:49:26 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Apr 27 12:41:14 2019 +0200

weld cluster of change tracking dialogs

Change-Id: I42ca7acb41699df91b91a9f59fc68cd30972a397
Reviewed-on: https://gerrit.libreoffice.org/70988
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 570109c6ddfb..940d8ebb564f 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -33,7 +33,7 @@
 
 // class SvxPostItDialog -
 
-SvxPostItDialog::SvxPostItDialog(weld::Window* pParent, const SfxItemSet& 
rCoreSet,
+SvxPostItDialog::SvxPostItDialog(weld::Widget* pParent, const SfxItemSet& 
rCoreSet,
 bool bPrevNext)
 : SfxDialogController(pParent, "cui/ui/comment.ui", "CommentDialog")
 , m_rSet(rCoreSet)
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 4669f431df56..11df8ce96030 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1315,9 +1315,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSfxDialog(weld::Wind
 return nullptr;
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateSvxPostItDialog( weld::Window* pParent,
-const 
SfxItemSet& rCoreSet,
-   

[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/svx include/vcl sc/inc sc/source sfx2/source svx/source vcl/source

2019-03-26 Thread Noel Grandin (via logerrit)
 cui/source/factory/dlgfact.cxx  |   11 ---
 cui/source/factory/dlgfact.hxx  |9 -
 include/sfx2/basedlgs.hxx   |4 
 include/sfx2/tabdlg.hxx |7 ---
 include/svx/dbaexchange.hxx |   21 -
 include/vcl/svlbitm.hxx |1 -
 include/vcl/treelistbox.hxx |1 -
 sc/inc/dociter.hxx  |2 +-
 sc/inc/segmenttree.hxx  |4 ++--
 sc/source/core/data/dociter.cxx |6 +++---
 sc/source/core/data/segmenttree.cxx |2 +-
 sc/source/filter/xml/xmlrowi.cxx|2 +-
 sc/source/ui/docshell/docsh.cxx |2 +-
 sfx2/source/dialog/basedlgs.cxx |   13 -
 sfx2/source/dialog/tabdlg.cxx   |   18 --
 svx/source/fmcomp/dbaexchange.cxx   |   29 -
 vcl/source/treelist/svlbitm.cxx |5 -
 17 files changed, 9 insertions(+), 128 deletions(-)

New commits:
commit 276c722b0c13d84756da8e06fb94f58810c8849a
Author: Noel Grandin 
AuthorDate: Mon Mar 25 16:49:38 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 26 07:30:35 2019 +0100

flatten TabRanges

no need to declare this separately, saves one pointer hop

Change-Id: I14fd82a9448c43ddfa0b6179a3b79cf6d364130d
Reviewed-on: https://gerrit.libreoffice.org/69687
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 77541cec1511..5bb957059b03 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -567,7 +567,7 @@ public:
 struct TabRanges
 {
 SCTAB mnTab;
-std::shared_ptr mpRanges;
+ScFlatBoolRowSegments maRanges;
 
 TabRanges(SCTAB nTab);
 };
diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index 8a7eb1ae0a8d..8414176d125d 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -56,11 +56,11 @@ public:
 class RangeIterator
 {
 public:
-explicit RangeIterator(ScFlatBoolRowSegments& rSegs);
+explicit RangeIterator(ScFlatBoolRowSegments const & rSegs);
 bool getFirst(RangeData& rRange);
 bool getNext(RangeData& rRange);
 private:
-ScFlatBoolRowSegments& mrSegs;
+ScFlatBoolRowSegments const & mrSegs;
 };
 
 ScFlatBoolRowSegments();
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 5031caa5666b..d9bb1c415b8e 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -2511,7 +2511,7 @@ const ScPatternAttr* ScDocAttrIterator::GetNext( SCCOL& 
rCol, SCROW& rRow1, SCRO
 }
 
 ScDocRowHeightUpdater::TabRanges::TabRanges(SCTAB nTab) :
-mnTab(nTab), mpRanges(new ScFlatBoolRowSegments)
+mnTab(nTab)
 {
 }
 
@@ -2537,7 +2537,7 @@ void ScDocRowHeightUpdater::update()
 continue;
 
 ScFlatBoolRowSegments::RangeData aData;
-ScFlatBoolRowSegments::RangeIterator aRangeItr(*rTabRanges.mpRanges);
+ScFlatBoolRowSegments::RangeIterator aRangeItr(rTabRanges.maRanges);
 for (bool bFound = aRangeItr.getFirst(aData); bFound; bFound = 
aRangeItr.getNext(aData))
 {
 if (!aData.mbValue)
@@ -2559,7 +2559,7 @@ void ScDocRowHeightUpdater::update()
 
 sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);
 ScFlatBoolRowSegments::RangeData aData;
-ScFlatBoolRowSegments::RangeIterator aRangeItr(*rTabRanges.mpRanges);
+ScFlatBoolRowSegments::RangeIterator aRangeItr(rTabRanges.maRanges);
 for (bool bFound = aRangeItr.getFirst(aData); bFound; bFound = 
aRangeItr.getNext(aData))
 {
 if (!aData.mbValue)
diff --git a/sc/source/core/data/segmenttree.cxx 
b/sc/source/core/data/segmenttree.cxx
index e7b35ea5dfd5..b47f1e7b9f3c 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -318,7 +318,7 @@ bool ScFlatBoolRowSegments::ForwardIterator::getValue(SCROW 
nPos, bool& rVal)
 return true;
 }
 
-ScFlatBoolRowSegments::RangeIterator::RangeIterator(ScFlatBoolRowSegments& 
rSegs) :
+ScFlatBoolRowSegments::RangeIterator::RangeIterator(ScFlatBoolRowSegments 
const & rSegs) :
 mrSegs(rSegs)
 {
 }
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index e2729da7c2c9..e0b6480a7fb3 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -210,7 +210,7 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 rRecalcRanges.emplace_back(0);
 }
 rRecalcRanges.at(nSheet).mnTab = nSheet;
-rRecalcRanges.at(nSheet).mpRanges->setTrue(nFirstRow, 
nCurrentRow);
+rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, 
nCurrentRow);
 }
 }
 }
diff --git a/sc/source/ui/docshell/docsh.cxx 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig solenv/sanitizers sw/inc sw/source sw/uiconfig

2019-03-02 Thread Libreoffice Gerrit user
 cui/source/customize/SvxToolbarConfigPage.cxx |9 
 cui/source/customize/cfg.cxx  |  277 +-
 cui/source/inc/cfg.hxx|   29 +-
 cui/uiconfig/ui/iconselectordialog.ui |   36 ++-
 solenv/sanitizers/ui/modules/swriter.suppr|4 
 sw/inc/swabstdlg.hxx  |2 
 sw/source/ui/dialog/abstract.cxx  |   21 -
 sw/source/ui/dialog/swdlgfact.cxx |   15 -
 sw/source/ui/dialog/swdlgfact.hxx |   10 
 sw/source/uibase/app/docsh2.cxx   |2 
 sw/source/uibase/inc/abstract.hxx |   11 -
 sw/uiconfig/swriter/ui/abstractdialog.ui  |   26 +-
 12 files changed, 195 insertions(+), 247 deletions(-)

New commits:
commit 91548e11b37f52aed476996d7d97ad2b45e43ed5
Author: Caolán McNamara 
AuthorDate: Fri Mar 1 17:22:49 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Mar 2 14:05:50 2019 +0100

weld SvxIconSelectorDialog

and use a ValueSet here instead of the odd toolbar use

Change-Id: Ic2e78664ebde31751055d2c9fec66c7dabe8d05f
Reviewed-on: https://gerrit.libreoffice.org/68598
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx 
b/cui/source/customize/SvxToolbarConfigPage.cxx
index 6775c37e4a86..56c9c85c6734 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -557,15 +557,14 @@ IMPL_LINK( SvxToolbarConfigPage, ModifyItemHdl, 
MenuButton *, pButton, void )
 // TODO: Add a GetSelectionPos() method to the SvTreeListBox class
 sal_uInt16 nSelectionPos = m_pContentsListBox->GetModel()->GetAbsPos( 
pActEntry );
 
-ScopedVclPtr pIconDialog(
-VclPtr::Create( nullptr,
+SvxIconSelectorDialog aIconDialog(GetDialogFrameWeld(),
 GetSaveInData()->GetImageManager(),
-GetSaveInData()->GetParentImageManager() ));
+GetSaveInData()->GetParentImageManager());
 
-if ( pIconDialog->Execute() == RET_OK )
+if (aIconDialog.run() == RET_OK)
 {
 css::uno::Reference< css::graphic::XGraphic > newgraphic =
-pIconDialog->GetSelectedIcon();
+aIconDialog.GetSelectedIcon();
 
 if ( newgraphic.is() )
 {
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index cb5b083dddc4..45301ee71b60 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2841,30 +2841,20 @@ SvxNewToolbarDialog::~SvxNewToolbarDialog()
 * The SvxIconSelectorDialog class
 *
 
***/
-SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
+SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
 const uno::Reference< css::ui::XImageManager >& rXImageManager,
-const uno::Reference< css::ui::XImageManager >& rXParentImageManager )
-:
-ModalDialog  ( pWindow, "IconSelector", 
"cui/ui/iconselectordialog.ui" ),
-m_nNextId( 0 ),
-m_xImageManager  ( rXImageManager ),
-m_xParentImageManager( rXParentImageManager )
-{
-get(pTbSymbol, "symbolsToolbar");
-get(pFtNote, "noteLabel");
-get(pBtnImport, "importButton");
-get(pBtnDelete, "deleteButton");
-
-Size aTbSize = pTbSymbol->LogicToPixel(Size(160, 80), 
MapMode(MapUnit::MapAppFont));
-pTbSymbol->set_width_request(aTbSize.Width());
-pTbSymbol->set_height_request(aTbSize.Height());
-pTbSymbol->SetStyle(pTbSymbol->GetStyle() | WB_SCROLL);
-pTbSymbol->SetLineSpacing(true);
-
+const uno::Reference< css::ui::XImageManager >& rXParentImageManager)
+: GenericDialogController(pWindow, "cui/ui/iconselectordialog.ui", 
"IconSelector")
+, m_xImageManager(rXImageManager)
+, m_xParentImageManager(rXParentImageManager)
+, m_xTbSymbol(new 
SvtValueSet(m_xBuilder->weld_scrolled_window("symbolswin")))
+, m_xTbSymbolWin(new weld::CustomWeld(*m_xBuilder, "symbolsToolbar", 
*m_xTbSymbol))
+, m_xFtNote(m_xBuilder->weld_label("noteLabel"))
+, m_xBtnImport(m_xBuilder->weld_button("importButton"))
+, m_xBtnDelete(m_xBuilder->weld_button("deleteButton"))
+{
 typedef std::unordered_map< OUString, bool > ImageInfo;
 
-pTbSymbol->SetPageScroll( true );
-
 m_nExpectedSize = 16;
 if (SvxConfigPageHelper::GetImageType() & css::ui::ImageType::SIZE_LARGE)
 m_nExpectedSize = 26;
@@ -2873,9 +2863,18 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( 
vcl::Window *pWindow,
 
 if ( m_nExpectedSize != 16 )
 {
-pFtNote->SetText( SvxConfigPageHelper::replaceSixteen( 
pFtNote->GetText(), m_nExpectedSize ) );
+
m_xFtNote->set_label(SvxConfigPageHelper::replaceSixteen(m_xFtNote->get_label(),
 m_nExpectedSize));
 }
 
+

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig extras/source include/vcl solenv/bin solenv/sanitizers vcl/source vcl/unx

2019-02-17 Thread Libreoffice Gerrit user
 cui/source/dialogs/hangulhanjadlg.cxx  |  267 ++---
 cui/source/inc/hangulhanjadlg.hxx  |   84 ---
 cui/uiconfig/ui/hangulhanjaeditdictdialog.ui   |  149 +++--
 extras/source/glade/libreoffice-catalog.xml.in |3 
 include/vcl/weld.hxx   |2 
 solenv/bin/native-code.py  |1 
 solenv/sanitizers/ui/cui.suppr |4 
 vcl/source/app/salvtables.cxx  |   63 +
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   12 +
 9 files changed, 305 insertions(+), 280 deletions(-)

New commits:
commit 1213cfde6b9052c1eb50b46d5cae2eef28d4b8b5
Author: Caolán McNamara 
AuthorDate: Sat Feb 16 20:19:12 2019 +
Commit: Caolán McNamara 
CommitDate: Sun Feb 17 16:46:13 2019 +0100

weld HangulHanjaEditDictDialog

Change-Id: If0d49a65735b66eaa8db11686099ed29b01711c4
Reviewed-on: https://gerrit.libreoffice.org/67929
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/hangulhanjadlg.cxx 
b/cui/source/dialogs/hangulhanjadlg.cxx
index 53d72894911e..46fa519c8f3f 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1063,8 +1063,8 @@ namespace svx
 DBG_ASSERT( pEntry, "+HangulHanjaEditDictDialog::EditDictHdl(): call 
of edit should not be possible with no selection!" );
 if( pEntry )
 {
-ScopedVclPtrInstance< HangulHanjaEditDictDialog > aEdDlg(this, 
m_aDictList, m_pDictsLB->GetSelectedEntryPos());
-aEdDlg->Execute();
+HangulHanjaEditDictDialog aEdDlg(GetFrameWeld(), m_aDictList, 
m_pDictsLB->GetSelectedEntryPos());
+aEdDlg.run();
 }
 }
 
@@ -1324,12 +1324,12 @@ namespace svx
 if( _bUp )
 {
 if( !m_pPrev )
-bRet = m_pScrollBar->GetThumbPos() > 
m_pScrollBar->GetRangeMin();
+bRet = m_pScrollBar->vadjustment_get_value() > 
m_pScrollBar->vadjustment_get_lower();
 }
 else
 {
 if( !m_pNext )
-bRet = m_pScrollBar->GetThumbPos() < ( 
m_pScrollBar->GetRangeMax() - 4 );
+bRet = m_pScrollBar->vadjustment_get_value() < ( 
m_pScrollBar->vadjustment_get_upper() - 4 );
 }
 
 return bRet;
@@ -1337,92 +1337,71 @@ namespace svx
 
 void SuggestionEdit::DoJump( bool _bUp )
 {
-const Link& rLoseFocusHdl = GetLoseFocusHdl();
-rLoseFocusHdl.Call( *this );
-m_pScrollBar->SetThumbPos( m_pScrollBar->GetThumbPos() + ( _bUp? -1 : 
1 ) );
-
-static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() 
)->UpdateScrollbar();
+m_pScrollBar->vadjustment_set_value( 
m_pScrollBar->vadjustment_get_value() + ( _bUp? -1 : 1 ) );
+m_pParent->UpdateScrollbar();
 }
 
-SuggestionEdit::SuggestionEdit( vcl::Window* pParent, WinBits nBits )
-: Edit(pParent, nBits)
+SuggestionEdit::SuggestionEdit(std::unique_ptr xEntry, 
HangulHanjaEditDictDialog* pParent)
+: m_pParent(pParent)
 , m_pPrev(nullptr)
 , m_pNext(nullptr)
 , m_pScrollBar(nullptr)
+, m_xEntry(std::move(xEntry))
 {
+m_xEntry->connect_key_press(LINK(this, SuggestionEdit, KeyInputHdl));
 }
 
-SuggestionEdit::~SuggestionEdit()
-{
-disposeOnce();
-}
-
-void SuggestionEdit::dispose()
-{
-m_pPrev.clear();
-m_pNext.clear();
-m_pScrollBar.clear();
-Edit::dispose();
-}
-
-bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt )
+IMPL_LINK(SuggestionEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
 {
 bool bHandled = false;
-if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
+
+const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
+sal_uInt16  nMod = rKeyCode.GetModifier();
+sal_uInt16  nCode = rKeyCode.GetCode();
+if( nCode == KEY_TAB && ( !nMod || KEY_SHIFT == nMod ) )
 {
-const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
-const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode();
-sal_uInt16  nMod = rKeyCode.GetModifier();
-sal_uInt16  nCode = rKeyCode.GetCode();
-if( nCode == KEY_TAB && ( !nMod || KEY_SHIFT == nMod ) )
+boolbUp = KEY_SHIFT == nMod;
+if( ShouldScroll( bUp ) )
 {
-boolbUp = KEY_SHIFT == nMod;
-if( ShouldScroll( bUp ) )
-{
-DoJump( bUp );
-SetSelection( Selection( 0, SELECTION_MAX ) );
-// Tab-travel doesn't really happen, so emulate it by 
setting a selection manually
-bHandled = true;
-}
+DoJump( bUp );
+m_xEntry->select_region(0, -1);
+

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig extras/source include/svx solenv/bin svx/source vcl/unx

2019-02-09 Thread Libreoffice Gerrit user
 cui/source/dialogs/srchxtra.cxx|   60 +--
 cui/source/factory/dlgfact.cxx |   11 
 cui/source/factory/dlgfact.hxx |4 
 cui/source/inc/optdict.hxx |   76 +---
 cui/source/inc/srchxtra.hxx|   22 -
 cui/source/options/optdict.cxx |  468 +++--
 cui/source/options/optlingu.cxx|2 
 cui/uiconfig/ui/editdictionarydialog.ui|  147 ++-
 cui/uiconfig/ui/searchattrdialog.ui|   63 +++
 extras/source/glade/libreoffice-catalog.xml.in |3 
 include/svx/svxdlg.hxx |5 
 solenv/bin/native-code.py  |1 
 svx/source/dialog/srchdlg.cxx  |2 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   21 +
 14 files changed, 483 insertions(+), 402 deletions(-)

New commits:
commit f50f0ae2fc9f0df7cc105cd075481172d33bc70a
Author: Caolán McNamara 
AuthorDate: Fri Feb 8 21:39:14 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 9 17:24:54 2019 +0100

weld SvxSearchAttributeDialog

Change-Id: Ib929afd143cd02b49f87ae6d910500354197e826
Reviewed-on: https://gerrit.libreoffice.org/67572
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index ecd2b1697d35..94ae52d9e0b4 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -102,20 +102,21 @@ void SvxSearchFormatDialog::PageCreated(const OString& 
rId, SfxTabPage& rPage)
 }
 }
 
-SvxSearchAttributeDialog::SvxSearchAttributeDialog(vcl::Window* pParent,
+SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent,
 SearchAttrItemList& rLst, const sal_uInt16* pWhRanges)
-: ModalDialog(pParent, "SearchAttrDialog", "cui/ui/searchattrdialog.ui")
+: GenericDialogController(pParent, "cui/ui/searchattrdialog.ui", 
"SearchAttrDialog")
 , rList(rLst)
+, m_xAttrLB(m_xBuilder->weld_tree_view("treeview"))
+, m_xOKBtn(m_xBuilder->weld_button("ok"))
 {
-get(m_pOKBtn, "ok");
-get(m_pAttrLB, "treeview");
-m_pAttrLB->set_height_request(m_pAttrLB->GetTextHeight() * 12);
-m_pAttrLB->set_width_request(m_pAttrLB->approximate_char_width() * 56);
+m_xAttrLB->set_size_request(m_xAttrLB->get_approximate_digit_width() * 50,
+m_xAttrLB->get_height_rows(12));
 
-m_pAttrLB->SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
-m_pAttrLB->GetModel()->SetSortMode( SortAscending );
+std::vector aWidths;
+aWidths.push_back(m_xAttrLB->get_approximate_digit_width() * 3 + 6);
+m_xAttrLB->set_column_fixed_widths(aWidths);
 
-m_pOKBtn->SetClickHdl( LINK( this, SvxSearchAttributeDialog, OKHdl ) );
+m_xOKBtn->connect_clicked(LINK( this, SvxSearchAttributeDialog, OKHdl));
 
 SfxObjectShell* pSh = SfxObjectShell::Current();
 DBG_ASSERT( pSh, "No DocShell" );
@@ -143,47 +144,38 @@ 
SvxSearchAttributeDialog::SvxSearchAttributeDialog(vcl::Window* pParent,
 
 // item resources are in svx
 sal_uInt32 nId  = SvxAttrNameTable::FindIndex(nSlot);
-SvTreeListEntry* pEntry = nullptr;
-if ( RESARRAY_INDEX_NOTFOUND != nId )
-pEntry = 
m_pAttrLB->SvTreeListBox::InsertEntry(SvxAttrNameTable::GetString(nId));
-else
-SAL_WARN( "cui.dialogs", "no resource for slot id " << 
static_cast(nSlot) );
-
-if ( pEntry )
+if (RESARRAY_INDEX_NOTFOUND != nId)
 {
-m_pAttrLB->SetCheckButtonState( pEntry, bChecked ? 
SvButtonState::Checked : SvButtonState::Unchecked );
-pEntry->SetUserData( reinterpret_cast(nSlot) );
+m_xAttrLB->insert(nullptr, -1, nullptr, nullptr, nullptr,
+  nullptr, nullptr, false);
+const int nRow = m_xAttrLB->n_children() - 1;
+m_xAttrLB->set_toggle(nRow, bChecked, 0);
+m_xAttrLB->set_text(nRow, SvxAttrNameTable::GetString(nId), 1);
+m_xAttrLB->set_id(nRow, OUString::number(nSlot));
 }
+else
+SAL_WARN( "cui.dialogs", "no resource for slot id " << 
static_cast(nSlot) );
 }
 nWhich = aIter.NextWhich();
 }
 
-m_pAttrLB->SetHighlightRange();
-m_pAttrLB->SelectEntryPos( 0 );
+m_xAttrLB->make_sorted();
+m_xAttrLB->select(0);
 }
 
 SvxSearchAttributeDialog::~SvxSearchAttributeDialog()
 {
-disposeOnce();
 }
 
-void SvxSearchAttributeDialog::dispose()
-{
-m_pAttrLB.clear();
-m_pOKBtn.clear();
-ModalDialog::dispose();
-}
-
-
-IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, Button*, void)
+IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void)
 {
 SearchAttrItem aInvalidItem;
 aInvalidItem.pItem = INVALID_POOL_ITEM;
 
-

[Libreoffice-commits] core.git: 2 commits - cui/source sw/source

2019-02-04 Thread Libreoffice Gerrit user
 cui/source/options/webconninfo.cxx |4 
 sw/source/ui/misc/glosbib.cxx  |   12 +++-
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 1b347e2688e87c79063f2492fdaea8cd824d6a5b
Author: Caolán McNamara 
AuthorDate: Mon Feb 4 16:58:08 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 4 22:00:38 2019 +0100

click handlers set twice

Change-Id: I2b44673330b952b0dc28a8cb321541ee9f944699
Reviewed-on: https://gerrit.libreoffice.org/67373
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/webconninfo.cxx 
b/cui/source/options/webconninfo.cxx
index 237ded056a45..18a2cd7fbca9 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -120,10 +120,6 @@ 
WebConnectionInfoDialog::WebConnectionInfoDialog(vcl::Window* pParent)
 
pPasswordsLBContainer->set_height_request(m_pPasswordsLB->GetTextHeight()*8);
 
 m_pPasswordsLB->SetHeaderBarClickHdl( LINK( this, WebConnectionInfoDialog, 
HeaderBarClickedHdl ) );
-m_pRemoveBtn->SetClickHdl( LINK( this, WebConnectionInfoDialog, 
RemovePasswordHdl ) );
-m_pRemoveAllBtn->SetClickHdl( LINK( this, WebConnectionInfoDialog, 
RemoveAllPasswordsHdl ) );
-m_pChangeBtn->SetClickHdl( LINK( this, WebConnectionInfoDialog, 
ChangePasswordHdl ) );
-
 
 FillPasswordList();
 
commit d166dc5a1a5962411026a362c3552ecc4660c1dd
Author: Matteo Casalin 
AuthorDate: Sun Jan 27 20:17:43 2019 +0100
Commit: Matteo Casalin 
CommitDate: Mon Feb 4 22:00:29 2019 +0100

Use indexed getToken()

Change-Id: I84b75dcc2e5b32fe456c1ecd1a8524d4fb25ebc7
Reviewed-on: https://gerrit.libreoffice.org/67312
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index d32df5c3e2d8..aa47f32c06d4 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -147,7 +147,8 @@ void SwGlossaryGroupDlg::Apply()
 
 for (const auto& removedStr : m_RemovedArr)
 {
-const OUString sDelGroup = removedStr.getToken(0, '\t');
+sal_Int32 nIdx{ 0 };
+const OUString sDelGroup = removedStr.getToken(0, '\t', nIdx);
 if( sDelGroup == aActGroup )
 {
 //when the current group is deleted, the current group has to be 
relocated
@@ -157,7 +158,7 @@ void SwGlossaryGroupDlg::Apply()
 pGlosHdl->SetCurGroup(pUserData->sGroupName);
 }
 }
-OUString sTitle( removedStr.getToken(1, '\t') );
+OUString sTitle( removedStr.getToken(0, '\t', nIdx) );
 const OUString sMsg(SwResId(STR_QUERY_DELETE_GROUP1)
 + sTitle
 + SwResId(STR_QUERY_DELETE_GROUP2));
@@ -172,9 +173,10 @@ void SwGlossaryGroupDlg::Apply()
 //don't rename before there was one
 for (auto it(m_RenamedArr.cbegin()); it != m_RenamedArr.cend(); ++it)
 {
-OUString const sOld(it->getToken(0, RENAME_TOKEN_DELIM));
-OUString sNew(it->getToken(1, RENAME_TOKEN_DELIM));
-OUString const sTitle(it->getToken(2, RENAME_TOKEN_DELIM));
+sal_Int32 nIdx{ 0 };
+OUString const sOld(it->getToken(0, RENAME_TOKEN_DELIM, nIdx));
+OUString sNew(it->getToken(0, RENAME_TOKEN_DELIM, nIdx));
+OUString const sTitle(it->getToken(0, RENAME_TOKEN_DELIM, nIdx));
 pGlosHdl->RenameGroup(sOld, sNew, sTitle);
 if (it == m_RenamedArr.begin())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig extensions/source extensions/uiconfig include/vcl vcl/unx

2019-02-04 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx|  139 --
 cui/source/options/personalization.hxx|   37 +-
 cui/uiconfig/ui/select_persona_dialog.ui  |8 
 extensions/source/propctrlr/formcomponenthandler.cxx  |7 
 extensions/source/propctrlr/selectlabeldialog.cxx |  185 ++
 extensions/source/propctrlr/selectlabeldialog.hxx |   46 +--
 extensions/uiconfig/spropctrlr/ui/labelselectiondialog.ui |   64 
 include/vcl/weld.hxx  |   14 -
 vcl/unx/gtk3/gtk3gtkinst.cxx  |2 
 9 files changed, 259 insertions(+), 243 deletions(-)

New commits:
commit f69b5dd07a910dd48e087664e31642af50b5fb9a
Author: Caolán McNamara 
AuthorDate: Mon Feb 4 15:23:27 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 4 20:46:00 2019 +0100

weld OSelectLabelDialog

Change-Id: Icbf9f05e69667cb8161942dde84ded6b3fc61138
Reviewed-on: https://gerrit.libreoffice.org/67367
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index 99ef87995ebc..7dfa51afabcf 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2855,11 +2855,12 @@ namespace pcr
 
 bool FormComponentPropertyHandler::impl_dialogChooseLabelControl_nothrow( 
Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
 {
-ScopedVclPtrInstance< OSelectLabelDialog > dlgSelectLabel( 
impl_getDefaultDialogParent_nothrow(), m_xComponent );
+vcl::Window* pParent = impl_getDefaultDialogParent_nothrow();
+OSelectLabelDialog dlgSelectLabel(pParent ? pParent->GetFrameWeld() : 
nullptr, m_xComponent);
 _rClearBeforeDialog.clear();
-bool bSuccess = ( RET_OK == dlgSelectLabel->Execute() );
+bool bSuccess = (RET_OK == dlgSelectLabel.run());
 if ( bSuccess )
-_out_rNewValue <<= dlgSelectLabel->GetSelected();
+_out_rNewValue <<= dlgSelectLabel.GetSelected();
 return bSuccess;
 }
 
diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx 
b/extensions/source/propctrlr/selectlabeldialog.cxx
index 5ec3a91d15e7..c1a356abf187 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -48,32 +48,20 @@ namespace pcr
 
 
 // OSelectLabelDialog
-
-
-OSelectLabelDialog::OSelectLabelDialog( vcl::Window* pParent, Reference< 
XPropertySet > const & _xControlModel )
-:ModalDialog(pParent, "LabelSelectionDialog", 
"modules/spropctrlr/ui/labelselectiondialog.ui")
-,m_xControlModel(_xControlModel)
-,m_pInitialSelection(nullptr)
-,m_pLastSelected(nullptr)
-,m_bHaveAssignableControl(false)
+OSelectLabelDialog::OSelectLabelDialog(weld::Window* pParent, Reference< 
XPropertySet > const & _xControlModel)
+: GenericDialogController(pParent, 
"modules/spropctrlr/ui/labelselectiondialog.ui", "LabelSelectionDialog")
+, m_xControlModel(_xControlModel)
+, m_bLastSelected(false)
+, m_bHaveAssignableControl(false)
+, m_xMainDesc(m_xBuilder->weld_label("label"))
+, m_xControlTree(m_xBuilder->weld_tree_view("control"))
+, m_xNoAssignment(m_xBuilder->weld_check_button("noassignment"))
 {
-get(m_pMainDesc, "label");
-get(m_pControlTree, "control");
-get(m_pNoAssignment, "noassignment");
-
-// initialize the TreeListBox
-m_pControlTree->SetSelectionMode( SelectionMode::Single );
-m_pControlTree->SetDragDropMode( DragDropMode::NONE );
-m_pControlTree->EnableInplaceEditing( false );
-m_pControlTree->SetStyle(m_pControlTree->GetStyle() | WB_BORDER | 
WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT | 
WB_HSCROLL);
-
-m_pControlTree->SetNodeBitmaps(Image(StockImage::Yes, 
RID_EXTBMP_COLLAPSEDNODE),
-   Image(StockImage::Yes, 
RID_EXTBMP_EXPANDEDNODE));
-m_pControlTree->SetSelectHdl(LINK(this, OSelectLabelDialog, 
OnEntrySelected));
-m_pControlTree->SetDeselectHdl(LINK(this, OSelectLabelDialog, 
OnEntrySelected));
+m_xControlTree->connect_changed(LINK(this, OSelectLabelDialog, 
OnEntrySelected));
+m_xControlTree->set_size_request(-1, 
m_xControlTree->get_height_rows(8));
 
 // fill the description
-OUString sDescription = m_pMainDesc->GetText();
+OUString sDescription = m_xMainDesc->get_label();
 sal_Int16 nClassID = FormComponentType::CONTROL;
 if (::comphelper::hasProperty(PROPERTY_CLASSID, m_xControlModel))
 nClassID = 
::comphelper::getINT16(m_xControlModel->getPropertyValue(PROPERTY_CLASSID));
@@ -82,7 +70,7 @@ 

[Libreoffice-commits] core.git: 2 commits - cui/source stoc/source

2019-01-31 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx|2 +-
 stoc/source/inspect/introspection.cxx |   14 ++
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 5617d1e577bdb9a94b1aa062fb9474cb00a69c6b
Author: Stephan Bergmann 
AuthorDate: Thu Jan 31 10:48:02 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Jan 31 12:31:37 2019 +0100

weld::TreeView::get_selected_index returns int

With Clang -fsanitize=implicit-signed-integer-truncation during
UITest_calc_tests3:

> cui/source/tabpages/numfmt.cxx:1714:31: runtime error: implicit 
conversion from type 'int' of value -1 (32-bit, signed) to type 'sal_uInt16' 
(aka 'unsigned short') changed the value to 65535
>  #0 in SvxNumberFormatTabPage::SetCategory(unsigned short) at 
cui/source/tabpages/numfmt.cxx:1714:31
>  #1 in SvxNumberFormatTabPage::Reset(SfxItemSet const*) at 
cui/source/tabpages/numfmt.cxx:531:9
>  #2 in SfxTabDialogController::CreatePages() at 
sfx2/source/dialog/tabdlg.cxx:1964:32
>  #3 in SfxTabDialogController::Start_Impl() at 
sfx2/source/dialog/tabdlg.cxx:2038:5
>  #4 in 
SfxTabDialogController::runAsync(std::shared_ptr 
const&, std::function const&) at 
sfx2/source/dialog/tabdlg.cxx:2077:18
>  #5 in 
ScAbstractTabController_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext&)
 at sc/source/ui/attrdlg/scdlgfact.cxx:699:12
>  #6 in VclAbstractDialog::StartExecuteAsync(std::function 
const&) at include/vcl/abstdlg.hxx:73:16
>  #7 in ScTabViewShell::ExecuteCellFormatDlg(SfxRequest&, rtl::OString 
const&) at sc/source/ui/view/tabvwsha.cxx:550:11
>  #8 in ScCellShell::Execute(SfxRequest&) at 
sc/source/ui/view/cellsh3.cxx:359:36
>  #9 in SfxStubScCellShellExecute(SfxShell*, SfxRequest&) at 
workdir/SdiTarget/sc/sdi/scslots.hxx:7275:1
>  #10 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) 
at include/sfx2/shell.hxx:207:35
>  #11 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, 
bool) at sfx2/source/control/dispatch.cxx:355:20
>  #12 in SfxDispatcher::PostMsgHandler(std::unique_ptr >) at sfx2/source/control/dispatch.cxx:1092:17
>  #13 in void std::__invoke_impl 
>), SfxDispatcher*&, std::unique_ptr > >(std::__invoke_memfun_deref, void 
(SfxDispatcher::*&)(std::unique_ptr 
>), SfxDispatcher*&, std::unique_ptr >&&) at 
lib/gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/bits/invoke.h:73:14
>  #14 in std::__invoke_result 
>), SfxDispatcher*&, std::unique_ptr > >::type std::__invoke 
>), SfxDispatcher*&, std::unique_ptr > >(void 
(SfxDispatcher::*&)(std::unique_ptr 
>), SfxDispatcher*&, std::unique_ptr >&&) at 
lib/gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/bits/invoke.h:95:14
>  #15 in void std::_Bind))(std::unique_ptr >)>::__call >&&, 0ul, 
1ul>(std::tuple 
>&&>&&, std::_Index_tuple<0ul, 1ul>) at 
lib/gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/functional:400:11
>  #16 in void std::_Bind))(std::unique_ptr >)>::operator() >, void>(std::unique_ptr >&&) at 
lib/gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/functional:482:17
>  #17 in std::_Function_handler >), std::_Bind))(std::unique_ptr >)> >::_M_invoke(std::_Any_data const&, 
std::unique_ptr >&&) at 
lib/gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/bits/std_function.h:300:2
>  #18 in std::function >)>::operator()(std::unique_ptr >) const at 
lib/gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/bits/std_function.h:690:14
>  #19 in SfxHintPoster::DoEvent_Impl(void*) at 
sfx2/source/notify/hintpost.cxx:46:9
>  #20 in SfxHintPoster::LinkStubDoEvent_Impl(void*, void*) at 
sfx2/source/notify/hintpost.cxx:43:1
>  #21 in Link::Call(void*) const at 
include/tools/link.hxx:84:45
>  #22 in ImplHandleUserEvent(ImplSVEvent*) at 
vcl/source/window/winproc.cxx:1932:30
>  #23 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at 
vcl/source/window/winproc.cxx:2485:13
>  #24 in SalFrame::CallCallback(SalEvent, void const*) const at 
vcl/inc/salframe.hxx:285:29
>  #25 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at 
vcl/headless/svpinst.cxx:284:22
>  #26 in non-virtual thunk to 
SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at 
vcl/headless/svpinst.cxx
>  #27 in SalUserEventList::DispatchUserEvents(bool) at 
vcl/source/app/salusereventlist.cxx:110:17
>  #28 in SvpSalInstance::DoYield(bool, bool) at 
vcl/headless/svpinst.cxx:423:19
>  #29 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:441:48
>  #30 in Application::Yield() at vcl/source/app/svapp.cxx:505:5
>  #31 in Application::Execute() at vcl/source/app/svapp.cxx:422:9
>  #32 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1621:17

Change-Id: I5b6aba4c4b832cea4209e3adc1c079e3fdd34924
Reviewed-on: https://gerrit.libreoffice.org/67194
Tested-by: Jenkins
Reviewed-by: Stephan 

[Libreoffice-commits] core.git: 2 commits - cui/source

2018-12-18 Thread Libreoffice Gerrit user
 cui/source/dialogs/hangulhanjadlg.cxx |   68 +-
 cui/source/options/optupdt.cxx|1 
 2 files changed, 19 insertions(+), 50 deletions(-)

New commits:
commit c7fa3b1da45f1af95962f504f36695b656f38f4b
Author: Noel Grandin 
AuthorDate: Tue Dec 18 17:11:16 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 19 07:05:42 2018 +0100

don't delete out param from GetOutputString

we don't own this memory, belongs to svl module

Change-Id: Ief12408e4254ab3fc2069a8490ecf062a728b3d3
Reviewed-on: https://gerrit.libreoffice.org/65349
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index a42f9050220a..281250a8bf6b 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -152,7 +152,6 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
 nFormat = pNumberFormatter->GetStandardFormat( SvNumFormatType::TIME, 
eUILang );
 pNumberFormatter->GetOutputString( aTime.GetTimeInDays(), nFormat, 
aTimeStr,  );
 
-delete pColor;
 delete pNumberFormatter;
 
 aText = m_aLastCheckedTemplate;
commit 06942d373560cd84246df03a404cebfba4f7d28f
Author: Noel Grandin 
AuthorDate: Tue Dec 18 17:03:46 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 19 07:05:27 2018 +0100

simplify HangulHanjaEditDictDialog::m_vElements

no need to store a ref-counted thing like OUString using the heap

Change-Id: I372417f1a60d120e867f4f4b3b9335b73693accb
Reviewed-on: https://gerrit.libreoffice.org/65348
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/dialogs/hangulhanjadlg.cxx 
b/cui/source/dialogs/hangulhanjadlg.cxx
index f22866b0bea3..18338fa0f79c 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1222,7 +1222,7 @@ namespace svx
 {
 private:
 protected:
-std::vector m_vElements;
+std::vector m_vElements;
 sal_uInt16  m_nNumOfEntries;
 // index of the internal iterator, used for First() and Next() methods
 sal_uInt16  m_nAct;
@@ -1233,8 +1233,8 @@ namespace svx
 ~SuggestionList();
 
 voidSet( const OUString& _rElement, sal_uInt16 
_nNumOfElement );
-boolReset( sal_uInt16 _nNumOfElement );
-const OUString* Get( sal_uInt16 _nNumOfElement ) const;
+voidReset( sal_uInt16 _nNumOfElement );
+const OUString &Get( sal_uInt16 _nNumOfElement ) const;
 voidClear();
 
 const OUString* First();
@@ -1244,7 +1244,7 @@ namespace svx
 };
 
 SuggestionList::SuggestionList() :
-m_vElements(MAXNUM_SUGGESTIONS, static_cast(nullptr))
+m_vElements(MAXNUM_SUGGESTIONS)
 {
 m_nAct = m_nNumOfEntries = 0;
 }
@@ -1256,40 +1256,19 @@ namespace svx
 
 void SuggestionList::Set( const OUString& _rElement, sal_uInt16 
_nNumOfElement )
 {
-boolbRet = _nNumOfElement < m_vElements.size();
-if( bRet )
-{
-if( m_vElements[_nNumOfElement] != nullptr )
-*(m_vElements[_nNumOfElement]) = _rElement;
-else
-{
-m_vElements[_nNumOfElement] = new OUString( _rElement );
-++m_nNumOfEntries;
-}
-}
+m_vElements[_nNumOfElement] = _rElement;
+++m_nNumOfEntries;
 }
 
-bool SuggestionList::Reset( sal_uInt16 _nNumOfElement )
+void SuggestionList::Reset( sal_uInt16 _nNumOfElement )
 {
-boolbRet = _nNumOfElement < m_vElements.size();
-if( bRet )
-{
-if( m_vElements[_nNumOfElement] != nullptr )
-{
-delete m_vElements[_nNumOfElement];
-m_vElements[_nNumOfElement] = nullptr;
---m_nNumOfEntries;
-}
-}
-
-return bRet;
+m_vElements[_nNumOfElement].clear();
+--m_nNumOfEntries;
 }
 
-const OUString* SuggestionList::Get( sal_uInt16 _nNumOfElement ) const
+const OUString& SuggestionList::Get( sal_uInt16 _nNumOfElement ) const
 {
-if( _nNumOfElement < m_vElements.size())
-return m_vElements[_nNumOfElement];
-return nullptr;
+return m_vElements[_nNumOfElement];
 }
 
 void SuggestionList::Clear()
@@ -1297,29 +1276,22 @@ namespace svx
 if( m_nNumOfEntries )
 {
 for (auto & vElement : m_vElements)
-{
-if( vElement != nullptr )
-{
-delete vElement;
-vElement = nullptr;
-}
-}
-
+vElement.clear();
 m_nNumOfEntries = m_nAct = 0;
 }
 }
 
 const OUString* SuggestionList::Next_()
 {
-  

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig include/vcl vcl/source

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/inc/autocdlg.hxx|9 +--
 cui/source/tabpages/autocdlg.cxx   |   94 +++--
 cui/uiconfig/ui/acoroptionspage.ui |   58 --
 include/vcl/floatwin.hxx   |   10 ---
 vcl/source/window/floatwin.cxx |8 +--
 vcl/source/window/winproc.cxx  |   14 ++---
 6 files changed, 120 insertions(+), 73 deletions(-)

New commits:
commit a89e8c54e8aa95e7f59f204cc3396e2acbdd860a
Author: Noel Grandin 
AuthorDate: Mon Dec 3 21:13:14 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 4 09:54:24 2018 +0100

remove enum HitTest

since we only care about one of the values, we can just use a bool

Change-Id: Id4fd0c60cd7421861b2e605604b7d3ecbf8bf915
Reviewed-on: https://gerrit.libreoffice.org/64485
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index aa6c6c0b3130..10b45c8e5fb4 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -72,14 +72,6 @@ enum class FloatWinTitleType
 NONE = 4,
 };
 
-enum HitTest
-{
-HITTEST_OUTSIDE,
-HITTEST_WINDOW,
-HITTEST_RECT
-};
-
-
 class VCL_DLLPUBLIC FloatingWindow : public SystemWindow
 {
 class   ImplData;
@@ -116,7 +108,7 @@ protected:
 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
 
 public:
-SAL_DLLPRIVATE FloatingWindow*  ImplFloatHitTest( vcl::Window* pReference, 
const Point& rPos, HitTest& rHitTest );
+SAL_DLLPRIVATE FloatingWindow*  ImplFloatHitTest( vcl::Window* pReference, 
const Point& rPos, bool& rbHitTestInsideRect );
 SAL_DLLPRIVATE FloatingWindow*  ImplFindLastLevelFloat();
 SAL_DLLPRIVATE bool ImplIsFloatPopupModeWindow( const 
vcl::Window* pWindow );
 SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = true; }
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 91482016b557..e632f97696b3 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -507,9 +507,10 @@ tools::Rectangle 
FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, co
 return aFloatRect;
 }
 
-FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, 
const Point& rPos, HitTest& rHitTest )
+FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, 
const Point& rPos, bool& rbHitTestInsideRect )
 {
 FloatingWindow* pWin = this;
+rbHitTestInsideRect = false;
 
 Point aAbsolute(FloatingWindow::ImplConvertToAbsPos(pReference, rPos));
 
@@ -524,7 +525,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( 
vcl::Window* pReference, const
 tools::Rectangle devRect( 
pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( 
Point(), pBorderWin->GetSizePixel()) ) ) ;
 if ( devRect.IsInside( aAbsolute ) )
 {
-rHitTest = HITTEST_WINDOW;
+// inside the window
 return pWin;
 }
 
@@ -534,7 +535,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( 
vcl::Window* pReference, const
 //   is already in absolute device coordinates
 if ( pWin->maFloatRect.IsInside( aAbsolute ) )
 {
-rHitTest = HITTEST_RECT;
+rbHitTestInsideRect = true;
 return pWin;
 }
 
@@ -542,7 +543,6 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( 
vcl::Window* pReference, const
 }
 while ( pWin );
 
-rHitTest = HITTEST_OUTSIDE;
 return nullptr;
 }
 
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index add5c3b45957..a4cce43051c7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -75,8 +75,8 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, 
const Point& rMousePo
  *  #93895# since floats are system windows, coordinates have
  *  to be converted to float relative for the hittest
  */
-HitTest nHitTest = HITTEST_OUTSIDE;
-FloatingWindow* pFloat = 
pSVData->maWinData.mpFirstFloat->ImplFloatHitTest( pChild, rMousePos, nHitTest 
);
+boolbHitTestInsideRect = false;
+FloatingWindow* pFloat = 
pSVData->maWinData.mpFirstFloat->ImplFloatHitTest( pChild, rMousePos, 
bHitTestInsideRect );
 FloatingWindow* pLastLevelFloat;
 FloatWinPopupFlags nPopupFlags;
 if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE )
@@ -84,7 +84,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, 
const Point& rMousePo
 if ( bMouseLeave )
 return true;
 
-if ( !pFloat || (nHitTest == HITTEST_RECT) )
+if ( !pFloat || bHitTestInsideRect )
 {
 if ( pSVData->maHelpData.mpHelpWin && 
!pSVData->maHelpData.mbKeyboardHelp )
 ImplDestroyHelpWindow( true );
@@ -104,7 +104,7 @@ static bool ImplHandleMouseFloatMode( 

[Libreoffice-commits] core.git: 2 commits - cui/source include/vcl sfx2/source vcl/source

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/options/fontsubs.cxx   |6 +++---
 cui/source/options/optfltr.cxx|6 +++---
 cui/source/tabpages/autocdlg.cxx  |6 +++---
 include/vcl/event.hxx |3 +--
 include/vcl/svtabbx.hxx   |3 +--
 include/vcl/treelistbox.hxx   |   11 ---
 sfx2/source/sidebar/SidebarController.cxx |2 --
 vcl/source/treelist/svtabbx.cxx   |4 ++--
 vcl/source/treelist/treelistbox.cxx   |3 +--
 9 files changed, 18 insertions(+), 26 deletions(-)

New commits:
commit a5784b7fd63cee073d85b669f745f7f6271ab040
Author: Noel Grandin 
AuthorDate: Mon Dec 3 20:45:41 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 4 09:54:07 2018 +0100

remove unused SvLBoxTabFlags enum values

Change-Id: Id7cccd1eb60e9a16bac6d98aa2d8c75f6218f1be
Reviewed-on: https://gerrit.libreoffice.org/64482
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index a0f14caa0973..d95fb1cc3e20 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -433,15 +433,15 @@ void SvxFontSubstCheckListBox::Resize()
 void SvxFontSubstCheckListBox::SetTabs()
 {
 SvSimpleTable::SetTabs();
-SvLBoxTabFlags nAdjust = 
SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::ADJUST_NUMERIC|SvLBoxTabFlags::FORCE;
+SvLBoxTabFlags nAdjust = 
SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 
 SvLBoxTab* pTab = aTabs[1].get();
 pTab->nFlags &= ~nAdjust;
-pTab->nFlags |= 
SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
+pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 
 pTab = aTabs[2].get();
 pTab->nFlags &= ~nAdjust;
-pTab->nFlags |= 
SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
+pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 }
 
 voidSvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt )
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 611af717eae9..3c48b0132211 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -364,19 +364,19 @@ SvTreeListEntry* OfaMSFilterTabPage2::GetEntry4Type( 
sal_IntPtr _nType ) const
 void OfaMSFilterTabPage2::MSFltrSimpleTable::SetTabs()
 {
 SvSimpleTable::SetTabs();
-SvLBoxTabFlags nAdjust = 
SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::ADJUST_NUMERIC|SvLBoxTabFlags::FORCE;
+SvLBoxTabFlags nAdjust = 
SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 
 if( aTabs.size() > 1 )
 {
 SvLBoxTab* pTab = aTabs[1].get();
 pTab->nFlags &= ~nAdjust;
-pTab->nFlags |= 
SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
+pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 }
 if( aTabs.size() > 2 )
 {
 SvLBoxTab* pTab = aTabs[2].get();
 pTab->nFlags &= ~nAdjust;
-pTab->nFlags |= 
SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
+pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 }
 }
 
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 8dea15bcc137..1af32103593a 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -661,19 +661,19 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, 
weld::Button&, void)
 void OfaACorrCheckListBox::SetTabs()
 {
 SvSimpleTable::SetTabs();
-SvLBoxTabFlags nAdjust = 
SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::ADJUST_NUMERIC|SvLBoxTabFlags::FORCE;
+SvLBoxTabFlags nAdjust = 
SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 
 if( aTabs.size() > 1 )
 {
 SvLBoxTab* pTab = aTabs[1].get();
 pTab->nFlags &= ~nAdjust;
-pTab->nFlags |= 
SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
+pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 }
 if( aTabs.size() > 2 )
 {
 SvLBoxTab* pTab = aTabs[2].get();
 pTab->nFlags &= ~nAdjust;
-pTab->nFlags |= 
SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
+pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
 }
 }
 
diff --git a/include/vcl/svtabbx.hxx b/include/vcl/svtabbx.hxx
index 8eebb84ce8af..8fa72066dc1b 100644
--- a/include/vcl/svtabbx.hxx
+++ b/include/vcl/svtabbx.hxx
@@ -30,8 +30,7 @@ enum class SvTabJustify
 {
 AdjustRight = 

[Libreoffice-commits] core.git: 2 commits - cui/source dbaccess/source editeng/source framework/source sd/source starmath/source svx/source sw/source tools/source

2018-12-02 Thread Libreoffice Gerrit user
 cui/source/dialogs/SpellDialog.cxx |2 +-
 dbaccess/source/ui/tabledesign/TableController.cxx |   12 +++-
 editeng/source/misc/splwrap.cxx|4 ++--
 framework/source/services/substitutepathvars.cxx   |2 +-
 sd/source/core/stlfamily.cxx   |2 +-
 starmath/source/symbol.cxx |2 +-
 svx/source/dialog/svxbmpnumvalueset.cxx|4 ++--
 svx/source/svdraw/svdedtv.cxx  |2 +-
 svx/source/svdraw/svdedxv.cxx  |8 +---
 svx/source/svdraw/svdmrkv.cxx  |1 -
 svx/source/svdraw/svdograf.cxx |2 +-
 svx/source/svdraw/svdomeas.cxx |2 +-
 svx/source/table/svdotable.cxx |   20 
 svx/source/table/tablecontroller.cxx   |4 ++--
 sw/source/core/doc/swserv.cxx  |2 +-
 sw/source/core/docnode/swbaslnk.cxx|7 ++-
 sw/source/core/layout/tabfrm.cxx   |8 
 sw/source/filter/html/swhtml.cxx   |9 -
 sw/source/uibase/dochdl/swdtflvr.cxx   |2 +-
 tools/source/stream/stream.cxx |3 ---
 20 files changed, 41 insertions(+), 57 deletions(-)

New commits:
commit eddee22b0eed069c3ee2929c9b36a9b4fb05f130
Author: Mike Kaganski 
AuthorDate: Sun Dec 2 20:46:02 2018 +0300
Commit: Mike Kaganski 
CommitDate: Mon Dec 3 01:20:21 2018 +0100

tdf#120703 PVS: V560 A part of conditional expression is always true/false

Change-Id: Id7af9a6eaefc8b49a790eb299620c4fa97067a11
Reviewed-on: https://gerrit.libreoffice.org/64429
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 42c6721b3ec8..f1bc5f8ae708 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1838,7 +1838,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 ++aCursor.GetIndex();
 }
 
-if(nTextLen && aBreakPositions.empty())
+if (aBreakPositions.empty())
 {
 //if all content has been overwritten the attributes may have been 
removed, too
 svx::SpellPortion aPortion1;
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 1a4e8568351b..33328dda8d37 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -159,8 +159,8 @@ SvxSpellWrapper::SvxSpellWrapper( vcl::Window* pWn,
 bOtherCntnt ( bOther ),
 bHyphen ( false ),
 bReverse( false ),
-bStartDone  ( bOther || ( !bReverse && bStart ) ),
-bEndDone( bReverse && bStart && !bOther ),
+bStartDone  ( bOther || bStart ),
+bEndDone( false ),
 bStartChk   ( bOther ),
 bRevAllowed ( false ),
 bAllRight   ( true )
diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index afa83643b87a..13dc84760517 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -345,7 +345,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( 
const OUString& rText
 // Is there something to replace ?
 bool bWorkRetrieved   = false;
 bool bWorkDirURLRetrieved = false;
-while ( !bSubstitutionCompleted && nDepth < nMaxRecursiveDepth )
+while (nDepth < nMaxRecursiveDepth)
 {
 while ( ( nPosition != -1 ) && ( nLength > 3 ) ) // "$(" ")"
 {
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 54680db5d510..62eab7b25e43 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -148,7 +148,7 @@ SdStyleSheet* SdStyleFamily::GetSheetByName( const 
OUString& rName )
 {
 // we assume that we have only SdStyleSheets
 SdStyleSheet* pSdStyle = static_cast< SdStyleSheet* >( pStyle 
);
-if( pSdStyle && pSdStyle->GetApiName() == rName)
+if (pSdStyle->GetApiName() == rName)
 {
 pRet = pSdStyle;
 break;
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx 
b/svx/source/dialog/svxbmpnumvalueset.cxx
index 5b6df74f9c68..017bc1dfb853 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -259,7 +259,7 @@ void  SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt 
)
 sal_Int32 nLevelCount = xLevel->getCount();
 if(nLevelCount > 5)
 nLevelCount = 5;
-for( sal_Int32 i = 0; i < nLevelCount && i < 5; i++)
+for( sal_Int32 i = 0; i < nLevelCount; i++)
 {
 long nTop = nStartY + nRectHeight * (aLinesArr[2 * i + 

[Libreoffice-commits] core.git: 2 commits - cui/source extensions/source include/vcl sc/inc sc/source sc/uiconfig sd/source sw/source vcl/headless vcl/source vcl/unx

2018-12-02 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx |2 
 cui/source/dialogs/showcols.cxx  |2 
 cui/source/tabpages/numpages.cxx |4 
 extensions/source/propctrlr/listselectiondlg.cxx |2 
 include/vcl/BitmapTools.hxx  |5 
 include/vcl/seleng.hxx   |4 
 include/vcl/vclenum.hxx  |2 
 include/vcl/weld.hxx |2 
 sc/inc/strings.hrc   |3 
 sc/source/ui/docshell/docsh4.cxx |   11 -
 sc/source/ui/inc/sharedocdlg.hxx |   22 +--
 sc/source/ui/miscdlgs/instbdlg.cxx   |2 
 sc/source/ui/miscdlgs/linkarea.cxx   |2 
 sc/source/ui/miscdlgs/sharedocdlg.cxx|  115 ++---
 sc/source/ui/miscdlgs/shtabdlg.cxx   |2 
 sc/uiconfig/scalc/ui/sharedocumentdlg.ui |  151 +--
 sd/source/ui/dlg/custsdlg.cxx|2 
 sw/source/ui/misc/num.cxx|4 
 vcl/headless/svpgdi.cxx  |   53 
 vcl/source/app/salvtables.cxx|4 
 vcl/source/bitmap/BitmapTools.cxx|  123 --
 vcl/unx/gtk3/gtk3gtkinst.cxx |   25 +++
 22 files changed, 252 insertions(+), 290 deletions(-)

New commits:
commit 48d1df74036386ce19cfabd64d90afcd1532d5c9
Author: Caolán McNamara 
AuthorDate: Sat Dec 1 19:41:15 2018 +
Commit: Caolán McNamara 
CommitDate: Sun Dec 2 11:10:45 2018 +0100

use same [un]premultiply

Change-Id: Idd1ca1243b64a9ec606382a0895e11376a2ec186
Reviewed-on: https://gerrit.libreoffice.org/64406
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 6a8f6c8b9605..ff431783ad24 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -28,6 +28,11 @@ namespace com { namespace sun { namespace star { namespace 
geometry { struct Int
 namespace vcl {
 namespace bitmap {
 
+typedef sal_uInt8 (*lookup_table)[256];
+
+lookup_table VCL_DLLPUBLIC get_premultiply_table();
+lookup_table VCL_DLLPUBLIC get_unpremultiply_table();
+
 /**
  * Intended to be used to feed into CreateFromData to create a BitmapEx. RGB 
data format.
  */
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index ec01ec520a86..c936b0e1cbbe 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -29,6 +29,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1639,50 +1640,6 @@ void SvpSalGraphics::drawBitmap( const SalTwoRect& rTR,
 drawAlphaBitmap(rTR, rSourceBitmap, rTransparentBitmap);
 }
 
-static sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a)
-{
-return (a == 0) ? 0 : (c * 255 + a / 2) / a;
-}
-
-static sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a)
-{
-return (c * a + 127) / 255;
-}
-
-typedef sal_uInt8 (*lookup_table)[256];
-
-static lookup_table get_unpremultiply_table()
-{
-static bool inited;
-static sal_uInt8 unpremultiply_table[256][256];
-
-if (!inited)
-{
-for (int a = 0; a < 256; ++a)
-for (int c = 0; c < 256; ++c)
-unpremultiply_table[a][c] = unpremultiply(c, a);
-inited = true;
-}
-
-return unpremultiply_table;
-}
-
-static lookup_table get_premultiply_table()
-{
-static bool inited;
-static sal_uInt8 premultiply_table[256][256];
-
-if (!inited)
-{
-for (int a = 0; a < 256; ++a)
-for (int c = 0; c < 256; ++c)
-premultiply_table[a][c] = premultiply(c, a);
-inited = true;
-}
-
-return premultiply_table;
-}
-
 void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
const SalBitmap& rSalBitmap,
Color nMaskColor )
@@ -1697,7 +1654,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
 }
 sal_Int32 nStride;
 unsigned char *mask_data = aSurface.getBits(nStride);
-lookup_table unpremultiply_table = get_unpremultiply_table();
+vcl::bitmap::lookup_table unpremultiply_table = 
vcl::bitmap::get_unpremultiply_table();
 for (long y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
 {
 unsigned char *row = mask_data + (nStride*y);
@@ -1805,7 +1762,7 @@ Color SvpSalGraphics::getPixel( long nX, long nY )
 cairo_destroy(cr);
 
 cairo_surface_flush(target);
-lookup_table unpremultiply_table = get_unpremultiply_table();
+vcl::bitmap::lookup_table unpremultiply_table = 
vcl::bitmap::get_unpremultiply_table();
 unsigned char *data = cairo_image_surface_get_data(target);
 sal_uInt8 a = data[SVP_CAIRO_ALPHA];
 sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
@@ -2139,8 +2096,8 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, 
bool bXorModeAllowed, 

[Libreoffice-commits] core.git: 2 commits - cui/source sfx2/source svx/source sw/Module_sw.mk sw/source vcl/source

2018-11-03 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx  |   11 -
 cui/source/options/treeopt.cxx|2 +
 sfx2/source/dialog/dinfdlg.cxx|   17 ++
 svx/source/gallery2/galctrl.cxx   |3 ++
 sw/Module_sw.mk   |2 -
 sw/source/ui/dialog/swdlgfact.cxx |   40 ++
 sw/source/ui/fldui/fldedt.cxx |4 +++
 sw/source/ui/fldui/fldtdlg.cxx|   11 +
 sw/source/uibase/dialog/swabstdlg.cxx |5 
 sw/source/uibase/shells/basesh.cxx|4 +++
 vcl/source/window/abstdlg.cxx |4 ---
 11 files changed, 88 insertions(+), 15 deletions(-)

New commits:
commit 8f0e74ed6d363c6eee6874872742721ef8ae4a36
Author: Tor Lillqvist 
AuthorDate: Fri Nov 2 23:06:26 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:31:22 2018 +0100

Handle the case if no digital signature code is implemented (iOS, currently)

Change-Id: I1cf37fccdd3a58d50a015b3fc32c32fba89f2f09
Reviewed-on: https://gerrit.libreoffice.org/62795
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1a503ca264f3..a22ebdc6087c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -869,13 +869,20 @@ void SfxDocumentPage::ImplUpdateSignatures()
 SfxMedium* pMedium = pDoc->GetMedium();
 if ( pMedium && !pMedium->GetName().isEmpty() && 
pMedium->GetStorage().is() )
 {
-Reference< security::XDocumentDigitalSignatures > xD(
-
security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext())
 );
-
+Reference< security::XDocumentDigitalSignatures > xD;
+try
+{
+xD = 
security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext());
+}
+catch ( const css::uno::DeploymentException& )
+{
+}
 OUString s;
 Sequence< security::DocumentSignatureInformation > aInfos;
-aInfos = xD->verifyDocumentContentSignatures( 
pMedium->GetZipStorageToSign_Impl(),
-uno::Reference< 
io::XInputStream >() );
+
+if ( xD.is() )
+aInfos = xD->verifyDocumentContentSignatures( 
pMedium->GetZipStorageToSign_Impl(),
+  uno::Reference< 
io::XInputStream >() );
 if ( aInfos.getLength() > 1 )
 s = m_aMultiSignedStr;
 else if ( aInfos.getLength() == 1 )
commit 1c39485653d97e26aa3d5b51bf2fd0a1f4e14f0c
Author: Tor Lillqvist 
AuthorDate: Fri Nov 2 22:58:16 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:31:08 2018 +0100

Start of work in progress on making dialogs work in the iOS app

Build the swui library for non-DESKTOP platforms, too. Handle fallout
for !HAVE_FEATURE_DBCONNECTIVITY and !HAVE_FEATURE_AVMEDIA (both of
which features we for now don't want to bother with in the iOS app).

Make VclAbstractDialogFactory::Create() do its thing also on
non-DESKTOP.

This commit just causes more code to be compiled for the non-DESKTOP
case, dialogs in general surely don't actually work yet in the iOS
app. For instance:

vcl/source/window/builder.cxx:2060: probably need to implement 
sfxlo-CustomPropertiesControl or add a makesfxlo-CustomPropertiesControl 
function

Change-Id: I579efba605f519dcbf407b675be88c7c6ee0f19b
Reviewed-on: https://gerrit.libreoffice.org/62794
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 3bb5d6154677..c6cdada72e37 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 
 #include 
@@ -810,6 +812,7 @@ void TPGalleryThemeProperties::FillFilterList()
 }
 }
 
+#if HAVE_FEATURE_AVMEDIA
 // media filters
 static const char aWildcard[] = "*.";
 ::avmedia::FilterNameVector aFilters;
@@ -839,6 +842,9 @@ void TPGalleryThemeProperties::FillFilterList()
 }
 }
 }
+#else
+(void) nFirstExtFilterPos;
+#endif
 
 // 'All' filters
 OUString aExtensions;
@@ -863,6 +869,7 @@ void TPGalleryThemeProperties::FillFilterList()
 }
 }
 
+#if HAVE_FEATURE_AVMEDIA
 // media filters
 for(std::pair & aFilter : aFilters)
 {
@@ -873,6 +880,7 @@ void TPGalleryThemeProperties::FillFilterList()
 aExtensions += aWildcard + aFilter.second.getToken( 0, ';', nIndex 
);
 }
  }
+#endif
 
 #if defined(_WIN32)
 if (aExtensions.getLength() > 240)
@@ -1007,13 +1015,14 @@ void TPGalleryThemeProperties::DoPreview()
   

[Libreoffice-commits] core.git: 2 commits - cui/source include/svx svx/source

2018-09-30 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabarea.hxx |   16 
 include/svx/dlgctrl.hxx   |   28 +--
 svx/source/dialog/dlgctrl.cxx |   75 +++---
 3 files changed, 17 insertions(+), 102 deletions(-)

New commits:
commit b878bd3fe9cdc2ad0180b05892b7feeaa06b9c8d
Author: Caolán McNamara 
AuthorDate: Sat Sep 29 11:58:10 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Sep 30 16:14:36 2018 +0200

rename XRectPreview back to SvxXRectPreview

Change-Id: I5d684a651c075104cfb2f2bd73303a2e7f5a7fdd
Reviewed-on: https://gerrit.libreoffice.org/61138
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 88232baaf86e..31932eba7c55 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -148,8 +148,8 @@ class SvxTransparenceTabPage : public SfxTabPage
 XFillAttrSetItemaXFillAttr;
 SfxItemSet& rXFSet;
 
-XRectPreview m_aCtlBitmapPreview;
-XRectPreview m_aCtlXRectPreview;
+SvxXRectPreview m_aCtlBitmapPreview;
+SvxXRectPreview m_aCtlXRectPreview;
 
 // main selection
 std::unique_ptr m_xRbtTransOff;
@@ -367,7 +367,7 @@ private:
 XFillAttrSetItemm_aXFillAttr;
 SfxItemSet& m_rXFSet;
 
-XRectPreview m_aCtlPreview;
+SvxXRectPreview m_aCtlPreview;
 std::unique_ptr m_xLbGradientType;
 std::unique_ptr m_xFtCenter;
 std::unique_ptr m_xMtrCenterX;
@@ -448,7 +448,7 @@ private:
 
 MapUnit m_ePoolUnit;
 
-XRectPreview m_aCtlPreview;
+SvxXRectPreview m_aCtlPreview;
 std::unique_ptr m_xMtrDistance;
 std::unique_ptr m_xMtrAngle;
 std::unique_ptr m_xSliderAngle;
@@ -529,7 +529,7 @@ private:
 Size   rFilledSize;
 Size   rZoomedSize;
 
-XRectPreview m_aCtlBitmapPreview;
+SvxXRectPreview m_aCtlBitmapPreview;
 std::unique_ptr   m_xBitmapLB;
 std::unique_ptr m_xBitmapStyleLB;
 std::unique_ptr m_xSizeBox;
@@ -599,7 +599,7 @@ private:
 XFillAttrSetItemm_aXFillAttr;
 SfxItemSet& m_rXFSet;
 
-XRectPreview m_aCtlPreview;
+SvxXRectPreview m_aCtlPreview;
 std::unique_ptr m_xCtlPixel;
 std::unique_ptr m_xLbColor;
 std::unique_ptr m_xLbBackgroundColor;
@@ -676,8 +676,8 @@ private:
 css::uno::Reference< css::uno::XComponentContext > m_context;
 
 PaletteManager maPaletteManager;
-XRectPreview m_aCtlPreviewOld;
-XRectPreview m_aCtlPreviewNew;
+SvxXRectPreview m_aCtlPreviewOld;
+SvxXRectPreview m_aCtlPreviewNew;
 std::unique_ptr m_xValSetColorList;
 std::unique_ptr m_xValSetRecentList;
 std::unique_ptr m_xSelectPalette;
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index a6a1910956ab..90c4fc6e8f6d 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -398,15 +398,15 @@ public:
 virtual Size GetOptimalSize() const override;
 };
 
-class SAL_WARN_UNUSED SVX_DLLPUBLIC XRectPreview : public PreviewBase
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXRectPreview : public PreviewBase
 {
 private:
 SdrObject* mpRectangleObject;
 
 public:
-XRectPreview();
+SvxXRectPreview();
 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
-virtual ~XRectPreview() override;
+virtual ~SvxXRectPreview() override;
 
 void SetAttributes(const SfxItemSet& rItemSet);
 
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 4850967c52fd..0750a5355853 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1626,7 +1626,7 @@ void PreviewBase::StyleUpdated()
 CustomWidgetController::StyleUpdated();
 }
 
-XRectPreview::XRectPreview()
+SvxXRectPreview::SvxXRectPreview()
 : mpRectangleObject(nullptr)
 {
 }
@@ -1637,7 +1637,7 @@ tools::Rectangle PreviewBase::GetPreviewSize() const
 return aObjectSize;
 }
 
-void XRectPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
+void SvxXRectPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
 PreviewBase::SetDrawingArea(pDrawingArea);
 InitSettings();
@@ -1646,7 +1646,7 @@ void XRectPreview::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 mpRectangleObject = new SdrRectObj(getModel(), GetPreviewSize());
 }
 
-void XRectPreview::Resize()
+void SvxXRectPreview::Resize()
 {
 SdrObject *pOrigObject = mpRectangleObject;
 if (pOrigObject)
@@ -1658,18 +1658,18 @@ void XRectPreview::Resize()
 PreviewBase::Resize();
 }
 
-XRectPreview::~XRectPreview()
+SvxXRectPreview::~SvxXRectPreview()
 {
 SdrObject::Free(mpRectangleObject);
 }
 
-void XRectPreview::SetAttributes(const SfxItemSet& rItemSet)
+void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet)
 {
 mpRectangleObject->SetMergedItemSet(rItemSet, true);
 mpRectangleObject->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE));
 }
 

[Libreoffice-commits] core.git: 2 commits - cui/source extras/source include/svx svx/source

2018-09-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigrfflt.cxx|5 
 cui/source/inc/backgrnd.hxx |2 
 cui/source/inc/cuigrfflt.hxx|4 
 cui/source/inc/cuitabarea.hxx   |2 
 cui/source/inc/measure.hxx  |2 
 cui/source/inc/textattr.hxx |2 
 cui/source/inc/transfrm.hxx |8 -
 cui/source/tabpages/backgrnd.cxx|2 
 extras/source/glade/libreoffice-catalog.xml.in  |3 
 include/svx/dlgctrl.hxx |   14 -
 svx/source/accessibility/svxrectctaccessiblecontext.cxx |  122 
 svx/source/dialog/dlgctrl.cxx   |   70 -
 svx/source/inc/svxrectctaccessiblecontext.hxx   |   20 +-
 13 files changed, 126 insertions(+), 130 deletions(-)

New commits:
commit 8f4a399c7a6e7337d9be358a0611006b8fac6e40
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 15:07:23 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 17:20:54 2018 +0200

drop unused cuilo-BackgroundPreview from catalog

Change-Id: Ib8707b29c44291fe18d86660d9bfaaed742afbd6
Reviewed-on: https://gerrit.libreoffice.org/60716
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 3a4be0511258..0182cba12e5e 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -218,9 +218,6 @@
 
-
 
commit 94da3afddd21ee1ca437132466995eb59a6bc05b
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 15:00:10 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 17:20:42 2018 +0200

rename RectCtl back to SvxRectCtl

Change-Id: I4adde35b198d45fed09d837de5c1370d2a879f4b
Reviewed-on: https://gerrit.libreoffice.org/60715
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 4850bd6927ca..9bc7dcf55cbf 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -396,12 +396,11 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const 
Graphic& rGraphic, double
 return aRet;
 }
 
-
 void EmbossControl::MouseButtonDown( const MouseEvent& rEvt )
 {
 const RectPoint eOldRP = GetActualRP();
 
-RectCtl::MouseButtonDown( rEvt );
+SvxRectCtl::MouseButtonDown( rEvt );
 
 if( GetActualRP() != eOldRP )
 maModifyHdl.Call( nullptr );
@@ -409,7 +408,7 @@ void EmbossControl::MouseButtonDown( const MouseEvent& rEvt 
)
 
 void EmbossControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
-RectCtl::SetDrawingArea(pDrawingArea);
+SvxRectCtl::SetDrawingArea(pDrawingArea);
 Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(77, 60), 
MapMode(MapUnit::MapAppFont)));
 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
 }
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index ebd62b0e8057..374409cb8a6f 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -92,7 +92,7 @@ private:
 std::unique_ptr pTableBck_Impl;///< Items for 
Sw-Table must be corrected
 std::unique_ptr pHighlighting;
 
-std::unique_ptr m_xWndPosition;
+std::unique_ptr m_xWndPosition;
 std::unique_ptr m_xBackgroundColorSet;
 std::unique_ptr m_xPreview1;
 std::unique_ptr m_xPreview2;
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index ae5169d4b8cc..b2e1c3d59ad4 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -158,7 +158,7 @@ public:
 virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double 
fScaleX, double fScaleY ) override;
 };
 
-class EmbossControl : public RectCtl
+class EmbossControl : public SvxRectCtl
 {
 private:
 Link maModifyHdl;
@@ -166,7 +166,7 @@ private:
 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
 public:
 EmbossControl()
-: RectCtl(nullptr)
+: SvxRectCtl(nullptr)
 {
 }
 
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index c9d1a99bbc52..20f207aa9bb0 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -317,7 +317,7 @@ private:
 SfxItemSet& m_rXFSet;
 MapUnit m_ePoolUnit;
 
-RectCtl m_aCtlPosition;
+SvxRectCtl m_aCtlPosition;
 SvxXShadowPreview  m_aCtlXRectPreview;
 std::unique_ptr m_xTsbShowShadow;
 std::unique_ptr m_xGridShadow;
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index a9af5c54ba7d..728814315783 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -40,7 +40,7 @@ private:
 
 bool

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig include/vcl sd/inc sd/qa sd/source sd/uiconfig solenv/sanitizers

2018-09-17 Thread Libreoffice Gerrit user
 cui/source/inc/backgrnd.hxx|   84 +++--
 cui/source/tabpages/backgrnd.cxx   |  484 +++--
 cui/uiconfig/ui/backgroundpage.ui  |  138 ++---
 include/vcl/customweld.hxx |1 
 sd/inc/sdabstdlg.hxx   |2 
 sd/qa/unit/dialogs-test.cxx|   18 -
 sd/source/ui/dlg/dlgchar.cxx   |   29 -
 sd/source/ui/dlg/sddlgfact.cxx |4 
 sd/source/ui/dlg/sddlgfact.hxx |2 
 sd/source/ui/func/fuchar.cxx   |2 
 sd/source/ui/inc/dlg_char.hxx  |   12 
 sd/uiconfig/sdraw/ui/drawchardialog.ui |  128 +++-
 solenv/sanitizers/ui/cui.suppr |1 
 13 files changed, 505 insertions(+), 400 deletions(-)

New commits:
commit 88582ebee383c63c3fba588924f36ff7655af9c1
Author: Caolán McNamara 
AuthorDate: Mon Sep 17 11:45:19 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 17 18:12:14 2018 +0200

weld SdCharDlg

Change-Id: If0c072c0a0a1548034dca37258f72294536ec566
Reviewed-on: https://gerrit.libreoffice.org/60578
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index f9c364c3a428..e8b1ed936ce1 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -170,7 +170,7 @@ public:
 virtual VclPtr  CreateBreakDlg(weld::Window* 
pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong 
nSumActionCount, sal_uLong nObjCount ) = 0;
 virtual VclPtrCreateCopyDlg(vcl::Window* 
pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0;
 virtual VclPtr
CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0;
-virtual VclPtr   
CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, 
SfxObjectShell* pDocShell) = 0;
+virtual VclPtr   
CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, 
SfxObjectShell* pDocShell) = 0;
 virtual VclPtr   
CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, 
SfxObjectShell* pDocShell, bool bAreaPage) = 0;
 virtual VclPtr   
CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, 
const SfxItemSet& rSet) = 0;
 virtual VclPtr  
CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, 
::sd::View* pView) = 0;
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 1fe44cc04243..0988949f415d 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -305,10 +305,8 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
 CPPUNIT_ASSERT(pDrawDoc);
 
-auto const parent = getViewShell()->GetActiveWindow();
 pRetval = getSdAbstractDialogFactory()->CreateSdCustomShowDlg(
-parent == nullptr ? nullptr : parent->GetFrameWeld(),
-*pDrawDoc);
+getViewShell()->GetFrameWeld(), *pDrawDoc);
 break;
 }
 case 4:
@@ -317,7 +315,7 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 // needs an SfxItemSet, use an empty constructed one
 // needs a 'SfxObjectShell* pDocShell', crashes without
 pRetval = getSdAbstractDialogFactory()->CreateSdTabCharDialog(
-getViewShell()->GetActiveWindow(),
+getViewShell()->GetFrameWeld(),
 (),
 getDocShell());
 break;
@@ -327,9 +325,8 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 // CreateSdTabPageDialog(const SfxItemSet* pAttr, SfxObjectShell* 
pDocShell, bool bAreaPage = true) override;
 // needs a special SfxItemSet with merged content from page and 
other stuff, crashes without that (2nd page)
 // needs a 'SfxObjectShell* pDocShell', crashes without. Also 
sufficient: FillStyleItemSet with XFILL_NONE set
-auto const parent = getViewShell()->GetActiveWindow();
 pRetval = getSdAbstractDialogFactory()->CreateSdTabPageDialog(
-parent == nullptr ? nullptr : parent->GetFrameWeld(),
+getViewShell()->GetFrameWeld(),
 (),
 getDocShell(),
 true);
@@ -338,9 +335,8 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 case 6:
 {
 // CreateSdModifyFieldDlg(weld::Window* pWindow, const 
SvxFieldData* pInField, const SfxItemSet& rSet) override;
-auto const parent = getViewShell()->GetActiveWindow();
 pRetval = getSdAbstractDialogFactory()->CreateSdModifyFieldDlg(
-parent == nullptr ? nullptr : parent->GetFrameWeld(),
+getViewShell()->GetFrameWeld(),
 nullptr,
 getEmptySfxItemSet());
 break;
@@ -353,9 +349,8 @@ VclPtr 

[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig include/svx include/vcl svx/source

2018-09-10 Thread Libreoffice Gerrit user
 cui/source/inc/numpages.hxx |   24 +-
 cui/source/tabpages/numpages.cxx|   83 +++-
 cui/uiconfig/ui/pickbulletpage.ui   |   25 ++
 cui/uiconfig/ui/picknumberingpage.ui|   22 +-
 include/svx/numvset.hxx |   38 +++
 include/vcl/customweld.hxx  |1 
 svx/source/dialog/svxbmpnumvalueset.cxx |  330 
 7 files changed, 463 insertions(+), 60 deletions(-)

New commits:
commit a27ae800fed5a974c9b255f7ce2b38ec2dbaa426
Author: Caolán McNamara 
AuthorDate: Mon Sep 10 13:51:08 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 10 18:20:55 2018 +0200

weld SvxSingleNumPickTabPage

Change-Id: I6d8cf1d63b30472072e2d464c3ba6f173f4d030f
Reviewed-on: https://gerrit.libreoffice.org/60264
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 2d22a18b8076..bef652167040 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -88,7 +88,6 @@ class SvxSingleNumPickTabPage final : public SfxTabPage
 using TabPage::ActivatePage;
 using TabPage::DeactivatePage;
 
-VclPtr  m_pExamplesVS;
 SvxNumSettingsArr_Impl  aNumSettingsArr;
 std::unique_ptr pActNum;
 std::unique_ptr pSaveNum;
@@ -98,12 +97,14 @@ class SvxSingleNumPickTabPage final : public SfxTabPage
 
 sal_uInt16  nNumItemId;
 
-DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
-DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
+std::unique_ptr m_xExamplesVS;
+std::unique_ptr m_xExamplesVSWin;
+
+DECL_LINK(NumSelectHdl_Impl, SvtValueSet*, void);
+DECL_LINK(DoubleClickHdl_Impl, SvtValueSet*, void);
 
 public:
-SvxSingleNumPickTabPage(vcl::Window* pParent,
-   const SfxItemSet& rSet);
+SvxSingleNumPickTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 virtual ~SvxSingleNumPickTabPage() override;
 virtual void dispose() override;
 
@@ -116,7 +117,6 @@ public:
 virtual voidReset( const SfxItemSet* rSet ) override;
 };
 
-
 class SvxBulletPickTabPage final : public SfxTabPage
 {
 using TabPage::ActivatePage;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index aa40c183bc51..f8a411f9ff4f 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -170,19 +170,19 @@ static const vcl::Font& lcl_GetDefaultBulletFont()
 return aDefBulletFont;
 }
 
-SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(vcl::Window* pParent,
-   const SfxItemSet& rSet)
-: SfxTabPage(pParent, "PickNumberingPage", "cui/ui/picknumberingpage.ui", 
)
+SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/picknumberingpage.ui", "PickNumberingPage", 
)
 , nActNumLvl(SAL_MAX_UINT16)
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
+, m_xExamplesVS(new NumValueSet)
+, m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
-get(m_pExamplesVS, "valueset");
-m_pExamplesVS->init(NumberingPageType::SINGLENUM);
-m_pExamplesVS->SetSelectHdl(LINK(this, SvxSingleNumPickTabPage, 
NumSelectHdl_Impl));
-m_pExamplesVS->SetDoubleClickHdl(LINK(this, SvxSingleNumPickTabPage, 
DoubleClickHdl_Impl));
+m_xExamplesVS->init(NumberingPageType::SINGLENUM);
+m_xExamplesVS->SetSelectHdl(LINK(this, SvxSingleNumPickTabPage, 
NumSelectHdl_Impl));
+m_xExamplesVS->SetDoubleClickHdl(LINK(this, SvxSingleNumPickTabPage, 
DoubleClickHdl_Impl));
 
 Reference xDefNum = 
SvxNumOptionsTabPageHelper::GetNumberingProvider();
 if(xDefNum.is())
@@ -208,7 +208,7 @@ 
SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(vcl::Window* pParent,
 {
 }
 Reference xFormat(xDefNum, UNO_QUERY);
-m_pExamplesVS->SetNumberingSettings(aNumberings, xFormat, rLocale);
+m_xExamplesVS->SetNumberingSettings(aNumberings, xFormat, rLocale);
 }
 }
 
@@ -219,16 +219,15 @@ SvxSingleNumPickTabPage::~SvxSingleNumPickTabPage()
 
 void SvxSingleNumPickTabPage::dispose()
 {
-pActNum.reset();
-pSaveNum.reset();
-m_pExamplesVS.clear();
+m_xExamplesVSWin.reset();
+m_xExamplesVS.reset();
 SfxTabPage::dispose();
 }
 
-VclPtr SvxSingleNumPickTabPage::Create( TabPageParent pParent,
-const SfxItemSet* rAttrSet)
+VclPtr SvxSingleNumPickTabPage::Create(TabPageParent pParent,
+   const SfxItemSet* rAttrSet)
 {
-return VclPtr::Create(pParent.pParent, *rAttrSet);
+return VclPtr::Create(pParent, *rAttrSet);
 }
 
 bool  SvxSingleNumPickTabPage::FillItemSet( SfxItemSet* rSet )
@@ -263,13 +262,13 @@ void  

  1   2   3   >