[Libreoffice-commits] core.git: librelogo/source sw/qa
librelogo/source/LibreLogo/LibreLogo.py |3 + sw/qa/uitest/librelogo/compile.py | 94 2 files changed, 97 insertions(+) New commits: commit 1b341e578083b492c620bd468e20f28f2039bfd8 Author: László Németh AuthorDate: Thu Oct 25 17:14:09 2018 +0200 Commit: László Németh CommitDate: Fri Oct 26 07:48:57 2018 +0200 LibreLogo: add unit tests for program compilation from LibreLogo to Python Change-Id: I39df100a13efe3573b33cb856701cbeb0d95954d Reviewed-on: https://gerrit.libreoffice.org/62364 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index 0dc5d7ea2ed7..8834baf8e640 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -1735,6 +1735,9 @@ def __compil__(s): __loadlang__(_.lng, __l12n__(_.lng)) except: __trace__() +# for testing compiling, we create a not document based namespace +if "_" not in locals(): +_ = lambda: None _.lng = 'en_US' if not _.lng in __comp__: __loadlang__(_.lng, __l12n__(_.lng)) diff --git a/sw/qa/uitest/librelogo/compile.py b/sw/qa/uitest/librelogo/compile.py new file mode 100644 index ..59d5586e74be --- /dev/null +++ b/sw/qa/uitest/librelogo/compile.py @@ -0,0 +1,94 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# 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/. + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text + +import time, re +from uitest.debug import sleep +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import select_pos + +class LibreLogoCompileTest(UITestCase): + LIBRELOGO_PATH = "vnd.sun.star.script:LibreLogo|LibreLogo.py$%s?language=Python&location=share" + LS = "#_@L_i_N_e@_#" # LibreLogo line separator for debug feature "jump to the bad LibreLogo program line" + + def createMasterScriptProviderFactory(self): + xServiceManager = self.xContext.ServiceManager + return xServiceManager.createInstanceWithContext( + "com.sun.star.script.provider.MasterScriptProviderFactory", + self.xContext) + + def getScript(self, command): + xMasterScriptProviderFactory = self.createMasterScriptProviderFactory() + document = self.ui_test.get_component() + xScriptProvider = xMasterScriptProviderFactory.createScriptProvider(document) + xScript = xScriptProvider.getScript(self.LIBRELOGO_PATH %command) + self.assertIsNotNone(xScript, "xScript was not loaded") + return xScript + + def test_compile_librelogo(self): +# XScript interface to LibreLogo Python compiler +xCompile = self.getScript("__compil__") + +for test in ( +# BASE COMMANDS +("FORWARD 1 forward 1 fd 1", "forward(1)\nforward(1)\nforward(1)"), +("BACK 1 back 1 bk 1", "backward(1)\nbackward(1)\nbackward(1)"), +("RIGHT 1 right 1 rt 1", "turnright(1)\nturnright(1)\nturnright(1)"), +("LEFT 1 left 1 lt 1", "turnleft(1)\nturnleft(1)\nturnleft(1)"), +# COMMENTS +("fd 1; comment\n; full-line comment", "forward(1)\n" + self.LS), +# MULTI-LINE COMMAND +("LABEL ~\n10 + 10", "label(10 + 10)\n" + self.LS), +# UNIT SPECIFIERS +# check specifier "pt" (point) +("fd 1pt", "forward(1)"), +# check specifier "pt" (point) +("fd 0.5pt", "forward(0.5)"), +# check "in" (inch) +("fd 1in", "forward(72.0)"), +# check "cm" (centimeter) +("fd 1cm", "forward(%s)" % (1/(2.54/72))), +# check "mm" (millimeter) +("fd 10mm", "forward(%s)" % (1/(2.54/72))), +# angle +("rt 90°", "turnright(90)"), +# clock-position +("rt 3h", "turnright(90.0)"), +# CONDITION +("if a = 1 [ ]", "if a == 1 :\n __checkhalt__()"), +# with else +("if a == 1 [ ] [ ]", "if a == 1 :\n __checkhalt__()\nelse:\n __checkhalt__()"), +# LOOPS +("repeat 10 [ ]", "for REPCOUNT in range(1, 1+int(10 )):\n __checkhalt__()"), +# endless loop +("repeat [ ]", "REPCOUNT0 = 1\nwhile True:\n __checkhalt__()\n REPCOUNT = REPCOUNT0\n REPCOUNT0 += 1"), +# loop in loop +("repeat 10 [ repeat REPCOUNT [ a=1 ] ]", "for REPCOU
[Libreoffice-commits] core.git: dbaccess/source qadevOOo/tests
dbaccess/source/core/api/FilteredContainer.cxx |2 +- qadevOOo/tests/java/ifc/text/_XTextSection.java |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 9f93ab871eb068574448b99569f89893b5c1ebdb Author: Andrea Gelmini AuthorDate: Fri Oct 26 00:28:32 2018 +0200 Commit: Julien Nabet CommitDate: Fri Oct 26 07:36:38 2018 +0200 Fix typos Change-Id: I537871602282f85f2947f91f9b579b0e8cf12fe8 Reviewed-on: https://gerrit.libreoffice.org/62378 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 1e75ea7d747b..b3b3f82d74ef 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -46,7 +46,7 @@ namespace dbaccess using namespace ::cppu; using namespace ::connectivity::sdbcx; -/** creates a vector of WildCards and reduce the _rTableFilter of the length of WildsCards +/** creates a vector of WildCards and reduce the _rTableFilter of the length of WildCards */ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::vector< WildCard >& _rOut) { diff --git a/qadevOOo/tests/java/ifc/text/_XTextSection.java b/qadevOOo/tests/java/ifc/text/_XTextSection.java index 3094aa7c11ed..9aeb70c14142 100644 --- a/qadevOOo/tests/java/ifc/text/_XTextSection.java +++ b/qadevOOo/tests/java/ifc/text/_XTextSection.java @@ -39,7 +39,7 @@ public class _XTextSection extends MultiMethodTest { /** * Test calls the method. - * Has OK status if the method returns non zero legth array. + * Has OK status if the method returns non zero length array. */ public void _getChildSections(){ boolean bResult = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/cctrl/actctrl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bb74df3f1e9feca233cec19e9ade86cd9dbcf195 Author: Jim Raykowski AuthorDate: Wed Oct 24 16:34:05 2018 -0800 Commit: Jim Raykowski CommitDate: Fri Oct 26 07:13:31 2018 +0200 tdf#120888 Use event notify result Change-Id: Ic85f7182b66f9f5c31b612e5a93299496e874fc0 Reviewed-on: https://gerrit.libreoffice.org/62381 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index 71eb393d1d2d..c1e4da12e912 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -49,7 +49,7 @@ bool NumEditAction::EventNotify( NotifyEvent& rNEvt ) } } if(!bHandled) -NumericField::EventNotify(rNEvt); +bHandled = NumericField::EventNotify(rNEvt); return bHandled; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/inc/interpre.hxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 28cc9746a9639ac14d3f6816b7fbf59cacbb42f4 Author: Eike Rathke AuthorDate: Thu Oct 25 22:48:03 2018 +0200 Commit: Eike Rathke CommitDate: Fri Oct 26 01:27:00 2018 +0200 Change kScInterpreterMaxStrLen now result string length limit to 256MB This is arbitrary. Change-Id: I88875e674464984c174e27fa6038080cc7366ecf Reviewed-on: https://gerrit.libreoffice.org/62375 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 85f96435ba9a..c7bcfb9a7d91 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -91,7 +91,8 @@ class SharedStringPool; } -constexpr sal_Int32 kScInterpreterMaxStrLen = SAL_MAX_UINT16; +/// Arbitrary 256MB result string length limit. +constexpr sal_Int32 kScInterpreterMaxStrLen = SAL_MAX_INT32 / 8; #define MAXSTACK (4096 / sizeof(formula::FormulaToken*)) @@ -1102,7 +1103,7 @@ inline sal_Int32 ScInterpreter::GetStringPositionArgument() inline bool ScInterpreter::CheckStringResultLen( OUString& rResult, const OUString& rAdd ) { -if ( rResult.getLength() + rAdd.getLength() > kScInterpreterMaxStrLen ) +if (rAdd.getLength() > kScInterpreterMaxStrLen - rResult.getLength()) { SetError( FormulaError::StringOverflow ); rResult.clear(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/inc/interpre.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 9e5d7dff301ccef35429ee5cb7e3b3b80b318993 Author: Eike Rathke AuthorDate: Thu Oct 25 22:43:43 2018 +0200 Commit: Eike Rathke CommitDate: Fri Oct 26 01:26:39 2018 +0200 Use SAL_MAX_INT32 in CheckStringPositionArgument() ... as that does not affect the result string length. Change-Id: Ia4426b845b3966da6a8c46089d8a98a38cb0 Reviewed-on: https://gerrit.libreoffice.org/62374 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index f63cdced71b9..85f96435ba9a 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -1081,9 +1081,9 @@ inline bool ScInterpreter::CheckStringPositionArgument( double & fVal ) fVal = 0.0; return false; } -else if (fVal > kScInterpreterMaxStrLen) +else if (fVal > SAL_MAX_INT32) { -fVal = static_cast(kScInterpreterMaxStrLen); +fVal = static_cast(SAL_MAX_INT32); return false; } return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/inc/interpre.hxx |8 +--- sc/source/core/tool/interpr1.cxx |2 +- 2 files changed, 6 insertions(+), 4 deletions(-) New commits: commit adbff0473751cde45e24bc06d524e858c68cc423 Author: Eike Rathke AuthorDate: Thu Oct 25 22:31:57 2018 +0200 Commit: Eike Rathke CommitDate: Fri Oct 26 01:26:09 2018 +0200 Introduce kScInterpreterMaxStrLen ... and use that instead of SAL_MAX_UINT16 where string operations are involved. Change-Id: I41248bc1a876c19cd917269e44a6e91f51e569f5 Reviewed-on: https://gerrit.libreoffice.org/62373 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 3fb531e3d236..f63cdced71b9 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -91,6 +91,8 @@ class SharedStringPool; } +constexpr sal_Int32 kScInterpreterMaxStrLen = SAL_MAX_UINT16; + #define MAXSTACK (4096 / sizeof(formula::FormulaToken*)) class ScTokenStack @@ -1079,9 +1081,9 @@ inline bool ScInterpreter::CheckStringPositionArgument( double & fVal ) fVal = 0.0; return false; } -else if (fVal > SAL_MAX_UINT16) +else if (fVal > kScInterpreterMaxStrLen) { -fVal = static_cast(SAL_MAX_UINT16); +fVal = static_cast(kScInterpreterMaxStrLen); return false; } return true; @@ -1100,7 +1102,7 @@ inline sal_Int32 ScInterpreter::GetStringPositionArgument() inline bool ScInterpreter::CheckStringResultLen( OUString& rResult, const OUString& rAdd ) { -if ( rResult.getLength() + rAdd.getLength() > SAL_MAX_UINT16 ) +if ( rResult.getLength() + rAdd.getLength() > kScInterpreterMaxStrLen ) { SetError( FormulaError::StringOverflow ); rResult.clear(); diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 11fe25e89822..e6de3b6041ef 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -9430,7 +9430,7 @@ void ScInterpreter::ScRept() OUString aStr = GetString().getString(); if (nCnt < 0) PushIllegalArgument(); -else if (static_cast(nCnt) * aStr.getLength() > SAL_MAX_UINT16) +else if (static_cast(nCnt) * aStr.getLength() > kScInterpreterMaxStrLen) { PushError( FormulaError::StringOverflow ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/inc/interpre.hxx | 12 ++-- sc/source/core/tool/interpr1.cxx | 95 --- 2 files changed, 48 insertions(+), 59 deletions(-) New commits: commit a03528713a7a035bf0f9149801b5da9c14633c24 Author: Eike Rathke AuthorDate: Thu Oct 25 21:40:47 2018 +0200 Commit: Eike Rathke CommitDate: Fri Oct 26 01:25:43 2018 +0200 Rework GetStringPositionArgument() to return sal_Int32 ... and set FormulaError::IllegalArgument for illegal values. Change-Id: Iaf4c5123a3290ee1860d16fcf270e8c2a2e0845f Reviewed-on: https://gerrit.libreoffice.org/62372 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index c09f91405923..3fb531e3d236 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -472,10 +472,11 @@ private: */ static inline bool CheckStringPositionArgument( double & fVal ); -/** Obtain a double suitable as string position or length argument. +/** Obtain a sal_Int32 suitable as string position or length argument. Returns -1 if the number is Inf or NaN or less than 0 or greater than some -implementation defined max string length. */ -inline double GetStringPositionArgument(); +implementation defined max string length. In these cases also sets +nGlobalError to FormulaError::IllegalArgument, if not already set. */ +inline sal_Int32 GetStringPositionArgument(); // Check for String overflow of rResult+rAdd and set error and erase rResult // if so. Return true if ok, false if overflow @@ -1086,14 +1087,15 @@ inline bool ScInterpreter::CheckStringPositionArgument( double & fVal ) return true; } -inline double ScInterpreter::GetStringPositionArgument() +inline sal_Int32 ScInterpreter::GetStringPositionArgument() { double fVal = rtl::math::approxFloor( GetDouble()); if (!CheckStringPositionArgument( fVal)) { fVal = -1.0; +SetError( FormulaError::IllegalArgument); } -return fVal; +return static_cast(fVal); } inline bool ScInterpreter::CheckStringResultLen( OUString& rResult, const OUString& rAdd ) diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 6708bdce7913..11fe25e89822 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -8695,15 +8695,13 @@ void ScInterpreter::ScReplace() if ( MustHaveParamCount( GetByte(), 4 ) ) { OUString aNewStr = GetString().getString(); -double fCount = GetStringPositionArgument(); -double fPos = GetStringPositionArgument(); +sal_Int32 nCount = GetStringPositionArgument(); +sal_Int32 nPos = GetStringPositionArgument(); OUString aOldStr = GetString().getString(); -if (fPos < 1.0 || fCount < 0.0) +if (nPos < 1 || nCount < 0) PushIllegalArgument(); else { -sal_Int32 nCount = static_cast(fCount); -sal_Int32 nPos = static_cast(fPos); sal_Int32 nLen = aOldStr.getLength(); if (nPos > nLen + 1) nPos = nLen + 1; @@ -8838,14 +8836,12 @@ void ScInterpreter::ScLeft() sal_Int32 n; if (nParamCount == 2) { -double nVal = GetStringPositionArgument(); -if (nVal < 0.0) +n = GetStringPositionArgument(); +if (n < 0) { PushIllegalArgument(); return ; } -else -n = static_cast(nVal); } else n = 1; @@ -8950,14 +8946,12 @@ void ScInterpreter::ScRightB() sal_Int32 n; if (nParamCount == 2) { -double nVal = GetStringPositionArgument(); -if ( nVal < 0.0 ) +n = GetStringPositionArgument(); +if (n < 0) { PushIllegalArgument(); return ; } -else -n = static_cast(nVal); } else n = 1; @@ -9001,14 +8995,12 @@ void ScInterpreter::ScLeftB() sal_Int32 n; if (nParamCount == 2) { -double nVal = GetStringPositionArgument(); -if ( nVal < 0.0 ) +n = GetStringPositionArgument(); +if (n < 0) { PushIllegalArgument(); return ; } -else -n = static_cast(nVal); } else n = 1; @@ -9020,16 +9012,16 @@ void ScInterpreter::ScMidB() { if ( MustHaveParamCount( GetByte(), 3 ) ) { -double fCnt= GetStringPositionArgument(); -double fAnfang = GetStringPositionArgument(); +const sal_Int32 nCount = GetStringPositionArgument(); +const sal_Int32 nStart = GetStringPositionA
(possible) Problem with spread sheet
Hi everybody, Before I start let me apologize for this email because I don't really know who is reading, maybe I'm sending to the wrong person/people. If so, I'd appreciate if you forward to the right department. I'm a simple user who uses basically your word document and spread sheet, and I'm quite satisfied so far so first of all muy utmost encourage to keep up with your excellent development and maintenance of this fantastic LibreOffice package. However, I'm experiencing update after update that when it comes to highlight the edges of any given cell of the spread sheet I have problems to sort it out correctly. Up to a point that more often than I'd like I must give up and leave it as it is. I mean, for instance, that I make a pattern for "working hours template" but as I'm using that template I highlight here or there... sometimes after giving the instruction and saving it, it doesn't show. Or perhaps if I call for it to 3 edges it happens to just one. And to be honest I thought I caught why this happens (maybe it's due to unify some cells and the new shape has "residual orders" that avoid different orders of the same kind), but not so sure lately. This matter is exclusively of edges, regardless of whether you (try to) make them thicker or desire to change colour, etc. Other than that, your spreadsheet works really fine. I'm sorry if my English isn't good enough (I'm Spanish) or I haven't explained the matter correctly, I hope I did well enough. Many thanks in advance, Juan P.S. I'm supporting you with anonymous donations every now and then, I'm aware all this needs economic resources. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f5ac6921163cd2b0919433274f3039b7dc90480f Author: Xisco Fauli AuthorDate: Fri Oct 26 01:13:40 2018 +0200 Commit: Xisco Fauli CommitDate: Fri Oct 26 01:15:54 2018 +0200 ESC: prevent list index out of range diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index bd1a609..8c69675 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -775,7 +775,7 @@ def analyze_reports(): if row['comments'][-1]['creator'] == 'libreoffice-comm...@lists.freedesktop.org' and not key in cfg['bugzilla']['close_except']: statList['reportList']['to_be_closed'].append(key) cDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") - if cDate >= cfg['1weekDate'] or 'easyhack' in row['history'][-1]['changes'][0]['added']: + if cDate >= cfg['1weekDate'] or (len(row['history']) > 0 and 'easyhack' in row['history'][-1]['changes'][0]['added']): statList['reportList']['easyhacks_new'].append(key) tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['commits']['1month']['owner']),reverse=True) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/winproc.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 96cf06c947838120e37f3fbb4d0543dd882cb20c Author: Maxim Monastirsky AuthorDate: Thu Oct 25 16:33:17 2018 +0300 Commit: Maxim Monastirsky CommitDate: Fri Oct 26 00:31:26 2018 +0200 tdf#120907 Arrow keys don't work in palette list For a docking window which reparented to a floating window via DockingManager, Window::GetParent() won't find the floating window, because WindowImpl::mpRealParent points to the previous parent (e.g. the toolbar). What we need is to check WindowImpl::mpParent instead. Change-Id: Ibdc5e29b7b8db37f9cbea65b3d7fbe39de334319 Reviewed-on: https://gerrit.libreoffice.org/62361 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 7b841781c435..32f52d1df45c 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -821,6 +821,13 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow ) if (static_cast(pChild)->GrabsFocus()) break; } +else if (pChild->ImplGetWindowImpl()->mbDockWin) +{ +vcl::Window* pParent = pChild->GetWindow(GetWindowType::RealParent); +if (pParent && pParent->ImplGetWindowImpl()->mbFloatWin && +static_cast(pParent)->GrabsFocus()) +break; +} pChild = pChild->GetParent(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/helper/documentsignaturemanager.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit f9acea526b9aeb3cf450cd7ee43bd969385865db Author: Tomaž Vajngerl AuthorDate: Mon Oct 15 10:07:32 2018 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Oct 25 23:34:23 2018 +0200 use "range for" to iterate through certificates Change-Id: Ife206ab29f2f8eaa2358f45e6bae2290d95fd4d6 Reviewed-on: https://gerrit.libreoffice.org/61779 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index 095abb543cb6..c247a40db917 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -363,14 +363,13 @@ bool DocumentSignatureManager::add( uno::Sequence> aCertPath = xSecurityContext->getSecurityEnvironment()->buildCertificatePath(xCert); -const uno::Reference* pCertPath = aCertPath.getConstArray(); -sal_Int32 nCnt = aCertPath.getLength(); OUStringBuffer aStrBuffer; -for (int i = 0; i < nCnt; i++) +for (uno::Reference const& rxCertificate : aCertPath) { -comphelper::Base64::encode(aStrBuffer, pCertPath[i]->getEncoded()); - maSignatureHelper.AddEncapsulatedX509Certificate(aStrBuffer.makeStringAndClear()); +comphelper::Base64::encode(aStrBuffer, rxCertificate->getEncoded()); +OUString aString = aStrBuffer.makeStringAndClear(); +maSignatureHelper.AddEncapsulatedX509Certificate(aString); } std::vector aElements = DocumentSignatureHelper::CreateElementList( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: offapi/com xmlsecurity/source
offapi/com/sun/star/security/XDocumentDigitalSignatures.idl | 10 ++ xmlsecurity/source/component/documentdigitalsignatures.cxx | 41 2 files changed, 50 insertions(+), 1 deletion(-) New commits: commit 40810c43c48b25385b487c0b79c4c466dbf36be7 Author: Tomaž Vajngerl AuthorDate: Mon Oct 15 10:06:56 2018 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Oct 25 23:33:53 2018 +0200 Support to sign a document with a specified signature Change-Id: I92e392b315c9217b63db830dea1b2e91387b56c2 Reviewed-on: https://gerrit.libreoffice.org/61778 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl index ebd42c6ecef6..d7e001c57607 100644 --- a/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl +++ b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl @@ -191,7 +191,15 @@ interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface */ com::sun::star::security::XCertificate chooseCertificateWithProps( [out] sequence<::com::sun::star::beans::PropertyValue> Properties); -} ; +/** Signs the content of the document with the provided certificate. + +@since LibreOffice 6.2 + */ +boolean signDocumentWithCertificate([in] ::com::sun::star::security::XCertificate xCertificate, +[in] ::com::sun::star::embed::XStorage xStorage, +[in] ::com::sun::star::io::XStream xStream); + +}; } ; } ; } ; } ; diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 23689c1e4fa3..d19f6bd854e0 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -168,6 +168,11 @@ public: SAL_CALL chooseEncryptionCertificate() override; css::uno::Reference SAL_CALL chooseCertificateWithProps( css::uno::Sequence<::com::sun::star::beans::PropertyValue>& Properties) override; + +sal_Bool SAL_CALL signDocumentWithCertificate( +css::uno::Reference const & xCertificate, +css::uno::Reference const & xStoragexStorage, +css::uno::Reference const & xStream) override; }; DocumentDigitalSignatures::DocumentDigitalSignatures( const Reference< XComponentContext >& rxCtx ): @@ -749,6 +754,42 @@ void DocumentDigitalSignatures::addLocationToTrustedSources( const OUString& Loc aSecOpt.SetSecureURLs( aSecURLs ); } +sal_Bool DocumentDigitalSignatures::signDocumentWithCertificate( +css::uno::Reference const & xCertificate, +css::uno::Reference const & xStorage, +css::uno::Reference const & xStream) +{ +DocumentSignatureManager aSignatureManager(mxCtx, DocumentSignatureMode::Content); + +if (!aSignatureManager.init()) +return false; + +aSignatureManager.mxStore = xStorage; +aSignatureManager.maSignatureHelper.SetStorage(xStorage, m_sODFVersion); +aSignatureManager.mxSignatureStream = xStream; + +Reference xSecurityContext; +Reference xServiceInfo(xCertificate, UNO_QUERY); +xSecurityContext = aSignatureManager.getSecurityContext(); + +sal_Int32 nSecurityId; + +bool bSuccess = aSignatureManager.add(xCertificate, xSecurityContext, "", nSecurityId, true); +if (!bSuccess) +return false; + +aSignatureManager.read(/*bUseTempStream=*/true, /*bCacheLastSignature=*/false); +aSignatureManager.write(true); + +if (xStorage.is() && !xStream.is()) +{ +uno::Reference xTransaction(xStorage, uno::UNO_QUERY); +xTransaction->commit(); +} + +return true; +} + extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* com_sun_star_security_DocumentDigitalSignatures_get_implementation( uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - drawinglayer/qa drawinglayer/source include/drawinglayer include/svx svx/source sw/source
drawinglayer/qa/unit/border.cxx| 13 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx | 84 - drawinglayer/source/processor2d/vclpixelprocessor2d.cxx| 22 + include/drawinglayer/primitive2d/borderlineprimitive2d.hxx | 24 - include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx | 21 + svx/source/dialog/framelinkarray.cxx |3 svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx | 210 +++-- sw/source/core/layout/paintfrm.cxx |6 8 files changed, 247 insertions(+), 136 deletions(-) New commits: commit fef87e406d9094a020d41f6d376de7cc76a725d3 Author: Armin Le Grand AuthorDate: Thu Oct 25 10:06:05 2018 +0200 Commit: Thorsten Behrens CommitDate: Thu Oct 25 22:44:50 2018 +0200 Reorganize FrameBorderPrimitive creation (II) Step5: Move the view-dependent decomposition from BorderLinePrimitive2D to SdrFrameBorderPrimitive2D. It is now possible to use discrete sizes before the line and edge matching is done what will look much better. When it was done at BorderLinePrimitive2D and the matching was already done, that match was 'displaced' with the adapted forced scale to discrete units. The space and size used when zooming out for a single discrete unit (pixel) can heavily vary - it just covers a much larger logical area than the 'real' line/poly would do. All this needs to be handled (also for bound ranges) and can only be in a good way using primitives. Adapted to no longer do view-dependent changes in BorderLinePrimitive2D. Adapted to do these now at SdrFrameBorderPrimitive2D. Currently used to force the existing border partial lines (up to three) to not get taller than one logical unit. Adapted to no longer switch off AntiAliased rendering in VclPixelProcessor2D for processBorderLinePrimitive2D, this is problematic with various renderers on various systems (e.g. vcl still falls back to render multiple one-pixel-lines when taller than 3.5 pixels which looks horrible combined with other parts like filled polygons) All this needs fine balancing on - all systems - all renderers - all apps (which all have their own table implementation) - all render targets (pixel/PDF/print/slideshow/...) Done as thorough as possible, but may need additional finetuning. May also be a motivation to move away from vcl and implement these urgetly needed system-dependent primitive renderers... Adapted UnitTest testDoublePixelProcessing with the needed comments. Change-Id: Ie88bb76c2474b6ab3764d45a9cd1669264492acd Reviewed-on: https://gerrit.libreoffice.org/62344 Tested-by: Jenkins Reviewed-by: Armin Le Grand Reviewed-on: https://gerrit.libreoffice.org/62356 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx index 229adb28d573..1b6c8fa96de4 100644 --- a/drawinglayer/qa/unit/border.cxx +++ b/drawinglayer/qa/unit/border.cxx @@ -189,7 +189,7 @@ void DrawinglayerBorderTest::testDoublePixelProcessing() { auto pMPLAction = static_cast(pAction); -if (0 == pMPLAction->GetLineInfo().GetWidth() && LineStyle::LINE_SOLID == pMPLAction->GetLineInfo().GetStyle()) +if (0 != pMPLAction->GetLineInfo().GetWidth() && LineStyle::LINE_SOLID == pMPLAction->GetLineInfo().GetStyle()) { nPolyLineActionCount++; } @@ -198,7 +198,16 @@ void DrawinglayerBorderTest::testDoublePixelProcessing() // Check if all eight (2x four) simple lines with width == 0 and // solid were created -const sal_uInt32 nExpectedNumPolyLineActions = 8; +// +// This has changed: Now, just the needed 'real' lines get created +// which have a width of 1. This are two lines. The former multiple +// lines were a combination of view-dependent force to a single-pixel +// line width (0 == lineWidth -> hairline) and vcl rendering this +// using a (insane) combination of single non-AAed lines. All the +// system-dependent part of the BorderLine stuff is now done in +// SdrFrameBorderPrimitive2D and svx. +// Adapted this test - still useful, breaking it may be a hint :-) +const sal_uInt32 nExpectedNumPolyLineActions = 2; CPPUNIT_ASSERT_EQUAL(nExpectedNumPolyLineActions, nPolyLineActionCount); } diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 413d1bdd51c9..7de5fb0e23f2 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -85,18 +85,6 @@ namespace drawinglayer && isGap() == rBorderLine.isGap(); } -dou
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2fac8cf22f687b247ba6fba8e7caf8e970cd15d9 Author: Ilmari Lauhakangas AuthorDate: Thu Oct 25 17:48:39 2018 +0200 Commit: Gerrit Code Review CommitDate: Thu Oct 25 22:31:02 2018 +0200 Update git submodules * Update helpcontent2 from branch 'master' - tdf#120221 Add experimental note Change-Id: I591c7ef34a84059060a7eeeff15ad2f7b6cc58ae Reviewed-on: https://gerrit.libreoffice.org/62365 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 53861dca02ac..c6c0ddc60fec 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 53861dca02acb334291052dbc09e456675efc55d +Subproject commit c6c0ddc60fec391d21a65b77b9b76066bfd0c2e7 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: source/text
source/text/scalc/01/xml_source.xhp |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit c6c0ddc60fec391d21a65b77b9b76066bfd0c2e7 Author: Ilmari Lauhakangas AuthorDate: Thu Oct 25 17:48:39 2018 +0200 Commit: Olivier Hallot CommitDate: Thu Oct 25 22:31:02 2018 +0200 tdf#120221 Add experimental note Change-Id: I591c7ef34a84059060a7eeeff15ad2f7b6cc58ae Reviewed-on: https://gerrit.libreoffice.org/62365 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/scalc/01/xml_source.xhp b/source/text/scalc/01/xml_source.xhp index 8acb8e9ff..7bfc6744b 100644 --- a/source/text/scalc/01/xml_source.xhp +++ b/source/text/scalc/01/xml_source.xhp @@ -32,9 +32,10 @@ XML Source;load XML data in spreadsheets -XML Source (Experimental) +XML Source Import XML data in a spreadsheet. + The XML Source feature allows to import data from arbitrarily structured XML content into cells in an existing spreadsheet document. It allows XML content to be imported either partially or in full, depending on the structure of the XML content and the map definitions that the user defines. The user can specify multiple non-overlapping sub-structures to be mapped to different cell positions within the same document. The user can import either element contents, attribute values or both. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
wsd/LOOLWSD.cpp | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit bf2dcdc01f04a440c8a12d5f5e212d9bdd39c1f6 Author: Tamás Zolnai AuthorDate: Thu Oct 25 22:24:00 2018 +0200 Commit: Tamás Zolnai CommitDate: Thu Oct 25 22:25:34 2018 +0200 Have a better log for convert-to denial Change-Id: I5c8d367b3f82d47a45df8c298e39515bc89f7b0d diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 2af6a1591..c0db3952a 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -1940,12 +1940,19 @@ public: } return hosts.match(address); } -bool allowConvertTo(const std::string &address, const Poco::Net::HTTPRequest& request) +bool allowConvertTo(const std::string &address, const Poco::Net::HTTPRequest& request, bool report = false) { std::string addressToCheck = address; std::string hostToCheck = request.getHost(); bool allow = allowPostFrom(addressToCheck) || StorageBase::allowedWopiHost(hostToCheck); +if(!allow) +{ +if(report) +LOG_ERR("Requesting address is denied: " << addressToCheck); +return false; +} + // Handle forwarded header and make sure all participating IPs are allowed if(request.has("X-Forwarded-For")) { @@ -1965,6 +1972,12 @@ public: // We can't find out the hostname, check the IP only allow &= allowPostFrom(addressToCheck); } +if(!allow) +{ +if(report) +LOG_ERR("Requesting address is denied: " << addressToCheck); +return false; +} } } return allow; @@ -2287,10 +2300,8 @@ private: std::string format = (form.has("format") ? form.get("format") : ""); -if (!allowConvertTo(socket->clientAddress(), request)) +if (!allowConvertTo(socket->clientAddress(), request, true)) { -LOG_ERR("client address DENY: " << socket->clientAddress()); - std::ostringstream oss; oss << "HTTP/1.1 403\r\n" << "Date: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5AccessibleEventListener.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 6ddda80effd0fd7edac16b050bb598721840cde4 Author: Jan-Marek Glogowski AuthorDate: Thu Oct 25 18:17:32 2018 + Commit: Jan-Marek Glogowski CommitDate: Thu Oct 25 21:31:11 2018 +0200 Qt5 fix Windows -Werror build Change-Id: I8e58f9132c382885aa4cc85cf3e0a5277ec71623 Reviewed-on: https://gerrit.libreoffice.org/62368 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/qt5/Qt5AccessibleEventListener.cxx b/vcl/qt5/Qt5AccessibleEventListener.cxx index 4fb84d4c02d1..d0733e3d9546 100644 --- a/vcl/qt5/Qt5AccessibleEventListener.cxx +++ b/vcl/qt5/Qt5AccessibleEventListener.cxx @@ -63,15 +63,17 @@ void Qt5AccessibleEventListener::notifyEvent( new QAccessibleEvent(pQAccessibleInterface, QAccessible::ActiveDescendantChanged)); return; case AccessibleEventId::CHILD: -QAccessible::Event event; +{ +QAccessible::Event event = QAccessible::InvalidEvent; if (aEvent.OldValue >>= xChild) event = QAccessible::ObjectDestroyed; if (aEvent.NewValue >>= xChild) event = QAccessible::ObjectCreated; -if (event) +if (event != QAccessible::InvalidEvent) QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, event)); return; +} case AccessibleEventId::SELECTION_CHANGED: QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::Selection)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: gtk/mobile.cpp
gtk/mobile.cpp |2 ++ 1 file changed, 2 insertions(+) New commits: commit 9360beb97f7abf45df42dfc2dc5a27cef74fc9c0 Author: Tor Lillqvist AuthorDate: Thu Oct 25 22:29:11 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 22:30:11 2018 +0300 hello-world.odt does not exist out of the box Need to copy from hello.odt, like the Makefile.am does when you 'make run'. diff --git a/gtk/mobile.cpp b/gtk/mobile.cpp index a45ebf990..577897114 100644 --- a/gtk/mobile.cpp +++ b/gtk/mobile.cpp @@ -316,6 +316,8 @@ int main(int argc, char* argv[]) g_signal_connect(main_window, "destroy", G_CALLBACK(destroyWindowCb), NULL); g_signal_connect(webView, "close", G_CALLBACK(closeWebViewCb), main_window); +system("cp " TOPSRCDIR "/test/data/hello.odt" " " TOPSRCDIR "/test/data/hello-world.odt"); + fileURL = "file://" TOPSRCDIR "/test/data/hello-world.odt"; std::string urlAndQuery = ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: net/FakeSocket.cpp
net/FakeSocket.cpp | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit a4b4f6bf36ad97672f89d9d841051d30746c8a98 Author: Tor Lillqvist AuthorDate: Thu Oct 25 21:53:34 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 21:57:44 2018 +0300 Fix fakeSocketAvailableDataLength() when peer socket is closed Also bin a few lines of unnecessary code. diff --git a/net/FakeSocket.cpp b/net/FakeSocket.cpp index 5562e20ca..ecbcdc33e 100644 --- a/net/FakeSocket.cpp +++ b/net/FakeSocket.cpp @@ -463,9 +463,13 @@ ssize_t fakeSocketAvailableDataLength(int fd) return -1; } -loggingBuffer << "FakeSocket Available data on #" << fd << ": " << pair.buffer[K][0].size() << flush(); +ssize_t result = 0; +if (pair.buffer[K].size() > 0) +result = pair.buffer[K][0].size(); -return pair.buffer[K][0].size(); +loggingBuffer << "FakeSocket Available data on #" << fd << ": " << result << flush(); + +return result; } ssize_t fakeSocketRead(int fd, void *buf, size_t nbytes) @@ -516,9 +520,6 @@ ssize_t fakeSocketRead(int fd, void *buf, size_t nbytes) return -1; } -if (pair.buffer[K].size() == 0) -return 0; - memmove(buf, pair.buffer[K][0].data(), result); pair.buffer[K].erase(pair.buffer[K].begin()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: 2 commits - gtk/mobile.cpp net/WebSocketHandler.hpp wsd/LOOLWSD.cpp
gtk/mobile.cpp | 14 ++ net/WebSocketHandler.hpp |2 +- wsd/LOOLWSD.cpp |6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) New commits: commit 8bc97c0f9e6b0fa7483b44ed6faa6bfbc2f17999 Author: Tor Lillqvist AuthorDate: Thu Oct 25 21:33:57 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 21:33:57 2018 +0300 Adapt after 4724aa0cf78f3aedf7f7f4222d251ef8395d5523 diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index 3b60fe9b8..f6457787e 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -205,7 +205,7 @@ public: } else _wsPayload.insert(_wsPayload.end(), data, data + payloadLen); #else -unsigned char * const p = reinterpret_cast(&socket->_inBuffer[0]); +unsigned char * const p = reinterpret_cast(&socket->getInBuffer()[0]); _wsPayload.insert(_wsPayload.end(), p, p + len); const size_t headerLen = 0; const size_t payloadLen = len; diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 3f3748247..2af6a1591 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -1845,7 +1845,7 @@ private: #else Poco::Process::PID pid = 1; std::string jailId = "jail"; -socket->_inBuffer.clear(); +socket->getInBuffer().clear(); #endif LOG_TRC("Calling make_shared, for NewChildren?"); @@ -2108,8 +2108,8 @@ private: socket->eraseFirstInputBytes(requestSize); #else Poco::Net::HTTPRequest request; -handleClientWsUpgrade(request, std::string(socket->_inBuffer.data(), socket->_inBuffer.size()), disposition); -socket->_inBuffer.clear(); +handleClientWsUpgrade(request, std::string(socket->getInBuffer().data(), socket->getInBuffer().size()), disposition); +socket->getInBuffer().clear(); #endif } commit 16a805e290e5a276f44728cf428efe7f31de0622 Author: Tor Lillqvist AuthorDate: Thu Oct 25 21:27:48 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 21:28:13 2018 +0300 Fix some memory management foo diff --git a/gtk/mobile.cpp b/gtk/mobile.cpp index 760d62c10..a45ebf990 100644 --- a/gtk/mobile.cpp +++ b/gtk/mobile.cpp @@ -27,9 +27,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +#include #include #include +#include + #include #include @@ -56,7 +60,7 @@ static void send2JS_ready_callback(GObject *source_object, GAsyncResult *res, gpointer user_data) { -g_free(user_data); +free(user_data); } static void send2JS(const std::vector& buffer) @@ -102,7 +106,7 @@ static void send2JS(const std::vector& buffer) data.push_back(0); js = "window.TheFakeWebSocket.onmessage({'data': '"; -js = js + std::string(buffer.data()); +js = js + std::string(buffer.data(), buffer.size()); js = js + "'});"; } @@ -228,13 +232,15 @@ static void handle_lool_message(WebKitUserContentManager *manager, else { // As above -std::thread([&] +char *string_copy = strdup(string_value); +std::thread([=] { struct pollfd pollfd; pollfd.fd = fakeClientFd; pollfd.events = POLLOUT; fakeSocketPoll(&pollfd, 1, -1); -fakeSocketWrite(fakeClientFd, string_value, strlen(string_value)); +fakeSocketWrite(fakeClientFd, string_copy, strlen(string_copy)); +free(string_copy); }).detach(); } g_free(string_value); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source
oox/source/drawingml/diagram/constraintlistcontext.cxx |2 - oox/source/drawingml/diagram/diagramlayoutatoms.cxx| 32 ++--- oox/source/drawingml/diagram/diagramlayoutatoms.hxx| 15 +++ oox/source/drawingml/diagram/layoutnodecontext.cxx | 14 +++ 4 files changed, 51 insertions(+), 12 deletions(-) New commits: commit 923061d17d4b5b8bf0d4a8111b270c99a7c649a9 Author: Miklos Vajna AuthorDate: Thu Oct 25 17:42:36 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 20:00:28 2018 +0200 oox smartart: work towards accessing parent constraints The "Vertical Box List" preset in PowerPoint contains two linear layouts, the inner one nested in the outer one. All the constraints are stated on the parent layout. This commit doesn't actually read those constraints yet, but adds infrastructure to look up parents of layout nodes and also to get the constraints of a layout node. No functional changes intended. Change-Id: If844d17a90f8f180a9d21245249a2744bea32b31 Reviewed-on: https://gerrit.libreoffice.org/62367 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx b/oox/source/drawingml/diagram/constraintlistcontext.cxx index 99e3f3d10e72..cc71c89b226a 100644 --- a/oox/source/drawingml/diagram/constraintlistcontext.cxx +++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx @@ -50,7 +50,7 @@ ConstraintListContext::onCreateContext( ::sal_Int32 aElement, case DGM_TOKEN( constr ): { std::shared_ptr< ConstraintAtom > pNode( new ConstraintAtom(mpNode->getLayoutNode()) ); -mpNode->addChild( pNode ); +LayoutAtom::connect(mpNode, pNode); Constraint& rConstraint = pNode->getConstraint(); rConstraint.mnFor = rAttribs.getToken( XML_for, XML_none ); diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 7ef0e456ce0f..eeaa0812383d 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -227,6 +227,19 @@ void AlgAtom::accept( LayoutAtomVisitor& rVisitor ) void AlgAtom::layoutShape( const ShapePtr& rShape, const std::vector& rConstraints ) const { +// Algorithm result may depend on the parent constraints as well. +std::vector aParentConstraints; +const LayoutNode* pParent = getLayoutNode().getParentLayoutNode(); +if (pParent) +{ +for (const auto& pChild : pParent->getChildren()) +{ +auto pConstraintAtom = dynamic_cast(pChild.get()); +if (pConstraintAtom) +pConstraintAtom->parseConstraint(aParentConstraints); +} +} + switch(mnType) { case XML_composite: @@ -357,11 +370,10 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, double fSpace = 0.3; awt::Size aChildSize = rShape->getSize(); - -// Lineral vertically: no adjustment of width. -if (nDir != XML_fromT) +if (nDir == XML_fromL || nDir == XML_fromR) aChildSize.Width /= (nCount + (nCount-1)*fSpace); -aChildSize.Height /= (nCount + (nCount-1)*fSpace); +else if (nDir == XML_fromT || nDir == XML_fromB) +aChildSize.Height /= (nCount + (nCount-1)*fSpace); awt::Point aCurrPos(0, 0); if (nIncX == -1) @@ -756,6 +768,18 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode return true; } +const LayoutNode* LayoutNode::getParentLayoutNode() const +{ +for (LayoutAtomPtr pAtom = getParent(); pAtom; pAtom = pAtom->getParent()) +{ +auto pLayoutNode = dynamic_cast(pAtom.get()); +if (pLayoutNode) +return pLayoutNode; +} + +return nullptr; +} + void ShapeAtom::accept( LayoutAtomVisitor& rVisitor ) { rVisitor.visit(*this); diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx index 606e8794becc..50ff8a300ac5 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx @@ -106,17 +106,30 @@ public: const OUString& getName() const { return msName; } +private: void addChild( const LayoutAtomPtr & pNode ) { mpChildNodes.push_back( pNode ); } +void setParent(const LayoutAtomPtr& pParent) { mpParent = pParent; } + +public: virtual const std::vector& getChildren() const { return mpChildNodes; } +LayoutAtomPtr getParent() const { return mpParent.lock(); } + +static void connect(const LayoutAtomPtr& pParent, const LayoutAtomPtr& pChild) +{ +pParent->addChild(pChild); +pChild->setParent(pParent); +} + // dump for debug void dump(int level = 0); protected:
[Libreoffice-commits] core.git: sw/source
sw/source/core/txtnode/fntcache.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a8b72c8a54ab6ce68764a4c5b97b7af0e30ce566 Author: Jan-Marek Glogowski AuthorDate: Thu Oct 25 15:44:58 2018 + Commit: Jan-Marek Glogowski CommitDate: Thu Oct 25 19:53:36 2018 +0200 Always check IsVirtual() in SwFntObj::DrawText I tried to use the new OUTDEV_PDF in replacement for the PDF export check. It survived Jenkins and local builds, but sometimes a tinderbox breaks, so check IsVirtual() instead. Change-Id: I64fe7c145dc3b87345f6a967f6b2997f3c7e38c2 Reviewed-on: https://gerrit.libreoffice.org/62366 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 7a653917e9e4..bf365413f282 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -880,7 +880,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) OSL_FAIL( "Outdev Check failed" ); } } -else if ( OUTDEV_PDF == rInf.GetOut().GetOutDevType() && ! pWin ) +else if ( rInf.GetOut().IsVirtual() && ! pWin ) { // PDF export if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() ) @@ -897,7 +897,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } } else if ( OUTDEV_WINDOW == rInf.GetOut().GetOutDevType() || - ( OUTDEV_VIRDEV == rInf.GetOut().GetOutDevType() && pWin ) ) + ( rInf.GetOut().IsVirtual() && pWin ) ) { // Window or virtual window if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win
include/vcl/glyphitem.hxx|6 +++--- include/vcl/vcllayout.hxx|5 +++-- vcl/inc/sallayout.hxx| 10 ++ vcl/inc/unx/freetype_glyphcache.hxx |9 + vcl/qt5/Qt5Graphics_Text.cxx |6 +- vcl/quartz/salgdi.cxx| 16 ++-- vcl/source/gdi/CommonSalLayout.cxx |4 ++-- vcl/source/gdi/sallayout.cxx |9 + vcl/source/outdev/text.cxx |6 ++ vcl/unx/generic/gdi/cairotextrender.cxx | 12 ++-- vcl/unx/generic/print/genpspgraphics.cxx | 12 ++-- vcl/win/gdi/salfont.cxx |4 ++-- 12 files changed, 39 insertions(+), 60 deletions(-) New commits: commit e194f597ae5882e1cda2cac2925577fff609f101 Author: Jan-Marek Glogowski AuthorDate: Sun Sep 30 16:07:16 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Thu Oct 25 19:53:22 2018 +0200 Change GlyphItem::nFallbackLevel to font instance No need for a real reference, as GlyphItems are bound to their GenericSalLayout, which holds the valid reference and doesn't allow font change. Change-Id: I8e1129ef99f576e43d55f39aee040ceeb635d51d Reviewed-on: https://gerrit.libreoffice.org/62359 Reviewed-by: Khaled Hosny Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/include/vcl/glyphitem.hxx b/include/vcl/glyphitem.hxx index 39d99bf69744..306466b67723 100644 --- a/include/vcl/glyphitem.hxx +++ b/include/vcl/glyphitem.hxx @@ -41,10 +41,10 @@ struct VCL_DLLPUBLIC GlyphItem sal_GlyphId m_aGlyphId; Point m_aLinearPos; // absolute position of non rotated string -int m_nFallbackLevel; +LogicalFontInstance* m_pFontInstance; GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, const Point& rLinearPos, - long nFlags, int nOrigWidth, int nXOffset) + long nFlags, int nOrigWidth, int nXOffset, LogicalFontInstance* pFontInstance) : m_nFlags(nFlags) , m_nCharPos(nCharPos) , m_nCharCount(nCharCount) @@ -53,7 +53,7 @@ struct VCL_DLLPUBLIC GlyphItem , m_nXOffset(nXOffset) , m_aGlyphId(aGlyphId) , m_aLinearPos(rLinearPos) -, m_nFallbackLevel(0) +, m_pFontInstance(pFontInstance) { } diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx index 81cb7be614fb..3237973e9ffc 100644 --- a/include/vcl/vcllayout.hxx +++ b/include/vcl/vcllayout.hxx @@ -96,8 +96,9 @@ public: virtual boolIsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594 // methods using glyph indexing -virtual boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, - const PhysicalFontFace** pFallbackFont = nullptr) const = 0; +virtual boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, + const PhysicalFontFace** pFallbackFont = nullptr, + int* const pFallbackLevel = nullptr) const = 0; virtual boolGetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const; virtual boolGetBoundRect( SalGraphics&, tools::Rectangle& ) const; diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index ccaa4bd34d63..6b2ca93a7a39 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -130,8 +130,9 @@ public: sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override; DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const override; voidGetCaretPositions(int nArraySize, long* pCaretXArray) const override; -boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, - const PhysicalFontFace** pFallbackFont = nullptr) const override; +boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, + const PhysicalFontFace** pFallbackFont = nullptr, + int* const pFallbackLevel = nullptr) const override; boolGetOutline(SalGraphics&, basegfx::B2DPolyPolygonVector&) const override; boolIsKashidaPosValid(int nCharPos) const override; @@ -182,8 +183,9 @@ public: // used by display layers LogicalFontInstance& GetFont() const { return *mpFont; } -boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, - const PhysicalFontFace** pFallbackFont = nullptr) const final override; +boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, + const PhysicalFontFace** pFallbackFont = nullptr, + int* const pFallbackLevel = nullptr) const override; private: // for glyph+font+script fallback diff --gi
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/srchdlg.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit b5a6865a67dc6223dc164d2fe68dfdaf4dab5c39 Author: Stephan Bergmann AuthorDate: Thu Oct 25 17:05:07 2018 +0200 Commit: Stephan Bergmann CommitDate: Thu Oct 25 19:12:11 2018 +0200 Remove dead comment ...that had been introduced in aecda33a2bc46fada51f2cff06887e33adbf05cf "#90370# Attribute Display uses FixedText instead of MultiLineEdit" together with code that is long gone again: +// temporary to avoid incompatibility +#if SUPD < 641 || defined( GT_DEBUG ) +aSearchFormatsED.Hide(); +aReplaceFormatsED.Hide(); + Change-Id: If93425a3815f4946f97657f03bf066ee6ca4e6a4 Reviewed-on: https://gerrit.libreoffice.org/62363 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 82e587626734..18b0ebd47d1f 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -413,7 +413,6 @@ void SvxSearchDialog::dispose() void SvxSearchDialog::Construct_Impl() { -// temporary to avoid incompatibility pImpl.reset( new SearchDlg_Impl() ); pImpl->aSelectionTimer.SetTimeout( 500 ); pImpl->aSelectionTimer.SetInvokeHandler( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - sw/qa sw/source
sw/qa/extras/htmlimport/data/reqif-page-style.xhtml |1 sw/qa/extras/htmlimport/htmlimport.cxx |8 + sw/source/filter/html/swhtml.cxx| 31 sw/source/filter/html/swhtml.hxx|6 +-- sw/source/filter/inc/fltini.hxx |5 +++ 5 files changed, 36 insertions(+), 15 deletions(-) New commits: commit 4168118731f5e89bd945c7504d14d30c77dea138 Author: Miklos Vajna AuthorDate: Thu Oct 25 14:22:02 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 18:00:43 2018 +0200 sw HTML import: avoid custom default page style in reqif mode Would be "HTML" by default, but reqif-html is mostly very simple documents and the custom page styles is unexpected. Reviewed-on: https://gerrit.libreoffice.org/62317 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 094e7b6a1028620c2b1503de8b51dc6a2482e290) Conflicts: sw/source/filter/html/swhtml.cxx sw/source/filter/html/swhtml.hxx Change-Id: I3f1b293bcd074305cf5cc87f03248e934d5fac4d diff --git a/sw/qa/extras/htmlimport/data/reqif-page-style.xhtml b/sw/qa/extras/htmlimport/data/reqif-page-style.xhtml new file mode 100644 index ..36f5aa11768b --- /dev/null +++ b/sw/qa/extras/htmlimport/data/reqif-page-style.xhtml @@ -0,0 +1 @@ +aaabbb diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 91e33f863d07..4d5cdb5c37b6 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -269,6 +269,14 @@ DECLARE_HTMLIMPORT_TEST(testReqIfTable, "reqif-table.xhtml") CPPUNIT_ASSERT_EQUAL(static_cast(COL_TRANSPARENT), getProperty(xCell, "BackColor")); } +DECLARE_HTMLIMPORT_TEST(testReqIfPageStyle, "reqif-page-style.xhtml") +{ +// Without the accompanying fix in place, this test would have failed with +// 'Expected: Standard, Actual : HTML'. +CPPUNIT_ASSERT_EQUAL(OUString("Standard"), + getProperty(getParagraph(1), "PageStyleName")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 2dc52ea140e9..1fa50556e127 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -198,6 +198,8 @@ bool HTMLReader::SetStrmStgPtr() // Aufruf fuer die allg. Reader-Schnittstelle sal_uLong HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, const OUString & rName ) { +SetupFilterOptions(); + if( !pStrm ) { OSL_ENSURE( pStrm, "HTML-Read without stream" ); @@ -210,7 +212,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, // Set the HTML page style, when it isn't a HTML document, // otherwise it's already set. -if( !rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ) +if( !rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && m_aNamespace != "reqif-xhtml" ) { rDoc.getIDocumentContentOperations().InsertPoolItem( rPam, SwFormatPageDesc( rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_HTML, false )) ); @@ -223,7 +225,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, tools::SvRef xParser = new SwHTMLParser( &rDoc, rPam, *pStrm, rName, rBaseURL, !bInsertMode, pMedium, IsReadUTF8(), -bIgnoreHTMLComments ); +bIgnoreHTMLComments, m_aNamespace ); SvParserState eState = xParser->CallParser(); @@ -247,7 +249,8 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, const OUString& rBaseURL, bool bReadNewDoc, SfxMedium* pMed, bool bReadUTF8, -bool bNoHTMLComments ) +bool bNoHTMLComments, +const OUString& rNamespace ) : SfxHTMLParser( rIn, bReadNewDoc, pMed ), SwClient( nullptr ), m_aPathToFile( rPath ), @@ -415,7 +418,13 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, } } -SetupFilterOptions(); +if (!rNamespace.isEmpty()) +{ +SetNamespace(rNamespace); +m_bXHTML = true; +if (rNamespace == "reqif-xhtml") +m_bReqIF = true; +} } SwHTMLParser::~SwHTMLParser() @@ -5564,12 +5573,15 @@ void SwHTMLParser::AddMetaUserDefined( OUString const & i_rMetaName ) } } -void SwHTMLParser::SetupFilterOptions() +void HTMLReader::SetupFilterOptions() { -if (!GetMedium()) +// Reset state fr
[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_3' - 13 commits - sw/inc sw/source
sw/inc/IDocumentOutlineNodes.hxx |5 sw/inc/doc.hxx|4 sw/inc/ndtxt.hxx |2 sw/inc/node.hxx |2 sw/source/core/crsr/crsrsh.cxx|2 sw/source/core/crsr/crstrvl.cxx | 90 +++--- sw/source/core/doc/DocumentLinksAdministrationManager.cxx |2 sw/source/core/doc/DocumentOutlineNodesManager.cxx| 51 +++ sw/source/core/doc/docnum.cxx | 40 -- sw/source/core/doc/ftnidx.cxx | 74 +-- sw/source/core/docnode/node.cxx | 45 --- sw/source/core/edit/ednumber.cxx | 22 ++- sw/source/core/inc/DocumentOutlineNodesManager.hxx|3 sw/source/core/inc/txtfrm.hxx |1 sw/source/core/layout/wsfrm.cxx |9 + sw/source/core/text/EnhancedPDFExportHelper.cxx |7 - sw/source/core/text/txtfld.cxx|4 sw/source/core/text/txtfrm.cxx| 22 +++ sw/source/core/txtnode/ndtxt.cxx |4 sw/source/ui/fldui/fldref.cxx |8 - sw/source/uibase/shells/listsh.cxx| 18 ++ sw/source/uibase/utlui/content.cxx| 25 ++- 22 files changed, 343 insertions(+), 97 deletions(-) New commits: commit b8711183cda6a1cfbe34b57291f8553a24917f15 Author: Michael Stahl AuthorDate: Thu Oct 25 16:35:07 2018 +0200 Commit: Michael Stahl CommitDate: Thu Oct 25 16:35:07 2018 +0200 sw_redlinehide_3: update frames in SwDoc::MoveParagraph() ... for hidden mode. Change-Id: I61f240ee7e4e3b61d53b07170be195c15fd679ae diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 4918abd8e651..78696475537f 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1996,6 +1996,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv ) aPam.GetBound(false).nContent.Assign( nullptr, 0 ); getIDocumentRedlineAccess().AppendRedline( pNewRedline, true ); +sw::UpdateFramesForAddDeleteRedline(*this, *pNewRedline); // Still NEEDS to be optimized! getIDocumentRedlineAccess().SetRedlineFlags( eOld ); commit c6439a20b037806fc1302bae41125c6b5b1168b2 Author: Michael Stahl AuthorDate: Thu Oct 25 16:32:04 2018 +0200 Commit: Michael Stahl CommitDate: Thu Oct 25 16:34:31 2018 +0200 sw_redlinehide_3: fix bad redlines in SwDoc::MoveParagraph() Avoid creating a redline that ends on an EndNode (if the moved node is the last in the body), and also ensure that the redline has valid SwIndex nContent in its positions (because lcl_CheckPosition asserts that). Change-Id: I9b89d8cbc180453c24d9690ac937adb4512f0aeb diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index b9426acafe27..4918abd8e651 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1902,7 +1902,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv ) SwPosition aInsPos( aIdx ); aInsPos.nContent.Assign( aIdx.GetNode().GetContentNode(), 0 ); -SwPaM aPam( pStt->nNode, aMvRg.aEnd ); +SwPaM aPam( pStt->nNode, 0, aMvRg.aEnd, 0 ); SwPaM& rOrigPam = const_cast(rPam); rOrigPam.DeleteMark(); @@ -1967,6 +1967,14 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv ) ++rOrigPam.GetPoint()->nNode; rOrigPam.GetPoint()->nContent.Assign( rOrigPam.GetContentNode(), 0 ); +assert(*aPam.GetMark() < *aPam.GetPoint()); +if (aPam.GetPoint()->nNode.GetNode().IsEndNode()) +{ // ensure redline ends on content node +--aPam.GetPoint()->nNode; +assert(aPam.GetPoint()->nNode.GetNode().IsTextNode()); +SwTextNode *const pNode(aPam.GetPoint()->nNode.GetNode().GetTextNode()); +aPam.GetPoint()->nContent.Assign(pNode, pNode->Len()); +} RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags(); GetDocumentRedlineManager().checkRedlining(eOld); commit aa0b79bff2b328294ae837abef5e58d9feace514 Author: Michael Stahl AuthorDate: Thu Oct 25 13:25:59 2018 +0200 Commit: Michael Stahl CommitDate: Thu Oct 25 13:55:25 2018 +0200 sw_redlinehide_3: adapt SwTextNode::IsNumbered() & callers Answer depends on layout. Change-Id: Ibc7bddfa1b04630ddcfcfa429fbb507347073ce2 diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 05bdb53b2f1f..d00b280abeb3 100644 --
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/outdev.hxx |2 - include/vcl/print.hxx |1 vcl/source/gdi/print.cxx | 15 --- vcl/source/outdev/font.cxx | 80 ++--- vcl/source/outdev/text.cxx | 29 ++ vcl/source/outdev/textline.cxx | 11 + 6 files changed, 36 insertions(+), 102 deletions(-) New commits: commit e5a7ee832b4385fa83a914f4d7d81ed860da0667 Author: Jan-Marek Glogowski AuthorDate: Mon Oct 22 21:00:30 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Thu Oct 25 17:39:44 2018 +0200 Return bool from InitFont and try to init the font InitFont() is always called after ImplNewFont(). Calling InitFont() without a call to ImplNewFont() doesn't make much sense. There are some places which don't need to set the SalGraphics font, but these are fine with calling ImplNewFont() as is. It now looks like Printer' and OutputDevice' InitFont() do the same, after commit c766a05ae035 ("Antialias drawing is part of the font selection") moved Antialias handling into the common ImplNewFont() function. Change-Id: I77b9a5b6dbed186a2b0868537930d6bf3fccd9d5 Reviewed-on: https://gerrit.libreoffice.org/62202 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index fe7507213256..8970fe0e3788 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1292,7 +1292,7 @@ protected: SAL_DLLPRIVATE long GetEmphasisAscent() const { return mnEmphasisAscent; } SAL_DLLPRIVATE long GetEmphasisDescent() const { return mnEmphasisDescent; } -virtual voidInitFont() const; +SAL_DLLPRIVATE bool InitFont() const; virtual voidSetFontOrientation( LogicalFontInstance* const pFontInstance ) const; virtual longGetFontExtLeading() const; diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index ae3c773cf934..631c38a5ab42 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -261,7 +261,6 @@ protected: virtual voidEmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) override; -virtual voidInitFont() const override; virtual voidSetFontOrientation( LogicalFontInstance* const pFontInstance ) const override; public: diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 2c9a58dec73d..06774a99cbcf 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1677,21 +1677,6 @@ void Printer::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const too Pop(); } -void Printer::InitFont() const -{ -DBG_TESTSOLARMUTEX(); - -if (!mpFontInstance) -return; - -if ( mbInitFont ) -{ -// select font in the device layers -mpGraphics->SetFont(mpFontInstance.get(), 0); -mbInitFont = false; -} -} - void Printer::SetFontOrientation( LogicalFontInstance* const pFontEntry ) const { pFontEntry->mnOrientation = pFontEntry->mxFontMetric->GetOrientation(); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 7868b9ba0b3d..b11d97b0deb8 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -167,27 +167,18 @@ bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFo bool OutputDevice::GetFontFeatures(std::vector& rFontFeatures) const { -if (mbNewFont) -ImplNewFont(); - -if (mbInitFont) -InitFont(); - -if (!mpFontInstance) +if (!ImplNewFont()) return false; LogicalFontInstance* pFontInstance = mpFontInstance.get(); - if (!pFontInstance) return false; hb_font_t* pHbFont = pFontInstance->GetHbFont(); - if (!pHbFont) return false; hb_face_t* pHbFace = hb_font_get_face(pHbFont); - if (!pHbFace) return false; @@ -202,7 +193,7 @@ bool OutputDevice::GetFontFeatures(std::vector& rFontFeature FontMetric OutputDevice::GetFontMetric() const { FontMetric aMetric; -if( mbNewFont && !ImplNewFont() ) +if (!ImplNewFont()) return aMetric; LogicalFontInstance* pFontInstance = mpFontInstance.get(); @@ -261,15 +252,7 @@ FontMetric OutputDevice::GetFontMetric( const vcl::Font& rFont ) const bool OutputDevice::GetFontCharMap( FontCharMapRef& rxFontCharMap ) const { -// we need a graphics -if( !mpGraphics && !AcquireGraphics() ) -return false; - -if( mbNewFont ) -ImplNewFont(); -if( mbInitFont ) -InitFont(); -if( !mpFontInstance ) +if (!InitFont()) return false; FontCharMapRef xFontCharMap ( mpGraphics->GetFontCharMap() ); @@ -286,17 +269,8 @@ bool OutputDevice::GetFontCharMap( FontCharMapRef& rxFontCharMap ) const bool OutputDevice::GetFontCapabilities( v
[Libreoffice-commits] core.git: include/svtools include/vcl sw/source vcl/inc vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win
include/svtools/ruler.hxx |1 include/vcl/glyphitem.hxx | 84 + include/vcl/vcllayout.hxx | 61 +-- sw/source/core/txtnode/fntcache.cxx|1 vcl/inc/fontinstance.hxx |1 vcl/inc/listbox.hxx|1 vcl/inc/sallayout.hxx |1 vcl/qt5/Qt5Graphics_Text.cxx |6 - vcl/quartz/ctfonts.cxx |8 +- vcl/quartz/salgdi.cxx |6 - vcl/source/gdi/CommonSalLayout.cxx | 36 - vcl/source/gdi/pdfwriter_impl.cxx | 24 +++--- vcl/source/gdi/sallayout.cxx | 100 - vcl/source/outdev/text.cxx |4 - vcl/source/outdev/textline.cxx |2 vcl/source/window/menu.cxx |1 vcl/source/window/menuitemlist.hxx |1 vcl/unx/generic/gdi/cairotextrender.cxx|6 - vcl/unx/generic/glyphs/freetype_glyphcache.cxx |8 +- vcl/unx/generic/print/genpspgraphics.cxx |4 - vcl/unx/generic/print/text_gfx.cxx |4 - vcl/win/gdi/DWriteTextRenderer.cxx |4 - vcl/win/gdi/salfont.cxx| 14 +-- vcl/win/gdi/winlayout.cxx |8 +- 24 files changed, 212 insertions(+), 174 deletions(-) New commits: commit 134447e78f00d7378406d0a3fa5a4c5d3a02032e Author: Jan-Marek Glogowski AuthorDate: Sun Sep 30 14:00:54 2018 + Commit: Jan-Marek Glogowski CommitDate: Thu Oct 25 17:35:05 2018 +0200 Move GlyphItem into its own header Actually GlyphItem should be VCL internal, but this requires a transparent SalLayoutGlyphs (i.e. via pImpl), which I'm too lazy to implement currently. This seperation makes the affected source files more obvious and later migration of vcl/glyphitem.hxx easier. While at it apply the coding style and add '_' to member prefix. Change-Id: I61497af5c628c40f51597ce0ef286c47321acbc2 Reviewed-on: https://gerrit.libreoffice.org/62358 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index d3a532db9650..5e1efddc6cf5 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/include/vcl/glyphitem.hxx b/include/vcl/glyphitem.hxx new file mode 100644 index ..39d99bf69744 --- /dev/null +++ b/include/vcl/glyphitem.hxx @@ -0,0 +1,84 @@ +/* -*- 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 . + */ + +#ifndef INCLUDED_VCL_GLYPHITEM_HXX +#define INCLUDED_VCL_GLYPHITEM_HXX + +#include +#include +#include + +class LogicalFontInstance; + +typedef sal_uInt16 sal_GlyphId; + +struct VCL_DLLPUBLIC GlyphItem +{ +int m_nFlags; +int m_nCharPos; // index in string +int m_nCharCount; // number of characters m_aking up this glyph + +int m_nOrigWidth; // original glyph width +int m_nNewWidth; // width after adjustments +int m_nXOffset; + +sal_GlyphId m_aGlyphId; +Point m_aLinearPos; // absolute position of non rotated string + +int m_nFallbackLevel; + +GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, const Point& rLinearPos, + long nFlags, int nOrigWidth, int nXOffset) +: m_nFlags(nFlags) +, m_nCharPos(nCharPos) +, m_nCharCount(nCharCount) +, m_nOrigWidth(nOrigWidth) +, m_nNewWidth(nOrigWidth) +, m_nXOffset(nXOffset) +, m_aGlyphId(aGlyphId) +, m_aLinearPos(rLinearPos) +, m_nFallbackLevel(0) +{ +} + +enum +{ +IS_IN_CLUSTER = 0x001, +IS_RTL_GLYPH = 0x002, +IS_DIACRITIC = 0x004, +IS_VERTICAL = 0x008, +IS_SPACING = 0x010, +ALLOW_KASHIDA = 0x020, +IS_DROPPED = 0x040, +IS_CLUSTER_START = 0x080 +}; + +bool IsInCluster() const {
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/htmlimport/data/reqif-page-style.xhtml |1 sw/qa/extras/htmlimport/htmlimport.cxx |8 + sw/source/filter/html/swhtml.cxx| 31 sw/source/filter/html/swhtml.hxx|6 +-- sw/source/filter/inc/fltini.hxx |5 +++ 5 files changed, 36 insertions(+), 15 deletions(-) New commits: commit 094e7b6a1028620c2b1503de8b51dc6a2482e290 Author: Miklos Vajna AuthorDate: Thu Oct 25 14:22:02 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 16:47:19 2018 +0200 sw HTML import: avoid custom default page style in reqif mode Would be "HTML" by default, but reqif-html is mostly very simple documents and the custom page styles is unexpected. Change-Id: I3f1b293bcd074305cf5cc87f03248e934d5fac4d Reviewed-on: https://gerrit.libreoffice.org/62317 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/extras/htmlimport/data/reqif-page-style.xhtml b/sw/qa/extras/htmlimport/data/reqif-page-style.xhtml new file mode 100644 index ..36f5aa11768b --- /dev/null +++ b/sw/qa/extras/htmlimport/data/reqif-page-style.xhtml @@ -0,0 +1 @@ +aaabbb diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index ad404d7e4f3a..52a6a7145bc4 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -349,6 +349,14 @@ DECLARE_HTMLIMPORT_TEST(testImageSize, "image-size.html") CPPUNIT_ASSERT_EQUAL(static_cast(aExpected.getHeight()), aSize.Height); } +DECLARE_HTMLIMPORT_TEST(testReqIfPageStyle, "reqif-page-style.xhtml") +{ +// Without the accompanying fix in place, this test would have failed with +// 'Expected: Standard, Actual : HTML'. +CPPUNIT_ASSERT_EQUAL(OUString("Standard"), + getProperty(getParagraph(1), "PageStyleName")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 2e11911b7ece..879a95e0db9b 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -204,6 +204,8 @@ bool HTMLReader::SetStrmStgPtr() // Call for the general Reader-Interface ErrCode HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, const OUString & rName ) { +SetupFilterOptions(); + if( !m_pStream ) { OSL_ENSURE( m_pStream, "HTML-Read without stream" ); @@ -216,7 +218,7 @@ ErrCode HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, co // Set the HTML page style, when it isn't a HTML document, // otherwise it's already set. -if( !rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ) +if( !rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && m_aNamespace != "reqif-xhtml" ) { rDoc.getIDocumentContentOperations().InsertPoolItem( rPam, SwFormatPageDesc( rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_HTML, false )) ); @@ -229,7 +231,7 @@ ErrCode HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, co tools::SvRef xParser = new SwHTMLParser( &rDoc, rPam, *m_pStream, rName, rBaseURL, !m_bInsertMode, m_pMedium, IsReadUTF8(), -m_bIgnoreHTMLComments ); +m_bIgnoreHTMLComments, m_aNamespace ); SvParserState eState = xParser->CallParser(); @@ -253,7 +255,8 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, const OUString& rBaseURL, bool bReadNewDoc, SfxMedium* pMed, bool bReadUTF8, -bool bNoHTMLComments ) +bool bNoHTMLComments, +const OUString& rNamespace ) : SfxHTMLParser( rIn, bReadNewDoc, pMed ), SwClient( nullptr ), m_aPathToFile( rPath ), @@ -417,7 +420,13 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, } } -SetupFilterOptions(); +if (!rNamespace.isEmpty()) +{ +SetNamespace(rNamespace); +m_bXHTML = true; +if (rNamespace == "reqif-xhtml") +m_bReqIF = true; +} } SwHTMLParser::~SwHTMLParser() @@ -5539,12 +5548,15 @@ void SwHTMLParser::AddMetaUserDefined( OUString const & i_rMetaName ) } } -void SwHTMLParser::SetupFilterOptions() +void HTMLReader::SetupFilterOptions() { -if (!GetMedium()) +// Reset state from previous Read() invocation. +m_aNamespace.clear(); + +if (!m_pMedium) return; -const SfxItemSet* pItemSet = GetMedium()->GetItemSet(); +const SfxItemSet* pItemSet
[Libreoffice-commits] core.git: drawinglayer/source svx/source
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |6 +++--- svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit d3f009819132ba59d260a8a0a1ca4d0ceceb3976 Author: Andrea Gelmini AuthorDate: Thu Oct 25 15:14:07 2018 +0200 Commit: Julien Nabet CommitDate: Thu Oct 25 16:44:51 2018 +0200 Fix typos Change-Id: I4eda42a11239567c557431017a1fa99cb37298c5 Reviewed-on: https://gerrit.libreoffice.org/62357 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index ad70cec45135..e5deac2936e5 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -886,16 +886,16 @@ namespace drawinglayer // using fine stroking. Correct, but 'ghosty'. // It has shown that there are quite some problems here: -// - vcl OutDev renderer methods stuill use fallbacks to paint +// - vcl OutDev renderer methods still use fallbacks to paint // multiple single lines between discrete sizes of < 3.5 what -// looks bad and does not matzch +// looks bad and does not match // - mix of filled Polygons and Lines is bad when AA switched off // - Alignment of AA with non-AA may be bad in diverse different // renderers // // Due to these reasons I change the strategy: Always draw AAed, but // allow fallback to test/check and if needed. The normal case -// where BorderLines will be system-depenently snapped to have at +// where BorderLines will be system-dependently snapped to have at // least a single discrete width per partial line (there may be up to // three) works well nowadays due to most renderers moving the AA stuff // by 0.5 pixels (discrete units) to match well with the non-AAed parts. diff --git a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx index 072fec2498c3..fe33f10d503c 100644 --- a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx @@ -80,7 +80,7 @@ namespace const bool bSecnUsed(0.0 != rStyle.Secn()); // Get the single segment line widths. This is the point where the -// minimal discrete unit wil be used if given (fMinimalDiscreteUnit). If +// minimal discrete unit will be used if given (fMinimalDiscreteUnit). If // not given it's 0.0 and thus will have no influence. double fPrim(snapToDiscreteUnit(rStyle.Prim(), fMinimalDiscreteUnit)); const double fDist(snapToDiscreteUnit(rStyle.Dist(), fMinimalDiscreteUnit)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source sw/uiconfig
sw/inc/swabstdlg.hxx|2 sw/source/ui/dialog/swdlgfact.cxx |5 sw/source/ui/dialog/swdlgfact.hxx |2 sw/source/ui/index/swuiidxmrk.cxx | 373 +++- sw/source/uibase/inc/swuiidxmrk.hxx | 59 sw/source/uibase/shells/textidx.cxx |2 sw/uiconfig/swriter/ui/bibliographyentry.ui | 86 ++ 7 files changed, 462 insertions(+), 67 deletions(-) New commits: commit af428a570e05a7d38476208152630853dc15f41f Author: Caolán McNamara AuthorDate: Thu Oct 25 12:16:44 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 16:39:55 2018 +0200 weld SwAuthMarkModalDlg Change-Id: Ief3a32a6001cf8b388107c74dc96fc82430d6398 Reviewed-on: https://gerrit.libreoffice.org/62354 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 59f7e12ad227..cf621ad6e89a 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -400,7 +400,7 @@ public: bool bDraw, const OString& sDefPage = OString() ) = 0; -virtual VclPtr CreateSwAutoMarkDialog(vcl::Window *pParent, SwWrtShell &rSh) = 0; +virtual VclPtr CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh) = 0; virtual VclPtr CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName) = 0; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index ed9cc2b47001..15a96a671249 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -875,10 +875,9 @@ VclPtr SwAbstractDialogFactory_Impl::CreateSwParaDlg(weld: return VclPtr::Create(o3tl::make_unique(pParent, rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage)); } -VclPtr SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(vcl::Window *pParent, SwWrtShell &rSh) +VclPtr SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh) { -VclPtr pDlg = VclPtr::Create( pParent, rSh ); -return VclPtr::Create( pDlg ); +return VclPtr::Create(o3tl::make_unique(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwColumnDialog(weld::Window *pParent, SwWrtShell &rSh) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 3943fb159bce..78d79677c0ed 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -629,7 +629,7 @@ public: bool bDraw, const OString& sDefPage = OString()) override; -virtual VclPtr CreateSwAutoMarkDialog(vcl::Window *pParent, SwWrtShell &rSh) override; +virtual VclPtr CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh) override; virtual VclPtr CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName) override; virtual VclPtr CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh) override; virtual VclPtr CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh) override; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index cc6775996300..b986228698fa 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1443,6 +1443,361 @@ void SwAuthorMarkPane::Activate() m_pActionBT->Enable(!pSh->HasReadonlySel()); } +bool AuthorMarkPane::bIsFromComponent = true; + +AuthorMarkPane::AuthorMarkPane(weld::DialogController &rDialog, weld::Builder& rBuilder, bool bNewDlg) +: m_rDialog(rDialog) +, bNewEntry(bNewDlg) +, bBibAccessInitialized(false) +, pSh(nullptr) +, m_xFromComponentRB(rBuilder.weld_radio_button("frombibliography")) +, m_xFromDocContentRB(rBuilder.weld_radio_button("fromdocument")) +, m_xAuthorFI(rBuilder.weld_label("author")) +, m_xTitleFI(rBuilder.weld_label("title")) +, m_xEntryED(rBuilder.weld_entry("entryed")) +, m_xEntryLB(rBuilder.weld_combo_box("entrylb")) +, m_xActionBT(rBuilder.weld_button(bNewEntry ? OString("insert") : OString("modify"))) +, m_xCloseBT(rBuilder.weld_button("close")) +, m_xCreateEntryPB(rBuilder.weld_button("new")) +, m_xEditEntryPB(rBuilder.weld_button("edit")) +{ +m_xActionBT->show(true); +m_xFromComponentRB->show(bNewEntry); +m_xFromDocContentRB->show(bNewEntry); +m_xFromComponentRB->set_active(bIsFromComponent); +m_xFromDocContentRB->set_active(!bIsFromComponent); + +m_xActionBT->connect_clicked(LINK(this,AuthorMarkPane, InsertHdl)); +m_xCloseBT->connect_clicked(LINK(this,AuthorMarkPane, CloseHdl)); +m_xCreateEntryPB->connect_clicked(LINK(this,AuthorMarkPane, CreateEntryHdl)); +m_xEditEntryPB->connect_clicked(LINK(this,AuthorMarkPane, CreateEntryHdl)); +
[Libreoffice-commits] online.git: net/Socket.hpp net/WebSocketHandler.hpp tools/WebSocketDump.cpp wsd/LOOLWSD.cpp
net/Socket.hpp | 20 net/WebSocketHandler.hpp | 24 tools/WebSocketDump.cpp |2 +- wsd/LOOLWSD.cpp | 12 ++-- 4 files changed, 31 insertions(+), 27 deletions(-) New commits: commit 4724aa0cf78f3aedf7f7f4222d251ef8395d5523 Author: Miklos Vajna AuthorDate: Thu Oct 25 16:38:54 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 16:39:02 2018 +0200 Socket: do what the TODO says Drop the list of friends and just add getters for the relevant members. diff --git a/net/Socket.hpp b/net/Socket.hpp index 2d8a2f26a..698edd328 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -938,6 +938,16 @@ public: return _clientAddress; } +std::vector& getInBuffer() +{ +return _inBuffer; +} + +std::vector& getOutBuffer() +{ +return _outBuffer; +} + protected: /// Called when a polling event is received. @@ -1012,6 +1022,7 @@ protected: disposition.setClosed(); } +public: /// Override to write data out to socket. virtual void writeOutgoingData() { @@ -1051,6 +1062,7 @@ protected: while (!_outBuffer.empty()); } +protected: /// Override to handle reading of socket data differently. virtual int readData(char* buf, int len) { @@ -1096,14 +1108,6 @@ protected: /// True when shutdown was requested via shutdown(). bool _shutdownSignalled; - -// To be able to access _inBuffer and _outBuffer. -// TODO we probably need accessors to the _inBuffer & _outBuffer -// instead of this many friends... -friend class WebSocketHandler; -friend class ClientRequestDispatcher; -friend class PrisonerRequestDispatcher; -friend class SimpleResponseClient; }; enum class WSOpCode : unsigned char { diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index fcb9d3660..3b60fe9b8 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -131,7 +131,7 @@ public: assert(socket && "Expected a valid socket instance."); // websocket fun ! -const size_t len = socket->_inBuffer.size(); +const size_t len = socket->getInBuffer().size(); if (len == 0) return false; // avoid logging. @@ -143,7 +143,7 @@ public: return false; } -unsigned char *p = reinterpret_cast(&socket->_inBuffer[0]); +unsigned char *p = reinterpret_cast(&socket->getInBuffer()[0]); const bool fin = p[0] & 0x80; const WSOpCode code = static_cast(p[0] & 0x0f); const bool hasMask = p[1] & 0x80; @@ -191,7 +191,7 @@ public: return false; } -LOG_TRC("#" << socket->getFD() << ": Incoming WebSocket data of " << len << " bytes: " << Util::stringifyHexLine(socket->_inBuffer, 0, std::min((size_t)32, len))); +LOG_TRC("#" << socket->getFD() << ": Incoming WebSocket data of " << len << " bytes: " << Util::stringifyHexLine(socket->getInBuffer(), 0, std::min((size_t)32, len))); data = p + headerLen; @@ -214,14 +214,14 @@ public: assert(_wsPayload.size() >= payloadLen); -socket->_inBuffer.erase(socket->_inBuffer.begin(), socket->_inBuffer.begin() + headerLen + payloadLen); +socket->getInBuffer().erase(socket->getInBuffer().begin(), socket->getInBuffer().begin() + headerLen + payloadLen); #ifndef MOBILEAPP // FIXME: fin, aggregating payloads into _wsPayload etc. LOG_TRC("#" << socket->getFD() << ": Incoming WebSocket message code " << static_cast(code) << ", fin? " << fin << ", mask? " << hasMask << ", payload length: " << _wsPayload.size() << -", residual socket data: " << socket->_inBuffer.size() << " bytes."); +", residual socket data: " << socket->getInBuffer().size() << " bytes."); bool doClose = false; @@ -444,7 +444,7 @@ private: return 0; socket->assertCorrectThread(); -std::vector& out = socket->_outBuffer; +std::vector& out = socket->getOutBuffer(); const size_t oldSize = out.size(); #ifndef MOBILEAPP @@ -586,26 +586,26 @@ protected: { std::shared_ptr socket = _socket.lock(); -LOG_TRC("Incoming client websocket upgrade response: " << std::string(&socket->_inBuffer[0], socket->_inBuffer.size())); +LOG_TRC("Incoming client websocket upgrade response: " << std::string(&socket->getInBuffer()[0], socket->getInBuffer().size())); bool bOk = false; size_t responseSize = 0; try { -Poco::MemoryInputStream message(&socket->_inBuffer[0], socket->_inBuffer.size());; +Poco::MemoryInputStream message(&socket->getInBuffer()[0], socket->getInBuffer().size());; Poco::Net::HTTPResponse response; response.read(message); {
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/salgdi.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit c799679135882337e65eab23eabdcae2d8b42786 Author: Tor Lillqvist AuthorDate: Thu Oct 25 17:35:37 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 17:35:37 2018 +0300 Need Change-Id: I416523b701f6468bcbbc47e9e4e507c319b6beaa diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index eaf1d2b9c273..fc600660c935 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -26,6 +26,7 @@ #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: Branch 'distro/lhm/libreoffice-6-1+backports' - 51 commits - basctl/source basic/source chart2/qa chart2/source config_host.mk.in configure.ac connectivity/registry cui
basctl/source/dlged/dlgedobj.cxx| 19 basic/source/runtime/dllmgr-x64.cxx | 2 chart2/qa/extras/xshape/data/reference/tdf90839-1.xml | 68 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml | 10 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml | 10 chart2/qa/extras/xshape/data/reference/tdf90839-4.xml | 10 chart2/source/controller/main/ChartController_Tools.cxx | 61 chart2/source/tools/DiagramHelper.cxx | 6 config_host.mk.in | 1 configure.ac| 11 connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu | 5 cui/source/customize/cfg.cxx| 6 cui/uiconfig/ui/positionpage.ui | 8 dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk | 70 dbaccess/CppunitTest_dbaccess_firebird_test.mk | 18 dbaccess/Module_dbaccess.mk | 6 dbaccess/qa/unit/data/firebird_empty.odb |binary dbaccess/qa/unit/data/firebird_empty_le.odb |binary dbaccess/qa/unit/data/firebird_integer_ods12.odb |binary dbaccess/qa/unit/firebird-regression.cxx| 108 dbaccess/qa/unit/firebird.cxx | 2 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 3 dtrans/Library_mcnttype.mk | 1 dtrans/source/cnttype/mcnttype.cxx | 269 dtrans/source/cnttype/mcnttype.hxx | 3 editeng/source/items/frmitems.cxx | 3 extensions/source/propctrlr/propertyhandler.hxx | 5 filter/source/xslt/export/wordml/ooo2wordml_list.xsl| 3 include/svx/fmview.hxx | 6 include/tools/stream.hxx| 8 include/vcl/button.hxx | 2 instsetoo_native/CustomTarget_setup.mk | 2 instsetoo_native/util/openoffice.lst.in | 2 librelogo/source/LibreLogo/LibreLogo.py | 4 readlicense_oo/license/CREDITS.fodt | 3830 +- reportdesign/inc/RptObject.hxx | 4 reportdesign/source/core/sdr/RptObject.cxx | 55 reportdesign/source/ui/report/ReportController.cxx | 51 sc/qa/unit/data/ods/tdf62268.ods |binary sc/qa/unit/helper/qahelper.cxx | 3 sc/qa/unit/subsequent_export-test.cxx | 59 sc/qa/unit/subsequent_filters-test.cxx | 26 sc/sdi/scalc.sdi| 8 sc/source/core/data/column4.cxx | 16 sc/source/core/tool/queryparam.cxx | 6 sc/source/filter/excel/xeformula.cxx| 6 sc/source/filter/xml/xmlimprt.cxx | 21 sc/source/filter/xml/xmlimprt.hxx | 5 sc/source/filter/xml/xmlrowi.cxx| 16 sc/source/ui/app/transobj.cxx | 66 sc/source/ui/view/cellsh.cxx| 8 sc/source/ui/view/gridwin.cxx | 2 sc/uiconfig/scalc/ui/recalcquerydialog.ui | 1 scripting/source/pyprov/pythonscript.py | 30 sd/source/ui/view/ToolBarManager.cxx| 17 sfx2/source/sidebar/SidebarController.cxx | 2 sfx2/uiconfig/ui/linkeditdialog.ui | 1 solenv/clang-format/blacklist | 1
[Libreoffice-commits] core.git: solenv/gdb solenv/lldb solenv/vs
solenv/gdb/libreoffice/sal.py |8 solenv/gdb/libreoffice/util/uno.py |2 +- solenv/lldb/libreoffice/LO.py |4 ++-- solenv/vs/LibreOffice.natvis |6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 8ae4e64287643b7340e6e35bd16fffeac663e809 Author: Noel Grandin AuthorDate: Thu Oct 25 16:10:34 2018 +0200 Commit: Noel Grandin CommitDate: Thu Oct 25 16:12:29 2018 +0200 fix gdb pretty printing revert part of commit 6f50961e69406a17d6ec998956a6b33208b1001b remove more rtl::OUString and OString prefixes Change-Id: I026f8175c855a20bab54940f6235bca5c91ddbab diff --git a/solenv/gdb/libreoffice/sal.py b/solenv/gdb/libreoffice/sal.py index 00923a7bfdb0..8dcfaebe66e1 100644 --- a/solenv/gdb/libreoffice/sal.py +++ b/solenv/gdb/libreoffice/sal.py @@ -147,10 +147,10 @@ def build_pretty_printers(): printer.add('_rtl_String', RtlStringPrinter) printer.add('_rtl_uString', lambda name, val: RtlStringPrinter(name, val, 'utf-16le')) -printer.add('OString', StringPrinter) -printer.add('OUString', lambda name, val: StringPrinter(name, val, 'utf-16')) -printer.add('OStringBuffer', StringPrinter) -printer.add('OUStringBuffer', lambda name, val: StringPrinter(name, val, 'utf-16')) +printer.add('rtl::OString', StringPrinter) +printer.add('rtl::OUString', lambda name, val: StringPrinter(name, val, 'utf-16')) +printer.add('rtl::OStringBuffer', StringPrinter) +printer.add('rtl::OUStringBuffer', lambda name, val: StringPrinter(name, val, 'utf-16')) printer.add('sal_Unicode', SalUnicodePrinter, SalUnicodePrinter.query) # other stuff diff --git a/solenv/gdb/libreoffice/util/uno.py b/solenv/gdb/libreoffice/util/uno.py index 3790f075f925..648ea408a6d5 100644 --- a/solenv/gdb/libreoffice/util/uno.py +++ b/solenv/gdb/libreoffice/util/uno.py @@ -223,7 +223,7 @@ def make_uno_type(val): elif type_class == TypeClass.DOUBLE: uno_type = PrimitiveType(type_class, name, 'double') elif type_class == TypeClass.STRING: -uno_type = PrimitiveType(type_class, name, 'OUString') +uno_type = PrimitiveType(type_class, name, 'rtl::OUString') elif type_class == TypeClass.TYPE: uno_type = PrimitiveType(type_class, name, 'com::sun::star::uno::Type') elif type_class == TypeClass.ANY: diff --git a/solenv/lldb/libreoffice/LO.py b/solenv/lldb/libreoffice/LO.py index 31088af2aa32..3c1134ccadc4 100644 --- a/solenv/lldb/libreoffice/LO.py +++ b/solenv/lldb/libreoffice/LO.py @@ -99,8 +99,8 @@ def sal_unicode_string(buffer_ptr, length): # Automatically install the above summary functions when this is loaded def __lldb_init_module(debugger, dict): debugger.HandleCommand("type summary add --skip-references --python-function LO.rtl_String_summary rtl_String") -debugger.HandleCommand("type summary add --skip-pointers --skip-references --python-function LO.rtl_OString_summary OString") +debugger.HandleCommand("type summary add --skip-pointers --skip-references --python-function LO.rtl_OString_summary rtl::OString") debugger.HandleCommand("type summary add --skip-references --python-function LO.rtl_uString_summary rtl_uString") -debugger.HandleCommand("type summary add --skip-pointers --skip-references --python-function LO.rtl_OUString_summary OUString") +debugger.HandleCommand("type summary add --skip-pointers --skip-references --python-function LO.rtl_OUString_summary rtl::OUString") # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/solenv/vs/LibreOffice.natvis b/solenv/vs/LibreOffice.natvis index ad16550d0504..409ccd5919c8 100644 --- a/solenv/vs/LibreOffice.natvis +++ b/solenv/vs/LibreOffice.natvis @@ -8,11 +8,11 @@ * --> http://schemas.microsoft.com/vstudio/debugger/natvis/2010";> - + {*pData} *pData,su - + {*pData} *pData,s @@ -54,7 +54,7 @@ {*((unsigned __int64*)pData),d} (UNSIGNED_HYPER) {*((float*)pData)} (FLOAT) {*((double*)pData)} (DOUBLE) -{*((OUString*)pData)} (STRING) +{*((rtl::OUString*)pData)} (STRING) {*((com::sun::star::uno::Type*)pData)} (TYPE) {*((_uno_Any*)pData)} (ANY) {*((sal_Int32*)pData),d} (ENUM) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: editeng/source
editeng/source/editeng/impedit3.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 87239dbf7d57d812cdecbf75f6e86afaa4864abb Author: AlicVB AuthorDate: Wed Oct 17 22:03:24 2018 +0200 Commit: Thorsten Behrens CommitDate: Thu Oct 25 16:09:28 2018 +0200 tdf#120525 fix linespacing <100% for impress apply linespacing changes even for fonts with big descent values Change-Id: If1763da1ea015822d90a5c7410ca90dcaa71d22f Reviewed-on: https://gerrit.libreoffice.org/61894 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 14e2510024aa..85ab762eeb65 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1445,10 +1445,10 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) sal_uInt16 nNewAscent = pLine->GetTxtHeight() * nPropLineSpace / 100 * 4 / 5; // 80% if ( !nAscent || nAscent > nNewAscent ) { -sal_uInt16 nHeight = pLine->GetHeight() * nPropLineSpace / 100; -pLine->SetHeight( nHeight, pLine->GetTxtHeight() ); pLine->SetMaxAscent( nNewAscent ); } +sal_uInt16 nHeight = pLine->GetHeight() * nPropLineSpace / 100; +pLine->SetHeight( nHeight, pLine->GetTxtHeight() ); } else if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Frame.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 8043727a5882d7cc7904a79ded6c989a18b8c67a Author: Katarina Behrens AuthorDate: Thu Oct 25 11:45:13 2018 +0200 Commit: Katarina Behrens CommitDate: Thu Oct 25 15:57:05 2018 +0200 Remembering window position regressed a little since commit 8d791a9d9657f6573ce27947c0289b36c6eba77c (Set Qt5Widget to be a central widget of QMainWindow) Change-Id: Ifd23043312a92b260871630862f1b949851a6d89 Reviewed-on: https://gerrit.libreoffice.org/62348 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 45c4c3ee98fd..1901877c57ea 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -429,7 +429,10 @@ void Qt5Frame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt1 maGeometry.nY = nY; m_bDefaultPos = false; -m_pQWidget->move(nX, nY); +if (m_pTopLevel) +m_pTopLevel->move(nX, nY); +else +m_pQWidget->move(nX, nY); } else if (m_bDefaultPos) Center(); @@ -530,7 +533,7 @@ bool Qt5Frame::GetWindowState(SalFrameState* pState) pState->mnMask = WindowStateMask::State; if (isMinimized() /*|| !windowHandle()*/) pState->mnState |= WindowStateState::Minimized; -else if (m_pQWidget->isMaximized()) +else if (isMaximized()) { pState->mnState |= WindowStateState::Maximized; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source sw/source
sfx2/source/dialog/mgetempl.cxx |1 + sw/source/ui/chrdlg/chardlg.cxx |5 + 2 files changed, 6 insertions(+) New commits: commit e19b342f15178ce9f7d7b832649ee173b4b7f2ea Author: Caolán McNamara AuthorDate: Thu Oct 25 12:11:41 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 15:27:37 2018 +0200 tdf#120188 limit the width of the styles combos in the url tabpage Change-Id: Idcc4043b70c30ccc693c9c5ac983bfabe0573862 Reviewed-on: https://gerrit.libreoffice.org/62352 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 7557fead6834..ebebe1c78bd5 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -68,6 +68,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(TabPageParent pParent, const Sf , m_xNameFt(m_xBuilder->weld_label("nameft")) { m_xFollowLb->make_sorted(); +// tdf#120188 like SwCharURLPage limit the width of the style combos const int nMaxWidth(m_xFollowLb->get_approximate_digit_width() * 50); m_xFollowLb->set_size_request(nMaxWidth , -1); m_xBaseLb->make_sorted(); diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index b83104256817..8b5177ebc166 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -148,6 +148,11 @@ SwCharURLPage::SwCharURLPage(TabPageParent pParent, const SfxItemSet& rCoreSet) , m_xNotVisitedLB(m_xBuilder->weld_combo_box("unvisitedlb")) , m_xCharStyleContainer(m_xBuilder->weld_widget("charstyle")) { +// tdf#120188 like SfxManageStyleSheetPage limit the width of the style combos +const int nMaxWidth(m_xVisitedLB->get_approximate_digit_width() * 50); +m_xVisitedLB->set_size_request(nMaxWidth , -1); +m_xNotVisitedLB->set_size_request(nMaxWidth , -1); + const SfxPoolItem* pItem; SfxObjectShell* pShell; if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) || ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: 2 commits - kit/Kit.cpp
kit/Kit.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3b901020d258e92a5d834c1f1f10baec0c290792 Author: Tor Lillqvist AuthorDate: Thu Oct 25 16:01:02 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 16:02:45 2018 +0300 Actually it's enough to pass instdir as the 2nd parameter to lok_init_2() The "/user" will be tacked on by core code anyway. We don't need two levels of "/user". diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 49202084b..e37a88e98 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -2454,7 +2454,7 @@ void lokit_main( #else // MOBILEAPP #ifdef __linux -LibreOfficeKit *kit = lok_init_2(LO_PATH "/program", "file://" LO_PATH "/user"); +LibreOfficeKit *kit = lok_init_2(LO_PATH "/program", "file://" LO_PATH); #else LibreOfficeKit *kit = lok_init_2(nullptr, nullptr); #endif commit 76ff3d5c2ac4e4fb83faaa35779491c4a991830a Author: Tor Lillqvist AuthorDate: Thu Oct 25 15:55:55 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 16:02:45 2018 +0300 The 2nd parameter to lok_init_2 should be a URL Sure, there is some GLib API I could use to properly convert from a pathname to a file: URL. But I am lazy, and this is not an end-user program. diff --git a/kit/Kit.cpp b/kit/Kit.cpp index a1a43caca..49202084b 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -2454,7 +2454,7 @@ void lokit_main( #else // MOBILEAPP #ifdef __linux -LibreOfficeKit *kit = lok_init_2(LO_PATH "/program", LO_PATH "/user"); +LibreOfficeKit *kit = lok_init_2(LO_PATH "/program", "file://" LO_PATH "/user"); #else LibreOfficeKit *kit = lok_init_2(nullptr, nullptr); #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - connectivity/Configuration_mysqlc.mk connectivity/Configuration_mysql.mk connectivity/Library_mysql.mk connectivity/Module_connectivi
connectivity/Configuration_mysql.mk | 8 connectivity/Configuration_mysqlc.mk | 20 connectivity/Library_mysql.mk| 32 connectivity/Module_connectivity.mk | 5 connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu | 249 ++ connectivity/source/drivers/mysql/YUser.cxx | 320 ++ connectivity/source/drivers/mysql/mysql.component| 26 dbaccess/source/ui/dlg/generalpage.cxx | 4 dbaccess/source/ui/dlg/generalpage.hxx | 5 mysqlc/Extension_mysql-connector-ooo.mk | 35 mysqlc/source/mysqlc_connection.hxx | 195 - mysqlc/source/mysqlc_databasemetadata.cxx| 1234 -- mysqlc/source/mysqlc_driver.cxx | 317 -- mysqlc/source/mysqlc_driver.hxx | 124 - mysqlc/source/mysqlc_general.cxx | 352 -- mysqlc/source/mysqlc_statement.hxx | 196 - mysqlc/source/mysqlc_subcomponent.hxx| 201 - postprocess/CustomTarget_registry.mk | 5 postprocess/Rdb_services.mk | 1 19 files changed, 665 insertions(+), 2664 deletions(-) New commits: commit 36defede63afe94e9bc6872eac955757c49452c1 Author: Tamas Bunth AuthorDate: Mon Oct 8 11:04:48 2018 +0200 Commit: Andras Timar CommitDate: Thu Oct 25 14:52:44 2018 +0200 Revert removal of mysql jdbc connector And also make some minor fixes so it cooperates with the new mysqlc library. Change-Id: I866add99a699150c6550ee7f7ff2ee947e07117c Reviewed-on: https://gerrit.libreoffice.org/61648 Tested-by: Jenkins Reviewed-by: Tamás Bunth Reviewed-on: https://gerrit.libreoffice.org/62318 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/connectivity/Configuration_mysql.mk b/connectivity/Configuration_mysql.mk index 5ef54c70a80c..1cb07ca71441 100644 --- a/connectivity/Configuration_mysql.mk +++ b/connectivity/Configuration_mysql.mk @@ -7,13 +7,13 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Configuration_Configuration,driver_mysqlc)) +$(eval $(call gb_Configuration_Configuration,driver_mysql)) -$(eval $(call gb_Configuration_add_spool_modules,driver_mysqlc,connectivity/registry/mysqlc,\ - org/openoffice/Office/DataAccess/Drivers-mysqlc.xcu \ +$(eval $(call gb_Configuration_add_spool_modules,driver_mysql,connectivity/registry/mysql,\ + org/openoffice/Office/DataAccess/Drivers-mysql.xcu \ )) -$(eval $(call gb_Configuration_add_localized_datas,driver_mysqlc,connectivity/registry/mysqlc,\ +$(eval $(call gb_Configuration_add_localized_datas,driver_mysql,connectivity/registry/mysql,\ org/openoffice/Office/DataAccess/Drivers.xcu \ )) diff --git a/connectivity/Configuration_mysqlc.mk b/connectivity/Configuration_mysqlc.mk new file mode 100644 index ..5ef54c70a80c --- /dev/null +++ b/connectivity/Configuration_mysqlc.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. +# + +$(eval $(call gb_Configuration_Configuration,driver_mysqlc)) + +$(eval $(call gb_Configuration_add_spool_modules,driver_mysqlc,connectivity/registry/mysqlc,\ + org/openoffice/Office/DataAccess/Drivers-mysqlc.xcu \ +)) + +$(eval $(call gb_Configuration_add_localized_datas,driver_mysqlc,connectivity/registry/mysqlc,\ + org/openoffice/Office/DataAccess/Drivers.xcu \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/connectivity/Library_mysql.mk b/connectivity/Library_mysql.mk index f82593c23d2e..ac3c0c2619e8 100644 --- a/connectivity/Library_mysql.mk +++ b/connectivity/Library_mysql.mk @@ -1,20 +1,48 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- # +# # 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/. +# file, You can obtain one at http://mozilla.org/MPL/2.0/. # $(eval $(call gb_Library_Library,mysql)) +$(eval $(call gb_Library_set_componentfile,mysql,connectivity/source/drivers/mysql/mysql)) + +$(eval $(call gb_Library_use_extern
[Libreoffice-commits] core.git: include/LibreOfficeKit
include/LibreOfficeKit/LibreOfficeKitInit.h |9 + 1 file changed, 9 insertions(+) New commits: commit 88014e265a91753b69b70b5f4b246921d16051de Author: Tor Lillqvist AuthorDate: Thu Oct 25 15:39:50 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 15:43:03 2018 +0300 Verify that we are actually passed a URL, not a pathname Sure, the test could be even more strict and actually do a case-insensitive check for an initial "file:" or "vnd.sun.star.pathname:". Change-Id: Ic252aeccdec708138530075d1f38fa348d1e469e diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index a4befd405cb1..ae779f468350 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -291,6 +291,15 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p return pSym( install_path ); } +if (user_profile_url != NULL && user_profile_url[0] == '/') +{ +// It should be either a file: URL or a vnd.sun.star.pathname: URL. +fprintf( stderr, "second parameter to lok_init_2 '%s' should be a URL, not a pathname\n", user_profile_url ); +lok_dlclose( dlhandle ); +free( imp_lib ); +return NULL; +} + free( imp_lib ); // dlhandle is "leaked" // coverity[leaked_storage] - on purpose ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 616554c36eec41f80424dd2a3c1e99d227b9eee6 Author: Tor Lillqvist AuthorDate: Thu Oct 25 15:29:26 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 15:32:38 2018 +0300 The 2nd parameter to lo_initialize() is a URL so use such naming consistently Change-Id: Id4e7f8556d6910ab43b0f7b8ba09e7be8b1ec1d1 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 85b188b15e84..a2182e9ea2a8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -4125,14 +4125,14 @@ __attribute__ ((visibility("default"))) #else SAL_DLLPUBLIC_EXPORT #endif -LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path) +LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_url) { if (!gImpl) { SAL_INFO("lok", "Create libreoffice object"); gImpl = new LibLibreOffice_Impl(); -if (!lo_initialize(gImpl, install_path, user_profile_path)) +if (!lo_initialize(gImpl, install_path, user_profile_url)) { lo_destroy(gImpl); } @@ -4151,9 +4151,9 @@ LibreOfficeKit *libreofficekit_hook(const char* install_path) } SAL_JNI_EXPORT -int lok_preinit(const char* install_path, const char* user_profile_path) +int lok_preinit(const char* install_path, const char* user_profile_url) { -return lo_initialize(nullptr, install_path, user_profile_path); +return lo_initialize(nullptr, install_path, user_profile_url); } static void lo_destroy(LibreOfficeKit* pThis) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svl sc/source svl/source sw/source
include/svl/poolitem.hxx |6 +++--- sc/source/filter/excel/xlroot.cxx |4 ++-- sc/source/ui/Accessibility/AccessibleText.cxx |4 ++-- sc/source/ui/pagedlg/tphfedit.cxx |4 ++-- sc/source/ui/unoobj/textuno.cxx |4 ++-- sc/source/ui/view/printfun.cxx|4 ++-- svl/source/items/poolitem.cxx |4 ++-- sw/source/core/doc/tblafmt.cxx|8 sw/source/uibase/app/appopt.cxx |6 ++ 9 files changed, 21 insertions(+), 23 deletions(-) New commits: commit d4dff7dc148080da437ed2e46cd08ded044e64a7 Author: Noel Grandin AuthorDate: Thu Oct 25 12:21:25 2018 +0200 Commit: Noel Grandin CommitDate: Thu Oct 25 14:25:30 2018 +0200 return std::unique_ptr from CloneSetWhich Change-Id: I709122cb8cd7c257e7eb2bd564c529689e6d555a Reviewed-on: https://gerrit.libreoffice.org/62350 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 25a5a83a2d05..6964f776c63d 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -173,10 +173,10 @@ public: virtual SvStream&Store( SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const = 0; // clone and call SetWhich -SfxPoolItem* CloneSetWhich( sal_uInt16 nNewWhich ) const; -template T* CloneSetWhich( TypedWhichId nId ) const +std::unique_ptr CloneSetWhich( sal_uInt16 nNewWhich ) const; +template std::unique_ptr CloneSetWhich( TypedWhichId nId ) const { -return static_cast(CloneSetWhich(sal_uInt16(nId))); +return std::unique_ptr(static_cast(CloneSetWhich(sal_uInt16(nId)).release())); } sal_uInt32 GetRefCount() const { return m_nRefCount; } diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index c114d859a54e..358e89b89333 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -392,9 +392,9 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const // FillToEditItemSet() adjusts font height to 1/100th mm, we need twips std::unique_ptr pNewItem( aItemSet.Get( ATTR_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT)); pEditSet->Put( *pNewItem ); -pNewItem.reset( aItemSet.Get( ATTR_CJK_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK)); +pNewItem = aItemSet.Get( ATTR_CJK_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK); pEditSet->Put( *pNewItem ); -pNewItem.reset( aItemSet.Get( ATTR_CTL_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL)); +pNewItem = aItemSet.Get( ATTR_CTL_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL); pEditSet->Put( *pNewItem ); rEE.SetDefaults( pEditSet );// takes ownership } diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 33ee6abac74a..54b254dc3d03 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -1139,9 +1139,9 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder() // but for header/footer twips is needed, as in the PatternAttr: std::unique_ptr pNewItem(rPattern.GetItem(ATTR_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT)); aDefaults.Put( *pNewItem ); - pNewItem.reset(rPattern.GetItem(ATTR_CJK_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK)); +pNewItem = rPattern.GetItem(ATTR_CJK_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK); aDefaults.Put( *pNewItem ); - pNewItem.reset(rPattern.GetItem(ATTR_CTL_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL)); +pNewItem = rPattern.GetItem(ATTR_CTL_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL); aDefaults.Put( *pNewItem ); aDefaults.Put( SvxAdjustItem( meAdjust, EE_PARA_JUST ) ); pHdrEngine->SetDefaults( aDefaults ); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index fbb75dfacfe7..d55e0d5fc359 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -163,9 +163,9 @@ void ScEditWindow::SetFont( const ScPatternAttr& rPattern ) // but for header/footer twips is needed, as in the PatternAttr: std::unique_ptr pNewItem(rPattern.GetItem(ATTR_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT)); pSet->Put( *pNewItem ); - pNewItem.reset(rPattern.GetItem(ATTR_CJK_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK)); +pNewItem = rPattern.GetItem(ATTR_CJK_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK); pSet->Put( *pNewItem ); - pNewItem.reset(rPattern.GetItem(ATTR_CTL_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL)); +pNewItem = rPattern.GetItem(ATTR_CTL_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHE
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - extensions.lst
extensions.lst |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit c99df356e93c9eae79eabf1062a1dabf033d1e15 Author: Matthias Seidel AuthorDate: Thu Oct 25 10:49:03 2018 + Commit: Matthias Seidel CommitDate: Thu Oct 25 10:49:03 2018 + Update English dictionary diff --git a/extensions.lst b/extensions.lst index 9ef3c50a5bec..65d12e2d913f 100644 --- a/extensions.lst +++ b/extensions.lst @@ -25,7 +25,7 @@ # file:// URLs are interpreted relative to the solver/420//bin/ directory to which # built extensions are delivered by default. -# https:// URLs can be prefixed by an MD5 checksum. If that is present then it is an error if +# https:// URLs can be prefixed by an MD5 checksum. If that is present then it is an error if # the file pointed to by the URL has a different MD5 checksum. # When the downloaded file name is not the last part of the URL (everything after the final /) then # the name has to be specified after the URL enclosed in double quotes. In this case, use a @@ -73,7 +73,7 @@ # English dictionary [ language=en.* || language=de || language=it ] -415776b805d9828db0980397bca72b60 https://sourceforge.net/projects/aoo-extensions/files/17102/43/dict-en-20180901.oxt/download "dict-en.oxt" +89b86d3a0c237b9aec88a9c7f9e33fda https://sourceforge.net/projects/aoo-extensions/files/17102/44/dict-en-20181101.oxt/download "dict-en.oxt" # English (USA, en_US) dictionary [ language==nl || language==ru ] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win
include/vcl/outdev.hxx |2 +- include/vcl/vcllayout.hxx|5 - vcl/inc/sallayout.hxx| 24 +--- vcl/qt5/Qt5Graphics_Text.cxx |6 +++--- vcl/quartz/salgdi.cxx|7 +++ vcl/source/gdi/pdfwriter_impl.cxx|4 ++-- vcl/source/gdi/sallayout.cxx | 18 +- vcl/source/outdev/font.cxx |7 +++ vcl/unx/generic/gdi/cairotextrender.cxx |8 vcl/unx/generic/print/genpspgraphics.cxx |8 vcl/win/gdi/winlayout.cxx|4 ++-- 11 files changed, 40 insertions(+), 53 deletions(-) New commits: commit dd16804e52984ded1ee739a22822daa068a13707 Author: Jan-Marek Glogowski AuthorDate: Sun Sep 30 16:10:58 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Thu Oct 25 14:02:32 2018 +0200 Drop duplicate PhysicalFontFace reference A LogicalFontInstance has a pointer to its parent font face. And don't pretend we can actually nest MultiSalLayout, so store the GenericSalLayout internally. Change-Id: I801acbc34497fc57e8e185eee34c1a1162dbea93 Reviewed-on: https://gerrit.libreoffice.org/62314 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 04bd178ed300..fe7507213256 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1345,7 +1345,7 @@ public: ImplGlyphFallbackLayout( std::unique_ptr, ImplLayoutArgs& ) const; // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI SAL_DLLPRIVATE std::unique_ptr -getFallbackFont( +getFallbackLayout( LogicalFontInstance* pLogicalFont, int nFallbackLevel, ImplLayoutArgs& rLayoutArgs) const; diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx index fad06ef4646c..ebd8c24ea401 100644 --- a/include/vcl/vcllayout.hxx +++ b/include/vcl/vcllayout.hxx @@ -152,11 +152,6 @@ public: virtual boolGetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const; virtual boolGetBoundRect( SalGraphics&, tools::Rectangle& ) const; -// used by glyph+font+script fallback -virtual voidMoveGlyph( int nStart, long nNewXPos ) = 0; -virtual voidDropGlyph( int nStart ) = 0; -virtual voidSimplify( bool bIsBase ) = 0; - virtual std::shared_ptr CreateTextLayoutCache(OUString const&) const; virtual const SalLayoutGlyphs* GetGlyphs() const; diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index a9dc45b78d44..0cbe025ea290 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -44,6 +44,7 @@ class SalGraphics; class PhysicalFontFace; +class GenericSalLayout; struct GlyphItem; enum class SalLayoutFlags; namespace vcl { @@ -137,8 +138,7 @@ public: // used only by OutputDevice::ImplLayout, TODO: make friend explicitMultiSalLayout( std::unique_ptr pBaseLayout ); -voidAddFallback( std::unique_ptr pFallbackLayout, - ImplLayoutRuns const &, const PhysicalFontFace* pFallbackFont ); +voidAddFallback(std::unique_ptr pFallbackLayout, ImplLayoutRuns const &); boolLayoutText(ImplLayoutArgs&, const SalLayoutGlyphs*) override; voidAdjustLayout(ImplLayoutArgs&) override; voidInitFont() const override; @@ -149,17 +149,10 @@ public: virtual ~MultiSalLayout() override; private: -// dummy implementations -voidMoveGlyph(int, long) override {} -voidDropGlyph(int) override {} -voidSimplify(bool) override {} - MultiSalLayout( const MultiSalLayout& ) = delete; MultiSalLayout& operator=( const MultiSalLayout& ) = delete; -private: -std::unique_ptr mpLayouts[ MAX_FALLBACK ]; -const PhysicalFontFace* mpFallbackFonts[ MAX_FALLBACK ]; +std::unique_ptr mpLayouts[ MAX_FALLBACK ]; ImplLayoutRuns maFallbackRuns[ MAX_FALLBACK ]; int mnLevel; boolmbIncomplete; @@ -167,6 +160,8 @@ private: class VCL_PLUGIN_PUBLIC GenericSalLayout : public SalLayout { +friend void MultiSalLayout::AdjustLayout(ImplLayoutArgs&); + public: GenericSalLayout(LogicalFontInstance&); ~GenericSalLayout() override; @@ -191,13 +186,12 @@ public: boolGetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, const PhysicalFontFace** pFallbackFont = nullptr) const final override; -protected: +private: // for glyph+font+script fallback -voidMoveGlyph(int nStart, long nNewXPos) final override; -voidDr
[Libreoffice-commits] core.git: xmlscript/source
xmlscript/source/xmllib_imexp/xmllib_import.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 655e3bd9a880a8bf3a1f9d3514e64d0da3d36b8a Author: Andrea Gelmini AuthorDate: Thu Oct 25 10:11:54 2018 +0200 Commit: Julien Nabet CommitDate: Thu Oct 25 13:51:38 2018 +0200 Fix typo Change-Id: I7c5603468f5ee7f7e33940d7b3787318c307acfa Reviewed-on: https://gerrit.libreoffice.org/62343 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx index 2adea0c01cea..59bc6ad64d0c 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx @@ -176,7 +176,7 @@ Reference< xml::input::XElement > LibrariesElement::startChildElement( } else { -throw xml::sax::SAXException( "expected styles ot bulletinboard element!", Reference< XInterface >(), Any() ); +throw xml::sax::SAXException( "expected styles of bulletinboard element!", Reference< XInterface >(), Any() ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/vcl sw/source sw/uiconfig vcl/source vcl/unx
include/vcl/weld.hxx|1 sw/source/ui/index/cnttab.cxx | 142 ++-- sw/source/uibase/inc/swuicnttab.hxx | 33 +++ sw/uiconfig/swriter/ui/tocstylespage.ui | 96 ++--- vcl/source/app/salvtables.cxx |5 + vcl/unx/gtk3/gtk3gtkinst.cxx| 55 6 files changed, 191 insertions(+), 141 deletions(-) New commits: commit ce155a8943bdd8cfa8e32e38fc83160df25beee1 Author: Caolán McNamara AuthorDate: Thu Oct 25 10:02:34 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 13:23:20 2018 +0200 weld SwTOXStylesTabPage Change-Id: I1e7056ef8293ddc7072e95ee248e45b2785d1234 Reviewed-on: https://gerrit.libreoffice.org/62347 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 ebf796a55cdd..7fcd7b884a52 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -429,6 +429,7 @@ public: void unselect_all() { select(-1); } virtual int n_children() const = 0; +virtual void make_sorted() = 0; virtual void clear() = 0; virtual int get_height_rows(int nRows) const = 0; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index ca883f1876bd..6764592ad64b 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3609,44 +3609,31 @@ sal_uInt32 SwTokenWindow::GetControlIndex(FormTokenType eType) const return nIndex; } -SwTOXStylesTabPage::SwTOXStylesTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet ) -: SfxTabPage(pParent, "TocStylesPage", -"modules/swriter/ui/tocstylespage.ui", &rAttrSet) -{ -get(m_pLevelLB, "levels"); -get(m_pAssignBT, "assign"); -get(m_pParaLayLB, "styles"); -m_pParaLayLB->SetStyle(m_pParaLayLB->GetStyle() | WB_SORT); -get(m_pStdBT, "default"); -get(m_pEditStyleBT, "edit"); -long nHeight = m_pLevelLB->GetTextHeight() * 16; -m_pLevelLB->set_height_request(nHeight); -m_pParaLayLB->set_height_request(nHeight); +SwTOXStylesTabPage::SwTOXStylesTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet) +: SfxTabPage(pParent, "modules/swriter/ui/tocstylespage.ui", "TocStylesPage", &rAttrSet) +, m_xLevelLB(m_xBuilder->weld_tree_view("levels")) +, m_xAssignBT(m_xBuilder->weld_button("assign")) +, m_xParaLayLB(m_xBuilder->weld_tree_view("styles")) +, m_xStdBT(m_xBuilder->weld_button("default")) +, m_xEditStyleBT(m_xBuilder->weld_button("edit")) +{ +m_xParaLayLB->make_sorted(); +auto nHeight = m_xLevelLB->get_height_rows(16); +m_xLevelLB->set_size_request(-1, nHeight); +m_xParaLayLB->set_size_request(-1, nHeight); SetExchangeSupport(); -m_pEditStyleBT->SetClickHdl (LINK( this, SwTOXStylesTabPage, EditStyleHdl)); -m_pAssignBT->SetClickHdl (LINK( this, SwTOXStylesTabPage, AssignHdl)); -m_pStdBT->SetClickHdl (LINK( this, SwTOXStylesTabPage, StdHdl)); -m_pParaLayLB->SetSelectHdl(LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); -m_pLevelLB->SetSelectHdl(LINK(this, SwTOXStylesTabPage, EnableSelectHdl)); -m_pParaLayLB->SetDoubleClickHdl(LINK( this, SwTOXStylesTabPage, DoubleClickHdl)); +m_xEditStyleBT->connect_clicked(LINK(this, SwTOXStylesTabPage, EditStyleHdl)); +m_xAssignBT->connect_clicked(LINK(this, SwTOXStylesTabPage, AssignHdl)); +m_xStdBT->connect_clicked(LINK(this, SwTOXStylesTabPage, StdHdl)); +m_xParaLayLB->connect_changed(LINK(this, SwTOXStylesTabPage, EnableSelectHdl)); +m_xLevelLB->connect_changed(LINK(this, SwTOXStylesTabPage, EnableSelectHdl)); +m_xParaLayLB->connect_row_activated(LINK(this, SwTOXStylesTabPage, DoubleClickHdl)); } SwTOXStylesTabPage::~SwTOXStylesTabPage() { -disposeOnce(); -} - -void SwTOXStylesTabPage::dispose() -{ -m_pCurrentForm.reset(); -m_pLevelLB.clear(); -m_pAssignBT.clear(); -m_pParaLayLB.clear(); -m_pStdBT.clear(); -m_pEditStyleBT.clear(); -SfxTabPage::dispose(); } bool SwTOXStylesTabPage::FillItemSet( SfxItemSet* ) @@ -3662,15 +3649,14 @@ void SwTOXStylesTabPage::Reset( const SfxItemSet* rSet ) void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) { m_pCurrentForm.reset(new SwForm(GetForm())); -m_pParaLayLB->Clear(); -m_pLevelLB->Clear(); // not hyperlink for user directories - const sal_uInt16 nSize = m_pCurrentForm->GetFormMax(); // display form pattern without title +m_xLevelLB->freeze(); +m_xLevelLB->clear(); // display 1st TemplateEntry OUString aStr( SwResId( STR_TITLE )); if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() ) @@ -3679,7 +3665,7 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) + m_pCurrentForm->GetTemplate( 0 ) + OUStringLiteral1(aDeliEnd); } -m_pLevelLB->InsertEntry(aStr); +m_xLevelLB
[Libreoffice-commits] core.git: external/hunspell
external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-and-an.patch | 13 +- 1 file changed, 7 insertions(+), 6 deletions(-) New commits: commit 749ef30c823e595f42e9844fb438441250389a0a Author: Stephan Bergmann AuthorDate: Thu Oct 25 10:18:03 2018 +0200 Commit: Stephan Bergmann CommitDate: Thu Oct 25 13:21:37 2018 +0200 Fix external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-... ...introduced with b691e5824a6346d2fe7f702b5280b56532a2f89e "tdf#118162 spell checking: fix freezing and add missing OCONV", leaving HunspellImpl::suggest_internal's newly introduced out-parameters uninitialized when the function returns early, causing HunspellImpl::suggest to use capwords uninitialized, as seen when invoking spell-checking in LO built with UBSan: > hunspell.cxx:907:7: runtime error: load of value 160, which is not a valid value for type 'bool' > #0 in HunspellImpl::suggest(std::__cxx11::basic_string, std::allocator > const&) at workdir/UnpackedTarball/hunspell/src/hunspell/hunspell.cxx:907:7 (instdir/program/../program/libspelllo.so +0x288ccd) > #1 in Hunspell::suggest(std::__cxx11::basic_string, std::allocator > const&) at workdir/UnpackedTarball/hunspell/src/hunspell/hunspell.cxx:888:18 (instdir/program/../program/libspelllo.so +0x288693) > #2 in SpellChecker::GetProposals(rtl::OUString const&, com::sun::star::lang::Locale const&) at lingucomponent/source/spellcheck/spell/sspellimp.cxx:467:56 (instdir/program/../program/libspelllo.so +0x202913) > #3 in SpellChecker::spell(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at lingucomponent/source/spellcheck/spell/sspellimp.cxx:520:17 (instdir/program/../program/libspelllo.so +0x203b84) > #4 in non-virtual thunk to SpellChecker::spell(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at lingucomponent/source/spellcheck/spell/sspellimp.cxx (instdir/program/../program/libspelllo.so +0x203e62) > #5 in SpellCheckerDispatcher::spell_Impl(rtl::OUString const&, o3tl::strong_int, com::sun::star::uno::Sequence const&) at linguistic/source/spelldsp.cxx:484:44 (instdir/program/liblnglo.so +0x672505) > #6 in SpellCheckerDispatcher::spell(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at linguistic/source/spelldsp.cxx:227:12 (instdir/program/liblnglo.so +0x670040) > #7 in SpellCheckerDispatcher::spell(rtl::OUString const&, short, com::sun::star::uno::Sequence const&) at linguistic/source/spelldsp.cxx:768:12 (instdir/program/liblnglo.so +0x67b353) > #8 in non-virtual thunk to SpellCheckerDispatcher::spell(rtl::OUString const&, short, com::sun::star::uno::Sequence const&) at linguistic/source/spelldsp.cxx (instdir/program/liblnglo.so +0x67b538) > #9 in Thesaurus::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at lingucomponent/source/thesaurus/libnth/nthesimp.cxx:433:27 (instdir/program/../program/liblnthlo.so +0x88315) > #10 in non-virtual thunk to Thesaurus::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at lingucomponent/source/thesaurus/libnth/nthesimp.cxx (instdir/program/../program/liblnthlo.so +0x8a322) > #11 in ThesaurusDispatcher::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at linguistic/source/thesdsp.cxx:181:40 (instdir/program/liblnglo.so +0x6b6fa5) > #12 in non-virtual thunk to ThesaurusDispatcher::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence const&) at linguistic/source/thesdsp.cxx (instdir/program/liblnglo.so +0x6b7ca2) > #13 in ThesaurusMenuController::getMeanings(std::__debug::vector >&, rtl::OUString const&, com::sun::star::lang::Locale const&, unsigned long) at framework/source/uielement/thesaurusmenucontroller.cxx:117:31 (instdir/program/../program/libfwklo.so +0x1be1a9a) > #14 in ThesaurusMenuController::fillPopupMenu() at framework/source/uielement/thesaurusmenucontroller.cxx:75:5 (instdir/program/../program/libfwklo.so +0x1bdf973) > #15 in ThesaurusMenuController::statusChanged(com::sun::star::frame::FeatureStateEvent const&) at framework/source/uielement/thesaurusmenucontroller.cxx:63:9 (instdir/program/../program/libfwklo.so +0x1bdf24d) > #16 in SfxDispatchController_Impl::addStatusListener(com::sun::star::uno::Reference const&, com::sun::star::util::URL const&) at sfx2/source/control/unoctitm.cxx:861:16 (instdir/program/libsfxlo.so +0x2b6851f) > #17 in SfxOfficeDispatch::addStatusListener(com::sun::star::uno::Reference const&, com::sun::star::util::URL const&) at sfx2/source/control/unoctitm.cxx:249:16 (instdir/program/libsf
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/indexentry.ui | 868 +-- 1 file changed, 434 insertions(+), 434 deletions(-) New commits: commit 01679ba1373f1d1439d7bd5c350d48831a06ce84 Author: Caolán McNamara AuthorDate: Thu Oct 25 10:31:02 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 13:13:04 2018 +0200 re-orient insert index entry to have action buttons at the bottom Change-Id: Id383ef7eaab9b48c93ced12277f1676a01a6da84 Reviewed-on: https://gerrit.libreoffice.org/62349 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/uiconfig/swriter/ui/indexentry.ui b/sw/uiconfig/swriter/ui/indexentry.ui index 64df0d07c33f..8d057c4760fd 100644 --- a/sw/uiconfig/swriter/ui/indexentry.ui +++ b/sw/uiconfig/swriter/ui/indexentry.ui @@ -1,5 +1,5 @@ - + @@ -45,23 +45,25 @@ 6 Insert Index Entry dialog + + + False +vertical 12 False -vertical -start +end - -Insert + +gtk-close +True True -True -True True -True +True False @@ -70,13 +72,11 @@ - -gtk-ok + +gtk-delete +True True -True -True True -True True @@ -86,12 +86,13 @@ - -gtk-close -True + +Insert True +True +True True -True +True False @@ -100,11 +101,13 @@ - -gtk-help -True + +gtk-ok True +True +True True +True True @@ -114,8 +117,8 @@ - -gtk-delete + +gtk-help True True True @@ -125,78 +128,6 @@ False True 4 - - - - -True -False -True -True -6 -True -True - - -True -True -True -center -center -image2 - - -0 -1 - - - - -True -True -True -center -center -image3 - - -1 -1 - - - - -True -True -True -center -center -image4 - - -0 -0 - - - - -True -True -True -center -center -image5 - - -1 -0 - - - - -True -True -5 True @@ -221,369 +152,438 @@ 6 12 - + True False -start -6 -6 - - -True -False -6 -Index -True -typecb -0 - - -0 -0 -
[Libreoffice-commits] core.git: drawinglayer/qa drawinglayer/source include/drawinglayer include/svx svx/source sw/source
drawinglayer/qa/unit/border.cxx| 13 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx | 84 - drawinglayer/source/processor2d/vclpixelprocessor2d.cxx| 25 + include/drawinglayer/primitive2d/borderlineprimitive2d.hxx | 20 - include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx | 22 + svx/source/dialog/framelinkarray.cxx |3 svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx | 215 +++-- sw/source/core/layout/paintfrm.cxx |6 8 files changed, 253 insertions(+), 135 deletions(-) New commits: commit 313392119522c21a6ecd14403d6f92c948149df7 Author: Armin Le Grand AuthorDate: Thu Oct 25 10:06:05 2018 +0200 Commit: Armin Le Grand CommitDate: Thu Oct 25 12:43:55 2018 +0200 Reorganize FrameBorderPrimitive creation (II) Step5: Move the view-dependent decomposition from BorderLinePrimitive2D to SdrFrameBorderPrimitive2D. It is now possible to use discrete sizes before the line and edge matching is done what will look much better. When it was done at BorderLinePrimitive2D and the matching was already done, that match was 'displaced' with the adapted forced scale to discrete units. The space and size used when zooming out for a single discrete unit (pixel) can heavily vary - it just covers a much larger logical area than the 'real' line/poly would do. All this needs to be handled (also for bound ranges) and can only be in a good way using primitives. Adapted to no longer do view-dependent changes in BorderLinePrimitive2D. Adapted to do these now at SdrFrameBorderPrimitive2D. Currently used to force the existing border partial lines (up to three) to not get taller than one logical unit. Adapted to no longer switch off AntiAliased rendering in VclPixelProcessor2D for processBorderLinePrimitive2D, this is problematic with various renderers on various systems (e.g. vcl still falls back to render multiple one-pixel-lines when taller than 3.5 pixels which looks horrible combined with other parts like filled polygons) All this needs fine balancing on - all systems - all renderers - all apps (which all have their own table implementation) - all render targets (pixel/PDF/print/slideshow/...) Done as thorough as possible, but may need additional finetuning. May also be a motivation to move away from vcl and implement these urgetly needed system-dependent primitive renderers... Adapted UnitTest testDoublePixelProcessing with the needed comments. Change-Id: Ie88bb76c2474b6ab3764d45a9cd1669264492acd Reviewed-on: https://gerrit.libreoffice.org/62344 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx index 365c90d1691f..30d278a91560 100644 --- a/drawinglayer/qa/unit/border.cxx +++ b/drawinglayer/qa/unit/border.cxx @@ -189,7 +189,7 @@ void DrawinglayerBorderTest::testDoublePixelProcessing() { auto pMPLAction = static_cast(pAction); -if (0 == pMPLAction->GetLineInfo().GetWidth() && LineStyle::Solid == pMPLAction->GetLineInfo().GetStyle()) +if (0 != pMPLAction->GetLineInfo().GetWidth() && LineStyle::Solid == pMPLAction->GetLineInfo().GetStyle()) { nPolyLineActionCount++; } @@ -198,7 +198,16 @@ void DrawinglayerBorderTest::testDoublePixelProcessing() // Check if all eight (2x four) simple lines with width == 0 and // solid were created -const sal_uInt32 nExpectedNumPolyLineActions = 8; +// +// This has changed: Now, just the needed 'real' lines get created +// which have a width of 1. This are two lines. The former multiple +// lines were a combination of view-dependent force to a single-pixel +// line width (0 == lineWidth -> hairline) and vcl rendering this +// using a (insane) combination of single non-AAed lines. All the +// system-dependent part of the BorderLine stuff is now done in +// SdrFrameBorderPrimitive2D and svx. +// Adapted this test - still useful, breaking it may be a hint :-) +const sal_uInt32 nExpectedNumPolyLineActions = 2; CPPUNIT_ASSERT_EQUAL(nExpectedNumPolyLineActions, nPolyLineActionCount); } diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 4c7bf9743628..e23a48921dc6 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -76,18 +76,6 @@ namespace drawinglayer && isGap() == rBorderLine.isGap(); } -double BorderLine::getAdaptedWidth(double fMinWidth) const -{ -if(isGap()) -{ -return std
[Libreoffice-commits] core.git: formula/inc include/formula sc/inc sc/qa sc/source
formula/inc/core_resource.hrc|6 +++ include/formula/compiler.hxx |3 + include/formula/opcode.hxx |2 + sc/inc/helpids.h |1 sc/inc/scfuncs.hrc | 12 +++ sc/qa/unit/ucalc.cxx |1 sc/source/core/data/funcdesc.cxx |3 + sc/source/core/inc/interpre.hxx |1 sc/source/core/tool/interpr1.cxx | 55 +++ sc/source/core/tool/interpr4.cxx |1 sc/source/filter/excel/xlformula.cxx |3 + sc/source/filter/oox/formulabase.cxx |3 + 12 files changed, 87 insertions(+), 4 deletions(-) New commits: commit 8dec85a3b3f4cbd46b03f707458347a25cc22c15 Author: Eike Rathke AuthorDate: Wed Oct 24 19:42:35 2018 +0200 Commit: Eike Rathke CommitDate: Thu Oct 25 12:13:58 2018 +0200 Resolves: tdf#113977 implement REGEX() spreadsheet function REGEX( Text ; Expression [ ; Replacement ] ) Using ICU regular expressions http://userguide.icu-project.org/strings/regexp Change-Id: I4cb9b8ba77cfb5b8faab93037aa0d947609383d7 Reviewed-on: https://gerrit.libreoffice.org/62332 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index 467a64bdf3f0..4cc928fd9a6a 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -465,6 +465,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "COM.MICROSOFT.ENCODEURL" , SC_OPCODE_ENCODEURL }, { "ORG.LIBREOFFICE.RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT }, { "ORG.LIBREOFFICE.ROUNDSIG" , SC_OPCODE_ROUNDSIG }, +{ "ORG.LIBREOFFICE.REGEX" , SC_OPCODE_REGEX }, { nullptr, -1 } }; @@ -907,6 +908,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "_xlfn.ENCODEURL" , SC_OPCODE_ENCODEURL }, { "_xlfn.ORG.LIBREOFFICE.RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT }, { "_xlfn.ORG.LIBREOFFICE.ROUNDSIG" , SC_OPCODE_ROUNDSIG }, +{ "_xlfn.ORG.LIBREOFFICE.REGEX" , SC_OPCODE_REGEX }, { nullptr, -1 } }; @@ -1354,6 +1356,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "ENCODEURL" , SC_OPCODE_ENCODEURL }, { "RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT }, { "ROUNDSIG" , SC_OPCODE_ROUNDSIG }, +{ "REGEX" , SC_OPCODE_REGEX }, { nullptr, -1 } }; @@ -1800,6 +1803,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "ENCODEURL" , SC_OPCODE_ENCODEURL }, { "RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT }, { "ROUNDSIG" , SC_OPCODE_ROUNDSIG }, +{ "REGEX" , SC_OPCODE_REGEX }, { nullptr, -1 } }; @@ -2245,6 +2249,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "ENCODEURL" , SC_OPCODE_ENCODEURL }, { "RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT }, { "ROUNDSIG" , SC_OPCODE_ROUNDSIG }, +{ "REGEX" , SC_OPCODE_REGEX }, { nullptr, -1 } }; @@ -2674,6 +2679,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "ROUNDSIG") , SC_OPCODE_ROUNDSIG }, { NC_("RID_STRLIST_FUNCTION_NAMES", "FINDB") , SC_OPCODE_FINDB }, { NC_("RID_STRLIST_FUNCTION_NAMES", "SEARCHB") , SC_OPCODE_SEARCHB }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "REGEX") , SC_OPCODE_REGEX }, { nullptr, -1 } }; diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx index 0d5b1cc8f632..09a507fc3d68 100644 --- a/include/formula/compiler.hxx +++ b/include/formula/compiler.hxx @@ -505,7 +505,8 @@ #define SC_OPCODE_REPLACEB 494 #define SC_OPCODE_FINDB 495 #define SC_OPCODE_SEARCHB 496 -#define SC_OPCODE_STOP_2_PAR497 /* last function with two or more parameters' OpCode + 1 */ +#define SC_OPCODE_REGEX 497 +#define SC_OPCODE_STOP_2_PAR498 /* last function with two or more parameters' OpCode + 1 */ #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR/* last function's OpCode + 1 */ #define SC_OPCODE_LAST_OPCODE_ID(SC_OPCODE_STOP_FUNCTION - 1) /* last OpCode */ diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx index 437403d919b2..d2c6548e286f 100644 --- a/include/formula/opcode.hxx +++ b/include/formula/opcode.hxx @@ -343,6 +343,7 @@ enum OpCode : sal_uInt16 ocFindB = SC_OPCODE_FINDB, ocSearchB = SC_OPCODE_SEARCHB, ocNumberValue = SC_OPCODE_NUMBERVALUE, +ocRegex = SC_OPCODE_REGEX, // Matrix functions ocMatValue = SC_OPCODE_MAT_VALUE, ocMatDet= SC_OPCODE_MAT_DET, @@ -808,6 +809,7 @@ inline std::string OpCodeEnumToString(OpCode eCode) case ocText: return "Text"; case ocSubstitute: return "Substitute"; case ocRept: return "Rept"; +case ocRegex: return "Regex"; case ocConcat: return "Concat"; case ocConcat_MS: return "Concat_MS"; case ocTextJoin_MS: return "TextJoin_MS"
[Libreoffice-commits] core.git: svx/source
svx/source/fmcomp/gridcell.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ae081cc1137fc0f41612504994d58fe0d9c0a7fc Author: Noel Grandin AuthorDate: Thu Oct 25 11:09:58 2018 +0200 Commit: Noel Grandin CommitDate: Thu Oct 25 12:07:39 2018 +0200 tdf#120830 crash opening Form-Based Filters regression from commit 7469e078dc3a7a891bd7f5c44a693e4421d3bcdd loplugin:useuniqueptr in FmXGridCell Change-Id: Ia74fcb518fe568d702101ff088f30dc8c096528f Reviewed-on: https://gerrit.libreoffice.org/62346 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index ae0690c23c4f..3231452d8434 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -4528,7 +4528,7 @@ FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, std::unique_ptrSetCommitHdl( LINK( this, FmXFilterCell, OnCommit ) ); +static_cast(m_pCellControl.get())->SetCommitHdl( LINK( this, FmXFilterCell, OnCommit ) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Minutes from the UX/design meeting 2018-Oct-24
Present: Stuart, Heiko, (Rizal, Adolfo, Cor) * Indentation on headings changes the level + https://bugs.documentfoundation.org/show_bug.cgi?id=93495 + convenience feature (html style) or bug (pure indentation) + WFM, because of familiar behavior and not supporting direct formatting (Cor) + Heading is kind of a special paragraph style and confuses users, so pro the request (Heiko) + agreeing with Cor; heading is rather not a paragraph style = WFM (Stuart) + lists works similarly and change the level on indentation => WFM (2:1, as long no other opinion comes in) * Grid lines + blue color https://bugs.documentfoundation.org/show_bug.cgi?id=85450 + dark grey https://bugs.documentfoundation.org/show_bug.cgi?id=117348 + https://gerrit.libreoffice.org/#/c/62025/ + use lines (zoomable plus) instead of dots https://listarchives.libreoffice.org/global/design/msg08925.html + Loving this ^. Perhaps the plus should be ¶-blue, for better contrast (and as a compromise of both color ideas)? (Adolfo) + and/or independently from zoom + make color optional? + (patch submitted meanwhile) => file new tickets for a) optional color, b) optional static grid with dots depending on screen resolution (see also night mode) rather than canvas distance (we should take care of jumping issues in relation to the anchors), c) have a symbol (plus) indicator instead the dot * Special Characters dialog expand Favorites and Recents bar counts beyond current max of 16 + https://bugs.documentfoundation.org/show_bug.cgi?id=120753 + I'd love a horizontally-scrolling, single-row list of recent chars, with a maximum of at least 36 (Adolfo) + heavy use of special characters in some languages + often final character is being combined by two characters + edit bar has been removed, which was used for this before (Stuart) + many items at once are bad usability for most western users + an option to increase the number for recently used/favorites is acceptable (Heiko) + predefined items should be provided by l10n teams (Stuart) => make the number of rows (Recent & Favorite) an option defaulting to 1 (16 or 24) (as today) => moved doing localization of Favorites to an "Expert" mode to a new ticket * Table protected cells: Add possibility to disable warning message + https://bugs.documentfoundation.org/show_bug.cgi?id=120726 + tend to disagree as Calc works similarly (Heiko) => postponed * Undo and redo enhancement + https://bugs.documentfoundation.org/show_bug.cgi?id=120809 + MS Office handles this better: it usually gets chunks of ~3 words as I type; ideally LO should detect clauses (Adolfo) => postponed signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sc/source
sc/source/ui/app/transobj.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 1b9574ed8269f4ed9dde33856c1d74702a7fa4bb Author: Vasily Melenchuk AuthorDate: Wed Oct 24 13:13:41 2018 +0200 Commit: Thorsten Behrens CommitDate: Thu Oct 25 11:26:11 2018 +0200 tdf#118747 sc: use manual height for previous rows in TransferObj This can ensure, that visible area will not shift if autoheight will change height of previous rows. Change-Id: I66e013e9f3f27396f13b26fde37353cb63e47258 Reviewed-on: https://gerrit.libreoffice.org/62279 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 047ca19f92a8..483832bac4a3 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -693,6 +693,12 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize) else rDestDoc.SetColWidth( nCol, 0, m_pDoc->GetColWidth( nCol, nSrcTab ) ); +if (nStartY > 0) +{ +// Set manual height for all previous rows so we can ensure +// that visible area will not change due to autoheight +rDestDoc.SetManualHeight(0, nStartY - 1, 0, true); +} for (SCROW nRow = nStartY; nRow <= nEndY; ++nRow) { if ( m_pDoc->RowHidden(nRow, nSrcTab) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/find-unneeded-includes sw/inc sw/IwyuFilter_sw.yaml sw/source
bin/find-unneeded-includes|3 +++ sw/IwyuFilter_sw.yaml | 12 sw/inc/calbck.hxx |5 +++-- sw/inc/cellatr.hxx|1 + sw/inc/charfmt.hxx|1 + sw/inc/dbgoutsw.hxx |1 - sw/inc/dbmgr.hxx |3 --- sw/inc/dcontact.hxx |1 - sw/inc/docary.hxx |1 - sw/inc/docsh.hxx |4 ++-- sw/inc/fldbas.hxx |1 + sw/inc/fmtcol.hxx |1 + sw/inc/frmfmt.hxx |1 + sw/inc/hhcwrp.hxx |1 - sw/inc/ndgrf.hxx |1 - sw/inc/swmodule.hxx |2 +- sw/inc/txtftn.hxx |3 +-- sw/source/uibase/app/docsh.cxx|1 + sw/source/uibase/app/docsh2.cxx |3 ++- sw/source/uibase/app/swmodule.cxx |1 + 20 files changed, 31 insertions(+), 16 deletions(-) New commits: commit 5af524251642a43747f56c1f24c41222fd9ac69f Author: Miklos Vajna AuthorDate: Wed Oct 24 21:19:37 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 11:22:21 2018 +0200 sw: fix some IWYU warnings Change-Id: Ic7e6aa31e5c6d210101da7223a294092ab5b7481 Reviewed-on: https://gerrit.libreoffice.org/62334 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index 5d043f0da1a9..c949c887d905 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -169,6 +169,9 @@ def processIWYUOutput(iwyuOutput, moduleRules): match = re.match("- (.*;(?: })*)* // lines (.*)-.*", line) if match: fwdDecl = match.group(1) +if fwdDecl.endswith(";"): +# Remove trailing semicolon. +fwdDecl = fwdDecl[:-1] lineno = match.group(2) if not ignoreRemoval(fwdDecl, toAdd, currentFileName, moduleRules): toRemove.append("%s:%s: %s" % (currentFileName, lineno, fwdDecl)) diff --git a/sw/IwyuFilter_sw.yaml b/sw/IwyuFilter_sw.yaml index cd278aba47b6..3597e35b8f07 100644 --- a/sw/IwyuFilter_sw.yaml +++ b/sw/IwyuFilter_sw.yaml @@ -17,6 +17,8 @@ blacklist: - numrule.hxx # tox.hxx brings in SwTOXType, which is needed by SwTOXTypes, as SwVectorModifyBase's dtor wants to delete it - tox.hxx +# section.hxx brings in SwSectionFormat, which is needed by SwSectionFormats, as SwFormatsModifyBase's type param has to be complete +- section.hxx sw/inc/docfac.hxx: # Complete type is needed by rtl::Reference. - doc.hxx @@ -36,6 +38,8 @@ blacklist: - o3tl/typed_flags_set.hxx sw/inc/doc.hxx: - o3tl/deleter.hxx +sw/inc/docsh.hxx: +- o3tl/deleter.hxx sw/inc/list.hxx: - o3tl/deleter.hxx sw/inc/IDocumentLinksAdministration.hxx: @@ -56,6 +60,8 @@ blacklist: - o3tl/typed_flags_set.hxx sw/inc/undobj.hxx: - o3tl/typed_flags_set.hxx +sw/inc/itabenum.hxx: +- o3tl/typed_flags_set.hxx sw/inc/unosett.hxx: # sw::UnoImplPtr typedef - unobaseclass.hxx @@ -240,6 +246,7 @@ blacklist: - class SwUpdateAttr - class SfxBoolItem - class SvxCharSetColorItem +- class SvxColorItem # used in extern declaration - struct SfxItemInfo sw/inc/textboxhelper.hxx: @@ -252,3 +259,8 @@ blacklist: # complete type is wanted - com/sun/star/awt/XBitmap.hpp - com/sun/star/text/XTextColumns.hpp +sw/inc/pagepreviewlayout.hxx: +- vector +sw/inc/shellio.hxx: +- o3tl/deleter.hxx +- o3tl/typed_flags_set.hxx diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 08f9e254829e..d470ea12a9ac 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -20,17 +20,18 @@ #ifndef INCLUDED_SW_INC_CALBCK_HXX #define INCLUDED_SW_INC_CALBCK_HXX +#include + #include #include -#include #include "swdllapi.h" #include "ring.hxx" -#include "hintids.hxx" #include #include #include class SwModify; +class SfxPoolItem; /* SwModify and SwClient cooperate in propagating attribute changes. diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx index 62a5716c3af0..3b9de189478f 100644 --- a/sw/inc/cellatr.hxx +++ b/sw/inc/cellatr.hxx @@ -24,6 +24,7 @@ #include #include "swdllapi.h" #include "format.hxx" +#include "hintids.hxx" #include "cellfml.hxx" /** The number formatter's default locale's @ Text format. diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx index b84d31c780bc..b372de271437 100644 --- a/sw/inc/charfmt.hxx +++ b/sw/inc/charfmt.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SW_INC_CHARFMT_HXX #include "format.hxx" +#include "hintids.hxx" class SW_DLLPUBLIC SwCharFormat : public SwFormat { diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx index b32f410cc36d..28551b180666 100644 --- a/sw/inc/dbgoutsw.hxx +++ b/sw/inc/dbgoutsw.hxx @@ -41,7 +41,6 @@ class SwUndo; class SwRect;
[Libreoffice-commits] online.git: test/integration-http-server.cpp wsd/LOOLWSD.cpp
test/integration-http-server.cpp | 30 ++ wsd/LOOLWSD.cpp | 22 ++ 2 files changed, 44 insertions(+), 8 deletions(-) New commits: commit b4b0e9c6d4d649e010e7742efae670ed541f78a2 Author: Tamás Zolnai AuthorDate: Thu Oct 25 10:48:10 2018 +0200 Commit: Tamás Zolnai CommitDate: Thu Oct 25 10:48:52 2018 +0200 Handle X-Forwarded-For with more secure Check all pariticipating IPs to be allowed to use convert-to functionality. In a simple use case it means the reverse-proxy's and the actual client's IP. Change-Id: I4ef9cb14a1c3003cba6c66f6e99d5b54b2c3b2b8 diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp index ec25653c0..500a9ffdf 100644 --- a/test/integration-http-server.cpp +++ b/test/integration-http-server.cpp @@ -424,6 +424,36 @@ void HTTPServerTest::testConvertToWithForwardedClientIP() actualString = actualString.substr(3); CPPUNIT_ASSERT_EQUAL(expectedStream.str(), actualString); // <- we got the converted file } + +// Test a forwarded header with three IPs, one is not allowed -> request is denied. +{ +const std::string srcPath = FileUtil::getTempFilePath(TDOC, "hello.odt", "testConvertToWithForwardedClientIP_"); +std::unique_ptr session(helpers::createSession(_uri)); +session->setTimeout(Poco::Timespan(2, 0)); // 2 seconds. + +Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/lool/convert-to"); +CPPUNIT_ASSERT(!request.has("X-Forwarded-For")); +request.add("X-Forwarded-For", _uri.getHost() + ", " + + getNotAllowedTestServerURI().getHost() + ", " + + _uri.getHost()); +Poco::Net::HTMLForm form; +form.setEncoding(Poco::Net::HTMLForm::ENCODING_MULTIPART); +form.set("format", "txt"); +form.addPart("data", new Poco::Net::FilePartSource(srcPath)); +form.prepareSubmit(request); +form.write(session->sendRequest(request)); + +Poco::Net::HTTPResponse response; +std::stringstream actualStream; +std::istream& responseStream = session->receiveResponse(response); +Poco::StreamCopier::copyStream(responseStream, actualStream); + +// Remove the temp files. +FileUtil::removeFile(srcPath); + +std::string actualString = actualStream.str(); +CPPUNIT_ASSERT(actualString.empty()); // <- we did not get the converted file +} } CPPUNIT_TEST_SUITE_REGISTRATION(HTTPServerTest); diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index d3495e5f3..30bd1b965 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -1942,26 +1942,32 @@ public: } bool allowConvertTo(const std::string &address, const Poco::Net::HTTPRequest& request) { -std::string clientAddress = address; -std::string clientHost = request.getHost(); +std::string addressToCheck = address; +std::string hostToCheck = request.getHost(); +bool allow = allowPostFrom(addressToCheck) || StorageBase::allowedWopiHost(hostToCheck); + +// Handle forwarded header and make sure all participating IPs are allowed if(request.has("X-Forwarded-For")) { std::string fowardedData = request.get("X-Forwarded-For"); -size_t sepPos = fowardedData.find_first_of(','); -if(sepPos != std::string::npos) +std::vector tokens = LOOLProtocol::tokenize(fowardedData, ','); +for(std::string& token : tokens) { -clientAddress = fowardedData.substr(0, sepPos); +addressToCheck = Util::trim(token); try { -clientHost = Poco::Net::DNS::resolve(clientAddress).name(); +hostToCheck = Poco::Net::DNS::resolve(addressToCheck).name(); +allow &= allowPostFrom(addressToCheck) || StorageBase::allowedWopiHost(hostToCheck); } catch (const Poco::Exception& exc) { -LOG_WRN("Poco::Net::DNS::resolve(\"" << clientAddress << "\") failed: " << exc.displayText()); +LOG_WRN("Poco::Net::DNS::resolve(\"" << addressToCheck << "\") failed: " << exc.displayText()); +// We can't find out the hostname, check the IP only +allow &= allowPostFrom(addressToCheck); } } } -return allowPostFrom(clientAddress) || StorageBase::allowedWopiHost(clientHost); +return allow; } private: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/CustomTarget_kde5_moc.mk vcl/unx
vcl/CustomTarget_kde5_moc.mk |1 + vcl/unx/kde5/KDE5FilePicker.hxx |1 + vcl/unx/kde5/KDE5FilePicker2.cxx |6 ++ vcl/unx/kde5/KDE5SalInstance.cxx | 10 +- vcl/unx/kde5/KDE5SalInstance.hxx | 14 ++ 5 files changed, 27 insertions(+), 5 deletions(-) New commits: commit 8f71eb5182f7fe6d3e19705ed233f5f84a0a6208 Author: Katarina Behrens AuthorDate: Wed Oct 24 13:03:17 2018 +0200 Commit: Katarina Behrens CommitDate: Thu Oct 25 10:35:13 2018 +0200 tdf#119856 related: opening kde5 filepicker from extensions now possible certain things have to be done exclusively in main thread Change-Id: Ib9f5a3187080cd986977e323a38a1e6c2ed57366 Reviewed-on: https://gerrit.libreoffice.org/62281 Reviewed-by: Katarina Behrens Tested-by: Katarina Behrens diff --git a/vcl/CustomTarget_kde5_moc.mk b/vcl/CustomTarget_kde5_moc.mk index 5c7fea94428b..7d68658fc279 100644 --- a/vcl/CustomTarget_kde5_moc.mk +++ b/vcl/CustomTarget_kde5_moc.mk @@ -10,6 +10,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kde5)) $(call gb_CustomTarget_get_target,vcl/unx/kde5) : \ + $(call gb_CustomTarget_get_workdir,vcl/unx/kde5)/KDE5SalInstance.moc \ $(call gb_CustomTarget_get_workdir,vcl/unx/kde5)/KDE5FilePicker.moc \ $(call gb_CustomTarget_get_workdir,vcl/unx/kde5)/tst_exclude_socket_notifiers.moc \ $(call gb_CustomTarget_get_workdir,vcl/unx/kde5)/tst_exclude_posted_events.moc diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index d1a300be014c..df7d8499ecae 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -168,6 +168,7 @@ protected: bool eventFilter(QObject* watched, QEvent* event) override; Q_SIGNALS: +sal_Int16 executeSignal(); void setTitleSignal(const OUString& rTitle); void setDefaultNameSignal(const OUString& rName); void setDisplayDirectorySignal(const OUString& rDir); diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 5de295453bd8..4327d0d36256 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -106,6 +106,7 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) connect(_dialog, &QFileDialog::filterSelected, this, &KDE5FilePicker::filterChanged); connect(_dialog, &QFileDialog::fileSelected, this, &KDE5FilePicker::selectionChanged); +connect(this, &KDE5FilePicker::executeSignal, this, &KDE5FilePicker::execute); // XExecutableDialog connect(this, &KDE5FilePicker::setTitleSignal, this, &KDE5FilePicker::setTitleSlot, @@ -183,6 +184,11 @@ void SAL_CALL KDE5FilePicker::setTitle(const OUString& title) sal_Int16 SAL_CALL KDE5FilePicker::execute() { +if (qApp->thread() != QThread::currentThread()) +{ +return Q_EMIT executeSignal(); +} + if (!_filters.isEmpty()) _dialog->setNameFilters(_filters); if (!_currentFilter.isEmpty()) diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx index f190714e02da..7c8f27802147 100644 --- a/vcl/unx/kde5/KDE5SalInstance.cxx +++ b/vcl/unx/kde5/KDE5SalInstance.cxx @@ -46,6 +46,8 @@ KDE5SalInstance::KDE5SalInstance() pSVData->maAppData.mxToolkitName = OUString("kde5"); KDE5SalData::initNWF(); +connect(this, &KDE5SalInstance::createFilePickerSignal, this, +&KDE5SalInstance::createFilePicker, Qt::BlockingQueuedConnection); } SalFrame* KDE5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nState) @@ -54,8 +56,13 @@ SalFrame* KDE5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nSt } uno::Reference -KDE5SalInstance::createFilePicker(const uno::Reference& /*xMSF*/) +KDE5SalInstance::createFilePicker(const uno::Reference& xMSF) { +if (!IsMainThread()) +{ +return Q_EMIT createFilePickerSignal(xMSF); +} + return uno::Reference(new KDE5FilePicker(QFileDialog::ExistingFile)); } @@ -148,4 +155,5 @@ VCLPLUG_KDE5_PUBLIC SalInstance* create_SalInstance() } } +#include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde5/KDE5SalInstance.hxx b/vcl/unx/kde5/KDE5SalInstance.hxx index a148f6cd8073..bfc24debfe7c 100644 --- a/vcl/unx/kde5/KDE5SalInstance.hxx +++ b/vcl/unx/kde5/KDE5SalInstance.hxx @@ -20,9 +20,9 @@ #pragma once #include - #include +#include #include #include "KDE5SalFrame.hxx" @@ -31,19 +31,25 @@ class SalFrame; class KDE5SalInstance : public Qt5Instance { +Q_OBJECT public: explicit KDE5SalInstance(); virtual SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle) override; virtual bool hasNativeFileSelection() const override { return true; } -virtual css::uno::Reference -createFilePicker(const css::uno::Reference&) override; - virtual css::uno::Reference createFolderPicker(const css::uno::Reference&) override; virtual b
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - editeng/source sw/source
editeng/source/items/frmitems.cxx |3 ++- sw/source/core/unocore/unoidx.cxx |6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 18a388c696567e6ddbf8c997ee0a9a686e7d80ed Author: Michael Stahl AuthorDate: Fri Oct 12 16:37:32 2018 +0200 Commit: Michael Meeks CommitDate: Thu Oct 25 10:33:30 2018 +0200 editeng: do not throw from QueryValue implementation None of the other QueryValue throw; in case of a problem they return false without initialising the Any. On the one hand, it would be useful to throw an exception for this special property that has now become Write-Only, so that API users get a better hint what is going wrong; on the other hand, it breaks various other things like the various multi-property interfaces that call QueryValue for multiple items (there are 3 such loops in SwAccessibleParagraph alone). (throw was introduced in 7a8ed362eb163ac15a000ba1cfc74b58315800a1) It turns out there is even a test for the exception on ToX. Change-Id: Id60ff43544f7399ce869227bfd6fb933dbaea3be Reviewed-on: https://gerrit.libreoffice.org/61719 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl Signed-off-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/62331 diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index d5c2e7aea47b..e3ca3a125595 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -3316,7 +3316,8 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const case MID_GRAPHIC_URL: { -throw uno::RuntimeException("Getting from this property is not supported"); +SAL_INFO("editeng.items", "Getting GraphicURL property is not supported"); +return false; } break; case MID_GRAPHIC: diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index f2550b36fa23..76f4faf3e09b 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -886,6 +887,11 @@ SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) "Unknown property: " + rPropertyName, static_cast< cppu::OWeakObject * >(this)); } +// TODO: is this the best approach to tell API clients about the change? +if (pEntry->nWID == RES_BACKGROUND && pEntry->nMemberId == MID_GRAPHIC_URL) +{ +throw uno::RuntimeException("Getting GraphicURL property is not supported"); +} SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() ); SwTOXBase* pTOXBase = nullptr; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 54f06c0004d51db5a3ab5e339bd5b5822cdb59f6 Author: Marco A.G.Pinto AuthorDate: Thu Oct 25 08:54:39 2018 +0100 Commit: Gerrit Code Review CommitDate: Thu Oct 25 10:18:36 2018 +0200 Update git submodules * Update dictionaries from branch 'master' - Updated the English dictionaries: GB+AU+CA+US+Extension logo Change-Id: I4223020f9ead26d3497908a3160395fa7b75d9f9 Reviewed-on: https://gerrit.libreoffice.org/62340 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/dictionaries b/dictionaries index 5b81821a17bf..605e1d1441a8 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 5b81821a17bf104942b364ad7e13ab4cd8f5ec50 +Subproject commit 605e1d1441a8e0a67709b4869ecf4c651e81dfd5 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dictionaries.git: en/changelog.txt en/description.xml en/en_AU.dic en/en_CA.dic en/en_GB.aff en/en_GB.dic en/English.png en/en_US.dic en/package-description.txt en/README_en_AU.t
en/English.png |binary en/README_en_AU.txt|6 en/README_en_CA.txt|6 en/README_en_GB.txt| 88 en/README_en_US.txt|6 en/changelog.txt | 29 en/description.xml |2 en/en_AU.dic | 233 en/en_CA.dic | 233 en/en_GB.aff |7 en/en_GB.dic |20601 ++--- en/en_US.dic | 234 en/package-description.txt |8 13 files changed, 20189 insertions(+), 1264 deletions(-) New commits: commit 605e1d1441a8e0a67709b4869ecf4c651e81dfd5 Author: Marco A.G.Pinto AuthorDate: Thu Oct 25 08:54:39 2018 +0100 Commit: Andras Timar CommitDate: Thu Oct 25 10:18:36 2018 +0200 Updated the English dictionaries: GB+AU+CA+US+Extension logo Change-Id: I4223020f9ead26d3497908a3160395fa7b75d9f9 Reviewed-on: https://gerrit.libreoffice.org/62340 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/en/English.png b/en/English.png index 5e17844..13ec15f 100644 Binary files a/en/English.png and b/en/English.png differ diff --git a/en/README_en_AU.txt b/en/README_en_AU.txt index cf345f3..5b7077e 100644 --- a/en/README_en_AU.txt +++ b/en/README_en_AU.txt @@ -1,6 +1,6 @@ en_AU Hunspell Dictionary -Version 2017.08.24 -Thu Aug 24 14:36:19 2017 -0400 [2614b88] +Version 2018.04.16 +Mon Apr 16 22:11:56 2018 -0400 [7bbe293] http://wordlist.sourceforge.net README file for English Hunspell dictionaries derived from SCOWL. @@ -343,5 +343,5 @@ and Australian word list. It is under the following copyright: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Build Date: Thu Aug 24 14:39:08 EDT 2017 +Build Date: Mon Apr 16 22:14:05 EDT 2018 Wordlist Command: mk-list --accents=strip en_AU 60 diff --git a/en/README_en_CA.txt b/en/README_en_CA.txt index e8aaa5d..1248eae 100644 --- a/en/README_en_CA.txt +++ b/en/README_en_CA.txt @@ -1,6 +1,6 @@ en_CA Hunspell Dictionary -Version 2017.08.24 -Thu Aug 24 14:36:19 2017 -0400 [2614b88] +Version 2018.04.16 +Mon Apr 16 22:11:56 2018 -0400 [7bbe293] http://wordlist.sourceforge.net README file for English Hunspell dictionaries derived from SCOWL. @@ -343,5 +343,5 @@ and Australian word list. It is under the following copyright: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Build Date: Thu Aug 24 14:39:03 EDT 2017 +Build Date: Mon Apr 16 22:14:00 EDT 2018 Wordlist Command: mk-list --accents=strip en_CA 60 diff --git a/en/README_en_GB.txt b/en/README_en_GB.txt index 6a5d0b6..9bba23e 100644 --- a/en/README_en_GB.txt +++ b/en/README_en_GB.txt @@ -1,19 +1,19 @@ This dictionary was initially based on a subset of the original English wordlist created by Kevin Atkinson for -Pspell and Aspell and thus is covered by his original +Pspell and Aspell and thus is covered by his original LGPL licence. It has been extensively updated by David Bartlett, Brian Kelk, Andrew Brown and Marco A.G.Pinto: - — Numerous Americanism have been removed; + — Numerous Americanisms have been removed; — Numerous American spellings have been corrected; — Missing words have been added; — Many errors have been corrected; — Compound hyphenated words have been added where appropriate; - — Thousands of proper names have been added. + — Thousands of proper/places names have been added. Valuable inputs to this process were received from many other -people - far too numerous to name. Serious thanks to you all +people — far too numerous to name. Serious thanks to you all for your greatly appreciated help. This wordlist is intended to be a good representation of @@ -27,18 +27,18 @@ rules for MySpell and is also provided under the LGPL. In creating the affix rules an attempt has been made to reproduce the most general rules for English word -formation, rather than merely use it as a means to -compress the size of the dictionary. It is hoped that this -will facilitate future localisation to other variants of -English. +formation, rather than merely use it to compress the +size of the dictionary. It is hoped that this will +facilitate future localisation to other variants of English. --- -This is a locally hosted copy of the English dictionaries with fixed dash handling and new ligature and phonetic suggestion support extension: -http://extensions.openoffice.org/en/node/3785 +This is a locally hosted copy of the English dictionaries with fixed +dash handling and new ligature and phonetic suggestion support extension: +https://extensions.openoffice.org/en/node/3785 Original version of the en_GB dictionary: -http://www.openoffice.org/issues/show_bug.cgi/id=72145 +https://bz.apache.org/ooo/show_bug.cgi?id=72145 OpenOffice.org patch and morphological extension. @@ -48,43 +48,69 @@ created by Kevin Atkinson and released on http://wordlist.sourceforge.net. Other fixes: OOo I
Re: Cppcheck: Reduction of False Positives: Manual Approach
On 25.10.18 02:40, Luke Benes wrote: It seems many valid variableScope warnings are still being omitted. those warnings are quite dangerous anyway if naively believed, tdf#96089 was quite a pain to debug... ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/handler/Map.Keyboard.js |6 ++ 1 file changed, 6 insertions(+) New commits: commit 1e97cfc2d2a8ee3e296ddfb7a331466bede4a575 Author: Tor Lillqvist AuthorDate: Wed Oct 24 18:37:17 2018 +0300 Commit: Tor Lillqvist CommitDate: Thu Oct 25 10:06:30 2018 +0200 tdf#120438: Don't handle a lone "alt" modifier in any special way It is likely a Mac browser client simply accessing a "special character" on their keyboard. (Or an iOS browser client using a physical keyboard.) Like alt+8 to get '[' on a Swedish/Finnish Apple keyboard, or alt+shift+2 to get '€' on a US English Apple keyboard. Change-Id: I94b49d64db87324ff2a5cd5f50226d3c537b68e6 Reviewed-on: https://gerrit.libreoffice.org/62315 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index d6466e95c..607e3283e 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -302,6 +302,12 @@ L.Map.Keyboard = L.Handler.extend({ inputEle.value = ''; } + if (this.modifier == this.keyModifier.alt || this.modifier == this.keyModifier.shift + this.keyModifier.alt) { + // Presumably a Mac or iOS client accessing a "special character". Just ignore the alt modifier. + this.modifier -= alt; + alt = 0; + } + var unoKeyCode = this._toUNOKeyCode(keyCode); if (this.modifier) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - connectivity/registry svx/source
connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu | 5 +++ svx/source/fmcomp/gridcell.cxx | 13 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) New commits: commit 424454997a2a464d99c0e7125ea6b143716715b0 Author: Lionel Elie Mamane AuthorDate: Wed Oct 24 18:13:56 2018 +0200 Commit: Lionel Elie Mamane CommitDate: Thu Oct 25 10:03:23 2018 +0200 tdf#120713 correctly handle boolean values in filters This commit has two parts: - Hardcode the correct BooleanComparisonMode in the firebird-sdbc driver (this fixes on Firebird databases, among others, the AutoFilter for bools) - Generic to all DBMS, have the "form-based filter" obey the BooleanComparisonMode Change-Id: Ib14e6c3d5cb773ae1f972840f8b53062f0224396 Reviewed-on: https://gerrit.libreoffice.org/62320 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins diff --git a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu index 03896aff4412..586264183b60 100644 --- a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu +++ b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu @@ -66,6 +66,11 @@ true + + +2 + + diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 67f4b85e..a6abdc7cdc83 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3099,20 +3099,27 @@ void DbFilterField::UpdateFromField(const Reference< XColumn >& /*_rxField*/, co IMPL_LINK_NOARG(DbFilterField, OnClick, VclPtr, void) { TriState eState = static_cast(m_pWindow.get())->GetBox().GetState(); -OUString aText; +OUStringBuffer aTextBuf; + +Reference< XRowSet > xDataSourceRowSet( +Reference< XInterface >(*m_rColumn.GetParent().getDataSource()), UNO_QUERY); +Reference< XConnection > xConnection(getConnection(xDataSourceRowSet)); +const sal_Int32 nBooleanComparisonMode = ::dbtools::DatabaseMetaData( xConnection ).getBooleanComparisonMode(); switch (eState) { case TRISTATE_TRUE: -aText = "1"; +::dbtools::getBooleanComparisonPredicate("", true, nBooleanComparisonMode, aTextBuf); break; case TRISTATE_FALSE: -aText = "0"; +::dbtools::getBooleanComparisonPredicate("", false, nBooleanComparisonMode, aTextBuf); break; case TRISTATE_INDET: break; } +const OUString aText(aTextBuf.makeStringAndClear()); + if (m_aText != aText) { m_aText = aText; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: connectivity/registry svx/source
connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu | 5 +++ svx/source/fmcomp/gridcell.cxx | 13 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) New commits: commit 9b6906bbf3cdc3fc100339b39755bbbe02594e4f Author: Lionel Elie Mamane AuthorDate: Wed Oct 24 18:13:56 2018 +0200 Commit: Lionel Elie Mamane CommitDate: Thu Oct 25 10:03:13 2018 +0200 tdf#120713 correctly handle boolean values in filters This commit has two parts: - Hardcode the correct BooleanComparisonMode in the firebird-sdbc driver (this fixes on Firebird databases, among others, the AutoFilter for bools) - Generic to all DBMS, have the "form-based filter" obey the BooleanComparisonMode Change-Id: Ib14e6c3d5cb773ae1f972840f8b53062f0224396 Reviewed-on: https://gerrit.libreoffice.org/62319 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane diff --git a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu index 03896aff4412..586264183b60 100644 --- a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu +++ b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu @@ -66,6 +66,11 @@ true + + +2 + + diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index da44c4e55591..ae0690c23c4f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3100,20 +3100,27 @@ void DbFilterField::UpdateFromField(const Reference< XColumn >& /*_rxField*/, co IMPL_LINK_NOARG(DbFilterField, OnClick, VclPtr, void) { TriState eState = static_cast(m_pWindow.get())->GetBox().GetState(); -OUString aText; +OUStringBuffer aTextBuf; + +Reference< XRowSet > xDataSourceRowSet( +Reference< XInterface >(*m_rColumn.GetParent().getDataSource()), UNO_QUERY); +Reference< XConnection > xConnection(getConnection(xDataSourceRowSet)); +const sal_Int32 nBooleanComparisonMode = ::dbtools::DatabaseMetaData( xConnection ).getBooleanComparisonMode(); switch (eState) { case TRISTATE_TRUE: -aText = "1"; +::dbtools::getBooleanComparisonPredicate("", true, nBooleanComparisonMode, aTextBuf); break; case TRISTATE_FALSE: -aText = "0"; +::dbtools::getBooleanComparisonPredicate("", false, nBooleanComparisonMode, aTextBuf); break; case TRISTATE_INDET: break; } +const OUString aText(aTextBuf.makeStringAndClear()); + if (m_aText != aText) { m_aText = aText; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig
dbaccess/source/ui/dlg/UserAdminDlg.cxx| 54 +++-- dbaccess/source/ui/inc/UserAdminDlg.hxx| 17 - dbaccess/source/ui/uno/UserSettingsDlg.cxx |2 - dbaccess/uiconfig/ui/useradmindialog.ui| 34 +- 4 files changed, 62 insertions(+), 45 deletions(-) New commits: commit 0fdf02b8054aec843ff0081c66a10484b2b29fa9 Author: Caolán McNamara AuthorDate: Wed Oct 24 16:44:09 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:59:10 2018 +0200 weld OUserAdminDlg Change-Id: I3e190db7c00ebff55296fe1ffb8999d9892c7723 Reviewed-on: https://gerrit.libreoffice.org/62329 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index 48bc536df9dd..0b518d9ef6bd 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -46,24 +46,24 @@ namespace dbaui using namespace ::com::sun::star::sdbcx; // OUserAdminDlg -OUserAdminDlg::OUserAdminDlg(vcl::Window* _pParent -, SfxItemSet* _pItems -,const Reference< XComponentContext >& _rxORB -,const css::uno::Any& _aDataSourceName -,const Reference< XConnection >& _xConnection) -: SfxTabDialog(_pParent, "UserAdminDialog", "dbaccess/ui/useradmindialog.ui", _pItems) -, m_pItemSet(_pItems) -, m_xConnection(_xConnection) -, m_bOwnConnection(!_xConnection.is()) +OUserAdminDlg::OUserAdminDlg(weld::Window* pParent, + SfxItemSet* pItems, + const Reference< XComponentContext >& rxORB, + const css::uno::Any& rDataSourceName, + const Reference< XConnection >& xConnection) +: SfxTabDialogController(pParent, "dbaccess/ui/useradmindialog.ui", "UserAdminDialog", pItems) +, m_pParent(pParent) +, m_pItemSet(pItems) +, m_xConnection(xConnection) +, m_bOwnConnection(!xConnection.is()) { -m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,GetFrameWeld(),_pParent ? _pParent->GetFrameWeld() : nullptr, this)); -m_pImpl->setDataSourceOrName(_aDataSourceName); +m_pImpl.reset(new ODbDataSourceAdministrationHelper(rxORB, m_xDialog.get(), pParent, this)); +m_pImpl->setDataSourceOrName(rDataSourceName); Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); -m_pImpl->translateProperties(xDatasource, *_pItems); -SetInputSet(_pItems); +m_pImpl->translateProperties(xDatasource, *pItems); +SetInputSet(pItems); // propagate this set as our new input set and reset the example set -delete m_pExampleSet; -m_pExampleSet = new SfxItemSet(*GetInputSetImpl()); +m_xExampleSet.reset(new SfxItemSet(*GetInputSetImpl())); AddTabPage("settings", OUserAdmin::Create, nullptr); @@ -73,11 +73,6 @@ namespace dbaui OUserAdminDlg::~OUserAdminDlg() { -disposeOnce(); -} - -void OUserAdminDlg::dispose() -{ if ( m_bOwnConnection ) { try @@ -90,11 +85,9 @@ namespace dbaui } SetInputSet(nullptr); -DELETEZ(m_pExampleSet); -SfxTabDialog::dispose(); } -short OUserAdminDlg::Execute() +short OUserAdminDlg::run() { try { @@ -107,29 +100,24 @@ namespace dbaui } catch(const SQLException&) { - ::dbtools::showError(::dbtools::SQLExceptionInfo(::cppu::getCaughtException()), VCLUnoHelper::GetInterface(GetParent()), getORB()); + ::dbtools::showError(::dbtools::SQLExceptionInfo(::cppu::getCaughtException()), m_pParent->GetXWindow(), getORB()); return RET_CANCEL; } catch(const Exception&) { DBG_UNHANDLED_EXCEPTION("dbaccess"); } -short nRet = SfxTabDialog::Execute(); +short nRet = SfxTabDialogController::run(); if ( nRet == RET_OK ) m_pImpl->saveChanges(*GetOutputItemSet()); return nRet; } -void OUserAdminDlg::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) +void OUserAdminDlg::PageCreated(const OString& rId, SfxTabPage& _rPage) { // register ourself as modified listener static_cast(_rPage).SetServiceFactory( m_pImpl->getORB() ); static_cast(_rPage).SetAdminDialog(this,this); - -vcl::Window *pWin = GetViewWindow(); -if(pWin) -pWin->Invalidate(); - -SfxTabDialog::PageCreated(_nId, _rPage); +SfxTabDialogController::PageCreated(rId, _rPage); } const SfxItemSe
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/control/curledit.cxx| 16 +++ dbaccess/source/ui/dlg/ConnectionHelper.cxx| 56 - dbaccess/source/ui/dlg/ConnectionHelper.hxx|8 +-- dbaccess/source/ui/dlg/ConnectionPage.cxx |4 - dbaccess/source/ui/dlg/ConnectionPage.hxx |2 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx |4 - dbaccess/source/ui/dlg/ConnectionPageSetup.hxx |2 dbaccess/source/ui/dlg/adminpages.cxx |2 dbaccess/source/ui/dlg/adminpages.hxx |8 +-- dbaccess/source/ui/inc/curledit.hxx|6 +- 10 files changed, 54 insertions(+), 54 deletions(-) New commits: commit 6d5791332d4ba6a3f506d8cb27f7a44fe84855c7 Author: Caolán McNamara AuthorDate: Wed Oct 24 16:31:05 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:58:47 2018 +0200 rename DBOConnectionURLEdit and DBOConnectionHelper back Change-Id: I9353efc407d9dab04b72d7ddedd43bfa125c63ca Reviewed-on: https://gerrit.libreoffice.org/62328 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 234ebdb935f9..7c8df5e88e21 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -26,7 +26,7 @@ namespace dbaui { -DBOConnectionURLEdit::DBOConnectionURLEdit(std::unique_ptr xEntry, std::unique_ptr xForcedPrefix) +OConnectionURLEdit::OConnectionURLEdit(std::unique_ptr xEntry, std::unique_ptr xForcedPrefix) : m_pTypeCollection(nullptr) , m_bShowPrefix(false) , m_xEntry(std::move(xEntry)) @@ -34,27 +34,27 @@ DBOConnectionURLEdit::DBOConnectionURLEdit(std::unique_ptr xEntry, { } -DBOConnectionURLEdit::~DBOConnectionURLEdit() +OConnectionURLEdit::~OConnectionURLEdit() { } -void DBOConnectionURLEdit::SetTextNoPrefix(const OUString& _rText) +void OConnectionURLEdit::SetTextNoPrefix(const OUString& _rText) { m_xEntry->set_text(_rText); } -OUString DBOConnectionURLEdit::GetTextNoPrefix() const +OUString OConnectionURLEdit::GetTextNoPrefix() const { return m_xEntry->get_text(); } -void DBOConnectionURLEdit::SetText(const OUString& _rStr) +void OConnectionURLEdit::SetText(const OUString& _rStr) { Selection aNoSelection(0,0); SetText(_rStr, aNoSelection); } -void DBOConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) +void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) { m_xForcedPrefix->show(m_bShowPrefix); @@ -77,12 +77,12 @@ void DBOConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rN m_xEntry->set_text(sNewText); } -OUString DBOConnectionURLEdit::GetText() const +OUString OConnectionURLEdit::GetText() const { return m_xForcedPrefix->get_label() + m_xEntry->get_text(); } -void DBOConnectionURLEdit::ShowPrefix(bool _bShowPrefix) +void OConnectionURLEdit::ShowPrefix(bool _bShowPrefix) { m_bShowPrefix = _bShowPrefix; m_xForcedPrefix->show(m_bShowPrefix); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index d9067ffeff97..1288ff708241 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -81,39 +81,39 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; -DBOConnectionHelper::DBOConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs) +OConnectionHelper::OConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs) : OGenericAdministrationPage(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) , m_bUserGrabFocus(false) , m_pCollection(nullptr) , m_xFT_Connection(m_xBuilder->weld_label("browseurllabel")) , m_xPB_Connection(m_xBuilder->weld_button("browse")) , m_xPB_CreateDB(m_xBuilder->weld_button("create")) -, m_xConnectionURL(new DBOConnectionURLEdit(m_xBuilder->weld_entry("browseurl"), m_xBuilder->weld_label("browselabel"))) +, m_xConnectionURL(new OConnectionURLEdit(m_xBuilder->weld_entry("browseurl"), m_xBuilder->weld_label("browselabel"))) { // extract the datasource type collection from the item set const DbuTypeCollectionItem* pCollectionItem = dynamic_cast( _rCoreAttrs.GetItem(DSID_TYPECOLLECTION) ); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); -m_xPB_Connection->connect_clicked(LINK(this, DBOConnectionHelper, OnBrowseConnections)); -m_xPB_CreateDB->connect_clicked(LINK(this, DBOConnectionHelper, OnCreateDatabase)); +m_xPB_Connection->connect_clicked(LINK(this, OConnectionHelper, OnBrowseConnections)); +m
[Libreoffice-commits] core.git: dbaccess/uiconfig extras/source solenv/sanitizers
dbaccess/uiconfig/ui/dbwizconnectionpage.ui| 48 +++-- dbaccess/uiconfig/ui/dbwiztextpage.ui | 55 +++-- dbaccess/uiconfig/ui/jdbcconnectionpage.ui |1 extras/source/glade/libreoffice-catalog.xml.in |3 - solenv/sanitizers/ui/dbaccess.suppr|4 - 5 files changed, 70 insertions(+), 41 deletions(-) New commits: commit de48e3cf707813f1c2e6b5f6663f41382f316011 Author: Caolán McNamara AuthorDate: Wed Oct 24 16:23:54 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:57:38 2018 +0200 fix up wizards pages Change-Id: Icea2c91d06af4fc5d190186d4f6d624ebfc991ff Reviewed-on: https://gerrit.libreoffice.org/62325 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/uiconfig/ui/dbwizconnectionpage.ui b/dbaccess/uiconfig/ui/dbwizconnectionpage.ui index 3a1f1f411a0b..3d022c5307e7 100644 --- a/dbaccess/uiconfig/ui/dbwizconnectionpage.ui +++ b/dbaccess/uiconfig/ui/dbwizconnectionpage.ui @@ -1,8 +1,7 @@ - + - True False @@ -32,10 +31,10 @@ True False 6 -0 label True 60 +0 False @@ -64,17 +63,6 @@ - -True -True -True - - -0 -1 - - - _Create New True @@ -100,6 +88,38 @@ 1 + + +True +False + + +True +True +True +True + + +1 +0 + + + + +True +False + + +0 +0 + + + + +0 +1 + + False diff --git a/dbaccess/uiconfig/ui/dbwiztextpage.ui b/dbaccess/uiconfig/ui/dbwiztextpage.ui index 65bcb8fc712f..bbb6600d4232 100644 --- a/dbaccess/uiconfig/ui/dbwiztextpage.ui +++ b/dbaccess/uiconfig/ui/dbwiztextpage.ui @@ -1,7 +1,7 @@ + - - + True False @@ -39,9 +39,9 @@ False start True -0 True 100 +0 False @@ -57,18 +57,6 @@ 6 6 - -True -True - - -0 -1 -1 -1 - - - Browse True @@ -78,8 +66,6 @@ 1 1 -1 -1 @@ -92,8 +78,6 @@ 2 1 -1 -1 @@ -102,13 +86,44 @@ False start True +True +browseurl 0 0 0 3 -1 + + + + +True +False + + +True +True + + +1 +0 + + + + +True +False + + +0 +0 + + + + +0 +1 diff --git a/dbaccess/uiconfig/ui/jdbcconnectionpage.ui b/dbaccess/uiconfig/ui/jdbcconnectionpage.ui index 8f62f3f821c1..0
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/control/curledit.cxx | 124 - dbaccess/source/ui/dlg/ConnectionHelper.cxx | 657 dbaccess/source/ui/dlg/ConnectionHelper.hxx | 63 -- dbaccess/source/ui/inc/curledit.hxx | 40 - 4 files changed, 884 deletions(-) New commits: commit b2fae6ba39cd57a4bd5bf8693579bfc5dbb47f6f Author: Caolán McNamara AuthorDate: Wed Oct 24 16:28:33 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:58:24 2018 +0200 drop OConnectionURLEdit and OConnectionHelper Change-Id: I028b243b21a41f3fbd23dea57ea90f77e4a5317c Reviewed-on: https://gerrit.libreoffice.org/62327 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index a50a2c1fbaef..234ebdb935f9 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -26,130 +26,6 @@ namespace dbaui { -OConnectionURLEdit::OConnectionURLEdit(vcl::Window* _pParent, WinBits _nBits,bool _bShowPrefix) -:Edit(_pParent, _nBits) -,m_pTypeCollection(nullptr) -,m_pForcedPrefix(nullptr) -,m_bShowPrefix(_bShowPrefix) -{ -} - -extern "C" SAL_DLLPUBLIC_EXPORT void makeConnectionURLEdit(VclPtr & rRet, VclPtr & pParent, VclBuilder::stringmap &) -{ -rRet = VclPtr::Create(pParent, WB_BORDER, false); -} - -OConnectionURLEdit::~OConnectionURLEdit() -{ -disposeOnce(); -} - -void OConnectionURLEdit::dispose() -{ -SetSubEdit(nullptr); -m_pForcedPrefix.disposeAndClear(); -Edit::dispose(); -} - -void OConnectionURLEdit::SetTextNoPrefix(const OUString& _rText) -{ -OSL_ENSURE(GetSubEdit(), "OConnectionURLEdit::SetTextNoPrefix: have no current type, not changing the text!"); -if (GetSubEdit()) -GetSubEdit()->SetText(_rText); -} - -OUString OConnectionURLEdit::GetTextNoPrefix() const -{ -if (GetSubEdit()) -return GetSubEdit()->GetText(); -return GetText(); -} - -void OConnectionURLEdit::SetText(const OUString& _rStr) -{ -Selection aNoSelection(0,0); -SetText(_rStr, aNoSelection); -} - -void OConnectionURLEdit::Resize() -{ -if (GetSubEdit()) -{ -Size aMySize = GetSizePixel(); -sal_Int32 nTextWidth = 0; -if ( m_pForcedPrefix && m_bShowPrefix) -{ -nTextWidth = m_pForcedPrefix->GetTextWidth(m_pForcedPrefix->GetText()) + 2; -m_pForcedPrefix->SetPosSizePixel(Point(0, -2), Size(nTextWidth, aMySize.Height())); -} -GetSubEdit()->SetPosSizePixel(Point(nTextWidth, -2), Size(aMySize.Width() - nTextWidth - 4, aMySize.Height())); -} -} - -void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) -{ -// create new sub controls, if necessary -if (!GetSubEdit()) -SetSubEdit(VclPtr::Create(this, 0)); -if ( !m_pForcedPrefix ) -{ -m_pForcedPrefix = VclPtr::Create(this, WB_VCENTER); - -// we use a gray background for the fixed text -StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); - m_pForcedPrefix->SetBackground(Wallpaper(aSystemStyle.GetDialogColor())); -} - -m_pForcedPrefix->Show(m_bShowPrefix); - -bool bIsEmpty = _rStr.isEmpty(); -// calc the prefix -OUString sPrefix; -if (!bIsEmpty) -{ -// determine the type of the new URL described by the new text -sPrefix = m_pTypeCollection->getPrefix(_rStr); -} - -// the fixed text gets the prefix -m_pForcedPrefix->SetText(sPrefix); - -// both subs have to be resized according to the text len of the prefix -Size aMySize = GetSizePixel(); -sal_Int32 nTextWidth = 0; -if ( m_pForcedPrefix && m_bShowPrefix) -{ -nTextWidth = m_pForcedPrefix->GetTextWidth(sPrefix) + 2; -m_pForcedPrefix->SetPosSizePixel(Point(0, -2), Size(nTextWidth, aMySize.Height())); -} -GetSubEdit()->SetPosSizePixel(Point(nTextWidth, -2), Size(aMySize.Width() - nTextWidth - 4, aMySize.Height())); -// -2 because the edit has a frame which is 2 pixel wide ... should not be necessary, but I don't fully understand this - -// show the sub controls (in case they were just created) -GetSubEdit()->Show(); - -// do the real SetTex -// Edit::SetText(bIsEmpty ? _rStr : m_pTypeCollection->cutPrefix(_rStr), _rNewSelection); -OUString sNewText( _rStr ); -if ( !bIsEmpty ) -sNewText = m_pTypeCollection->cutPrefix( _rStr ); -Edit::SetText( sNewText ); -} - -OUString OConnectionURLEdit::GetText() const -{ -if ( m_pForcedPrefix ) -return m_pForcedPrefix->GetText() + Edit::GetText(); -return Edit::GetText(); -} - -void OConnectionURLEdit::ShowPrefix(bool _bShowPrefix) -{ -m_bShowPrefix = _bShowPrefix; -if ( m_pForcedPrefix ) -m_pForcedPrefix->Show(m_bShowPrefix); -} - DBOConnectionURLEdit::DBOConnectionURLEdi
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx| 36 +++--- dbaccess/source/ui/dlg/ConnectionPageSetup.hxx|8 ++-- dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 26 +++ dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |6 +-- dbaccess/source/ui/dlg/dbwizsetup.cxx | 12 +++ 5 files changed, 44 insertions(+), 44 deletions(-) New commits: commit f6f53264d9e2f924ac1dbb309b615912dfe9a7dc Author: Caolán McNamara AuthorDate: Wed Oct 24 16:25:08 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:58:00 2018 +0200 rename DBOConnectionTabPageSetup back to OConnectionTabPageSetup Change-Id: I3d5c90e51922350ca3bb6f59fc94bf5768c995f1 Reviewed-on: https://gerrit.libreoffice.org/62326 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index fa11988bca04..6d7588b077f9 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -61,32 +61,32 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; -VclPtr DBOConnectionTabPageSetup::CreateDbaseTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) +VclPtr OConnectionTabPageSetup::CreateDbaseTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create ( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); +return VclPtr::Create ( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); } -VclPtr DBOConnectionTabPageSetup::CreateMSAccessTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) +VclPtr OConnectionTabPageSetup::CreateMSAccessTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); +return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); } -VclPtr DBOConnectionTabPageSetup::CreateADOTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) +VclPtr OConnectionTabPageSetup::CreateADOTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); +return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); } -VclPtr DBOConnectionTabPageSetup::CreateODBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) +VclPtr OConnectionTabPageSetup::CreateODBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); +return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); } -VclPtr DBOConnectionTabPageSetup::CreateUserDefinedTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) +VclPtr OConnectionTabPageSetup::CreateUserDefinedTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create(pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, nullptr, nullptr, STR_COMMONURL); +return VclPtr::Create(pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, nullptr, nullptr, STR_COMMONURL); } -DBOConnectionTabPageSetup::DBOConnectionTabPageSetup(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId) +OConnectionTabPageSetup::OConnectionTabPageSetup(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId) : DBOConnectionHelper(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) , m_xHelpText(m_xBuilder->weld_label("helptext")) , m_xHeaderText(m_xBuilder->weld_label("header")) @@ -111,17 +111,17 @@ namespace dbaui else m_xFT_Connection->hide(); -m_xConnectionURL->connect_changed(LINK(this, DBOConnectionTabPageSe
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 139 + dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 41 --- dbaccess/source/ui/dlg/dbwizsetup.cxx | 12 +- 3 files changed, 21 insertions(+), 171 deletions(-) New commits: commit a8c1835911450211493f3cddc10c3ccc1455c43a Author: Caolán McNamara AuthorDate: Wed Oct 24 16:17:44 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:57:16 2018 +0200 drop unused stuff Change-Id: Icd92801dc88c603c369bfb6c85bf4278ea609ea9 Reviewed-on: https://gerrit.libreoffice.org/62324 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index c98b80289240..fa11988bca04 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -61,148 +61,29 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; -VclPtr OConnectionTabPageSetup::CreateDbaseTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +VclPtr DBOConnectionTabPageSetup::CreateDbaseTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create ( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); +return VclPtr::Create ( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); } -VclPtr OConnectionTabPageSetup::CreateMSAccessTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +VclPtr DBOConnectionTabPageSetup::CreateMSAccessTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); +return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); } -VclPtr OConnectionTabPageSetup::CreateADOTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +VclPtr DBOConnectionTabPageSetup::CreateADOTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); +return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); } -VclPtr OConnectionTabPageSetup::CreateODBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +VclPtr DBOConnectionTabPageSetup::CreateODBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); +return VclPtr::Create( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); } -VclPtr OConnectionTabPageSetup::CreateUserDefinedTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +VclPtr DBOConnectionTabPageSetup::CreateUserDefinedTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create(pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, nullptr, nullptr, STR_COMMONURL); -} - -OConnectionTabPageSetup::OConnectionTabPageSetup(vcl::Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId) -:OConnectionHelper(pParent, _rId, _rUIXMLDescription, _rCoreAttrs) -{ -get(m_pHelpText, "helptext"); -get(m_pHeaderText, "header"); - -if (pHelpTextResId != nullptr) -{ -OUString sHelpText = DBA_RES(pHelpTextResId); -m_pHelpText->SetText(sHelpText); -} -else -m_pHelpText->Hide(); - -if (pHeaderResId != nullptr) -m_pHeaderText->SetText(DBA_RES(pHeaderResId)); - -if (pUrlResId != nullptr) -{ -OUString sLabelText = DBA_RES(pUrlResId); -m_pFT_Connection->SetText(sLabelText); -} -else -m_pFT_Connection->Hide(); - -m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified)); - -SetRoadmapStateValue(false); -} - -OConnectionTabPageSetup::~OConnectionTabPageSetup() -{ -disposeOnce(); -} - -void OConnectionTabPag
[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 64 +- dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 19 +++--- dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui |1 dbaccess/uiconfig/ui/jdbcconnectionpage.ui| 48 +++- 4 files changed, 72 insertions(+), 60 deletions(-) New commits: commit c9e55e2b9e5c9a536e512151be91b1d73e0ee6e9 Author: Caolán McNamara AuthorDate: Wed Oct 24 16:11:46 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:56:45 2018 +0200 weld OJDBCConnectionPageSetup Change-Id: I8c194c8efa17079253c857e171af203c17d3aff3 Reviewed-on: https://gerrit.libreoffice.org/62323 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index d818b2dc12a8..eafbc7eb40df 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -563,21 +563,21 @@ using namespace ::com::sun::star; OGenericAdministrationPage::callModifiedHdl(); } -VclPtr OJDBCConnectionPageSetup::CreateJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +VclPtr OJDBCConnectionPageSetup::CreateJDBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) { -return VclPtr::Create( pParent, _rAttrSet); +return VclPtr::Create(pParent, _rAttrSet); } // OMySQLJDBCConnectionPageSetup -OJDBCConnectionPageSetup::OJDBCConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs) -:OConnectionTabPageSetup(pParent, "JDBCConnectionPage", "dbaccess/ui/jdbcconnectionpage.ui", _rCoreAttrs, +OJDBCConnectionPageSetup::OJDBCConnectionPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs) +: DBOConnectionTabPageSetup(pParent, "dbaccess/ui/jdbcconnectionpage.ui", "JDBCConnectionPage", rCoreAttrs, STR_JDBC_HELPTEXT, STR_JDBC_HEADERTEXT, STR_COMMONURL) +, m_xFTDriverClass(m_xBuilder->weld_label("jdbcLabel")) +, m_xETDriverClass(m_xBuilder->weld_entry("jdbcEntry")) +, m_xPBTestJavaDriver(m_xBuilder->weld_button("jdbcButton")) { -get(m_pFTDriverClass, "jdbcLabel"); -get(m_pETDriverClass, "jdbcEntry"); -get(m_pPBTestJavaDriver, "jdbcButton"); -m_pETDriverClass->SetModifyHdl(LINK(this, OJDBCConnectionPageSetup, OnEditModified)); - m_pPBTestJavaDriver->SetClickHdl(LINK(this,OJDBCConnectionPageSetup,OnTestJavaClickHdl)); +m_xETDriverClass->connect_changed(LINK(this, OJDBCConnectionPageSetup, OnEditModified)); + m_xPBTestJavaDriver->connect_clicked(LINK(this,OJDBCConnectionPageSetup,OnTestJavaClickHdl)); } OJDBCConnectionPageSetup::~OJDBCConnectionPageSetup() @@ -585,28 +585,20 @@ using namespace ::com::sun::star; disposeOnce(); } -void OJDBCConnectionPageSetup::dispose() -{ -m_pFTDriverClass.clear(); -m_pETDriverClass.clear(); -m_pPBTestJavaDriver.clear(); -OConnectionTabPageSetup::dispose(); -} - void OJDBCConnectionPageSetup::fillControls(std::vector< std::unique_ptr >& _rControlList) { -_rControlList.emplace_back(new OSaveValueWrapper(m_pETDriverClass)); +_rControlList.emplace_back(new OSaveValueWidgetWrapper(m_xETDriverClass.get())); } void OJDBCConnectionPageSetup::fillWindows(std::vector< std::unique_ptr >& _rControlList) { -_rControlList.emplace_back(new ODisableWrapper(m_pFTDriverClass)); +_rControlList.emplace_back(new ODisableWidgetWrapper(m_xFTDriverClass.get())); } bool OJDBCConnectionPageSetup::FillItemSet( SfxItemSet* _rSet ) { -bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); - fillString(*_rSet,m_pETDriverClass,DSID_JDBCDRIVERCLASS,bChangedSomething); +bool bChangedSomething = DBOConnectionTabPageSetup::FillItemSet(_rSet); + fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething); return bChangedSomething; } @@ -625,19 +617,19 @@ using namespace ::com::sun::star; OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType); if ( !sDefaultJdbcDriverName.isEmpty() ) { -m_pETDriverClass->SetText(sDefaultJdbcDriverName); -m_pETDriverClass->SetModifyFlag(); +m_xETDriverClass->set_text(sDefaultJdbcDriverName); +m_xETDriverClass->save_value(); } } else { -m_pETDriverClass->SetText(pDrvItem->GetValue()); -m_pETDriverClass->ClearModifyFlag(); +m_xETDriverClass->set_text(pDrvItem->GetValue()); +m_xETDriverClass-
[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 23 +++-- dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |7 +- dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui | 55 ++ 3 files changed, 47 insertions(+), 38 deletions(-) New commits: commit 08402a81e55ab43bf079a9c91df8b9494634ef52 Author: Caolán McNamara AuthorDate: Wed Oct 24 15:56:35 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:56:25 2018 +0200 weld OSpreadSheetConnectionPageSetup Change-Id: Ibcf63af2bb1272d35420ac1b6f71aaa6f147ec16 Reviewed-on: https://gerrit.libreoffice.org/62322 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 0055f65dbc4f..d818b2dc12a8 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -690,11 +690,12 @@ using namespace ::com::sun::star; } -OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs ) -:OConnectionTabPageSetup(pParent, "DBWizSpreadsheetPage", "dbaccess/ui/dbwizspreadsheetpage.ui", _rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH) + OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs) +: DBOConnectionTabPageSetup(pParent, "dbaccess/ui/dbwizspreadsheetpage.ui", "DBWizSpreadsheetPage", + rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH) +, m_xPasswordrequired(m_xBuilder->weld_check_button("passwordrequired")) { -get(m_pPasswordrequired, "passwordrequired"); -m_pPasswordrequired->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) ); +m_xPasswordrequired->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick)); } OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup() @@ -702,27 +703,21 @@ using namespace ::com::sun::star; disposeOnce(); } -void OSpreadSheetConnectionPageSetup::dispose() -{ -m_pPasswordrequired.clear(); -OConnectionTabPageSetup::dispose(); -} - void OSpreadSheetConnectionPageSetup::fillWindows(std::vector< std::unique_ptr >& /*_rControlList*/) { } void OSpreadSheetConnectionPageSetup::fillControls(std::vector< std::unique_ptr >& _rControlList) { -OConnectionTabPageSetup::fillControls(_rControlList); -_rControlList.emplace_back(new OSaveValueWrapper(m_pPasswordrequired)); +DBOConnectionTabPageSetup::fillControls(_rControlList); +_rControlList.emplace_back(new OSaveValueWidgetWrapper(m_xPasswordrequired.get())); } bool OSpreadSheetConnectionPageSetup::FillItemSet( SfxItemSet* _rSet ) { -bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); - fillBool(*_rSet,m_pPasswordrequired,DSID_PASSWORDREQUIRED,bChangedSomething); +bool bChangedSomething = DBOConnectionTabPageSetup::FillItemSet(_rSet); + fillBool(*_rSet,m_xPasswordrequired.get(),DSID_PASSWORDREQUIRED,false,bChangedSomething); return bChangedSomething; } diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index 419be4acc05c..f634232113ae 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -36,17 +36,16 @@ namespace dbaui { // OSpreadSheetConnectionPageSetup -class OSpreadSheetConnectionPageSetup final : public OConnectionTabPageSetup +class OSpreadSheetConnectionPageSetup final : public DBOConnectionTabPageSetup { public: virtual boolFillItemSet ( SfxItemSet* _rCoreAttrs ) override; static VclPtr CreateDocumentOrSpreadSheetTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ); -OSpreadSheetConnectionPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs); +OSpreadSheetConnectionPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); virtual ~OSpreadSheetConnectionPageSetup() override; -virtual void dispose() override; private: -VclPtr m_pPasswordrequired; +std::unique_ptr m_xPasswordrequired; virtual void fillControls(std::vector< std::unique_ptr >& _rControlList) override; virtual void fillWindows(std::vector< std::unique_ptr >& _rControlList) override; diff --git a/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui b/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui index 897bd3c006ed..b104f4d664c1 100644 --- a/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui +++ b/dbaccess/uiconfig/ui/dbwizsp
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/control/charsetlistbox.cxx |6 +++--- dbaccess/source/ui/dlg/TextConnectionHelper.cxx |2 +- dbaccess/source/ui/dlg/TextConnectionHelper.hxx |2 +- dbaccess/source/ui/dlg/detailpages.cxx |2 +- dbaccess/source/ui/dlg/detailpages.hxx |2 +- dbaccess/source/ui/inc/charsetlistbox.hxx |4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) New commits: commit e82650dead9e1fe0f87c99495dd8b763a04080c8 Author: Caolán McNamara AuthorDate: Wed Oct 24 13:36:58 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:55:43 2018 +0200 rename DBCharSetListBox back to CharSetListBox Change-Id: I14c8b95ee166b75aa309f701be569f54b57538aa Reviewed-on: https://gerrit.libreoffice.org/62300 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index d2b7d7e3457e..8c2e048692d1 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -26,7 +26,7 @@ namespace dbaui { -DBCharSetListBox::DBCharSetListBox(std::unique_ptr xControl) +CharSetListBox::CharSetListBox(std::unique_ptr xControl) : m_xControl(std::move(xControl)) { for (auto const& charset : m_aCharSets) @@ -35,7 +35,7 @@ namespace dbaui } } -void DBCharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName ) +void CharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName ) { OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName ); if (aFind == m_aCharSets.end()) @@ -50,7 +50,7 @@ namespace dbaui m_xControl->set_active_text((*aFind).getDisplayName()); } -bool DBCharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId ) +bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId ) { bool bChangedSomething = false; if (m_xControl->get_value_changed_from_saved()) diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 61b0324c8682..e950b8b009a8 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -78,7 +78,7 @@ namespace dbaui , m_xRowHeader(m_xBuilder->weld_check_button("containsheaders")) , m_xCharSetHeader(m_xBuilder->weld_widget("charsetframe")) , m_xCharSetLabel(m_xBuilder->weld_label("charsetlabel")) -, m_xCharSet(new DBCharSetListBox(m_xBuilder->weld_combo_box("charset"))) +, m_xCharSet(new CharSetListBox(m_xBuilder->weld_combo_box("charset"))) { sal_Int32 nCnt = comphelper::string::getTokenCount(m_aFieldSeparatorList, '\t'); sal_Int32 i; diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index b96a7d811c0e..4d34108e795b 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -73,7 +73,7 @@ namespace dbaui std::unique_ptr m_xRowHeader; std::unique_ptr m_xCharSetHeader; std::unique_ptr m_xCharSetLabel; -std::unique_ptr m_xCharSet; +std::unique_ptr m_xCharSet; DECL_LINK(OnSetExtensionHdl, weld::ToggleButton&, void); DECL_LINK(OnEditModified, weld::Entry&, void); diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 06f1f57d387a..65d3bccd439a 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -75,7 +75,7 @@ namespace dbaui m_xDataConvertLabel->show(); m_xCharsetLabel = m_xBuilder->weld_label("charsetlabel"); m_xCharsetLabel->show(); -m_xCharset.reset(new DBCharSetListBox(m_xBuilder->weld_combo_box("charset"))); +m_xCharset.reset(new CharSetListBox(m_xBuilder->weld_combo_box("charset"))); m_xCharset->show(); m_xCharset->connect_changed(LINK(this, OCommonBehaviourTabPage, CharsetSelectHdl)); } diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index d6e990574155..20d0f38fdb87 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -62,7 +62,7 @@ namespace dbaui std::unique_ptr m_xDataConvertLabel; std::unique_ptr m_xCharsetLabel; -std::unique_ptr m_xCharset; +std::unique_ptr m_xCharset; std::unique_ptr m_xAutoRetrievingEnabled; std::unique_ptr m_xAutoIncrementLabel; diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx index 82633189a8bf..d58c1ca6531a 100644 --- a/dbaccess/source/ui/inc/charsetlistbox.hxx +++ b/dbaccess/s
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |2 - dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |4 +- dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 32 +++--- dbaccess/source/ui/dlg/TextConnectionHelper.hxx |8 ++--- dbaccess/source/ui/dlg/detailpages.hxx|2 - dbaccess/source/ui/dlg/textconnectionsettings.cxx |2 - dbaccess/source/ui/inc/textconnectionsettings.hxx |4 +- 7 files changed, 27 insertions(+), 27 deletions(-) New commits: commit e6176cdb896a53e132920d1e13f2d4f274a62df2 Author: Caolán McNamara AuthorDate: Wed Oct 24 13:41:22 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:56:03 2018 +0200 rename DBOTextConnectionHelper back to OTextConnectionHelper Change-Id: Ie20403b88c8510465ab7cccbb431072331dbc96f Reviewed-on: https://gerrit.libreoffice.org/62321 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index f93b3db9c6e2..0055f65dbc4f 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -79,7 +79,7 @@ using namespace ::com::sun::star; disposeOnce(); } -IMPL_LINK_NOARG(OTextConnectionPageSetup, ImplGetExtensionHdl, DBOTextConnectionHelper*, void) +IMPL_LINK_NOARG(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, void) { SetRoadmapStateValue(!m_aTextConnectionHelper.GetExtension().isEmpty() && DBOConnectionTabPageSetup::checkTestConnection()); callModifiedHdl(); diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index 59545c74f096..419be4acc05c 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -57,7 +57,7 @@ namespace dbaui { public: std::unique_ptr m_xSubContainer; -DBOTextConnectionHelper m_aTextConnectionHelper; +OTextConnectionHelper m_aTextConnectionHelper; virtual boolFillItemSet ( SfxItemSet* _rCoreAttrs ) override; static VclPtr CreateTextTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet ); @@ -71,7 +71,7 @@ namespace dbaui boolcheckTestConnection() override; private: -DECL_LINK(ImplGetExtensionHdl, DBOTextConnectionHelper*, void); +DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*, void); }; // OLDAPConnectionPageSetup diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index e950b8b009a8..1c8051852a91 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -53,7 +53,7 @@ namespace dbaui { -DBOTextConnectionHelper::DBOTextConnectionHelper(weld::Widget* pParent, const short _nAvailableSections) +OTextConnectionHelper::OTextConnectionHelper(weld::Widget* pParent, const short _nAvailableSections) : m_aFieldSeparatorList (DBA_RES(STR_AUTOFIELDSEPARATORLIST)) , m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST) , m_aTextNone(DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE)) @@ -91,10 +91,10 @@ namespace dbaui m_xTextSeparator->append_text( m_aTextSeparatorList.getToken( i, '\t' ) ); m_xTextSeparator->append_text(m_aTextNone); -m_xOwnExtension->connect_changed(LINK(this, DBOTextConnectionHelper, OnEditModified)); -m_xAccessTextFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl)); -m_xAccessCSVFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl)); -m_xAccessOtherFiles->connect_toggled(LINK(this, DBOTextConnectionHelper, OnSetExtensionHdl)); +m_xOwnExtension->connect_changed(LINK(this, OTextConnectionHelper, OnEditModified)); +m_xAccessTextFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); +m_xAccessCSVFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); +m_xAccessOtherFiles->connect_toggled(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); m_xAccessCSVFiles->set_active(true); struct SectionDescriptor @@ -124,12 +124,12 @@ namespace dbaui m_xContainer->show(); } -IMPL_LINK_NOARG(DBOTextConnectionHelper, OnEditModified, weld::Entry&, void) +IMPL_LINK_NOARG(OTextConnectionHelper, OnEditModified, weld::Entry&, void) { m_aGetExtensionHandler.Call(this); } -IMPL_LINK_NOARG(DBOTextConnectionHelper, OnSetExtensionHdl, weld::ToggleButton&, void) +IMPL_LINK_NOARG(OTextConnectionHelper, OnSetExtensionHdl, weld::ToggleButton&, void) { bool bDoEnable = m_xAccessOtherFiles->get_active();
[Libreoffice-commits] core.git: dbaccess/source extras/source
dbaccess/source/ui/control/charsetlistbox.cxx | 59 --- dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 390 dbaccess/source/ui/dlg/TextConnectionHelper.hxx | 53 --- dbaccess/source/ui/inc/charsetlistbox.hxx | 19 - extras/source/glade/libreoffice-catalog.xml.in |3 5 files changed, 1 insertion(+), 523 deletions(-) New commits: commit 55078d3e3bef957311a80f5d1bcce594f298d2bd Author: Caolán McNamara AuthorDate: Wed Oct 24 13:09:16 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:55:08 2018 +0200 remove unused stuff Change-Id: I5ae616f46cb86b35435e007f98e4b0f882a75751 Reviewed-on: https://gerrit.libreoffice.org/62299 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index 9ea9f7f70c65..d2b7d7e3457e 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -26,64 +26,6 @@ namespace dbaui { -CharSetListBox::CharSetListBox( vcl::Window* _pParent ) -: ListBox( _pParent, WB_DROPDOWN ) -{ -SetDropDownLineCount( 20 ); - -for (auto const& charset : m_aCharSets) -{ -InsertEntry( charset.getDisplayName() ); -} -} - -VCL_BUILDER_FACTORY(CharSetListBox) - -void CharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName ) -{ -OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName ); -if (aFind == m_aCharSets.end()) -{ -OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" ); -aFind = m_aCharSets.findEncoding( RTL_TEXTENCODING_DONTKNOW ); -} - -if ( aFind == m_aCharSets.end() ) -{ -SelectEntry( OUString() ); -} -else -{ -OUString sDisplayName = (*aFind).getDisplayName(); -if ( LISTBOX_ENTRY_NOTFOUND == GetEntryPos( sDisplayName ) ) -{ -// in our settings, there was an encoding selected which is not valid for the current -// data source type -// This is worth at least an assertion. -OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: invalid character set!" ); -sDisplayName.clear(); -} - -SelectEntry( sDisplayName ); -} -} - -bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId ) -{ -bool bChangedSomething = false; -if ( IsValueChangedFromSaved() ) -{ -OCharsetDisplay::const_iterator aFind = m_aCharSets.findDisplayName( GetSelectedEntry() ); -OSL_ENSURE( aFind != m_aCharSets.end(), "CharSetListBox::StoreSelectedCharSet: could not translate the selected character set!" ); -if ( aFind != m_aCharSets.end() ) -{ -_rSet.Put( SfxStringItem( _nItemId, (*aFind).getIanaName() ) ); -bChangedSomething = true; -} -} -return bChangedSomething; -} - DBCharSetListBox::DBCharSetListBox(std::unique_ptr xControl) : m_xControl(std::move(xControl)) { @@ -123,7 +65,6 @@ namespace dbaui } return bChangedSomething; } - } // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 80bb9d580955..61b0324c8682 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -53,396 +53,6 @@ namespace dbaui { - -OTextConnectionHelper::OTextConnectionHelper( vcl::Window* pParent, const short _nAvailableSections ) -:TabPage(pParent, "TextPage", "dbaccess/ui/textpage.ui") -,m_aFieldSeparatorList (DBA_RES(STR_AUTOFIELDSEPARATORLIST)) -,m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST) -,m_aTextNone(DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE)) -,m_nAvailableSections( _nAvailableSections ) -{ -get(m_pExtensionHeader, "extensionheader"); -get(m_pAccessTextFiles, "textfile"); -get(m_pAccessCSVFiles, "csvfile"); -get(m_pAccessOtherFiles, "custom"); -get(m_pOwnExtension, "extension"); -get(m_pExtensionExample, "example"); -get(m_pFormatHeader, "formatlabel"); -get(m_pFieldSeparatorLabel, "fieldlabel"); -get(m_pFieldSeparator, "fieldseparator"); -get(m_pTextSeparatorLabel, "textlabel"); -get(m_pTextSeparator, "textseparator"); -get(m_pDecimalSeparatorLabel, "decimallabel"); -get(m_pDecimalSeparator, "decimalseparator"); -get(m_pThousandsSeparatorLabel, "thousandslabel"); -
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 10 + dbaccess/source/ui/dlg/ConnectionHelper.hxx |2 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx| 114 ++ dbaccess/source/ui/dlg/ConnectionPageSetup.hxx| 31 + dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 49 - dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 12 +- 6 files changed, 181 insertions(+), 37 deletions(-) New commits: commit 660cace2a15bd863e0c85d61533cc52e9fa07e27 Author: Caolán McNamara AuthorDate: Wed Oct 24 13:34:39 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 25 09:53:40 2018 +0200 weld OTextConnectionPageSetup Change-Id: Iaa4fdc97be23ccd50471c26923745fd565e10653 Reviewed-on: https://gerrit.libreoffice.org/62298 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 7642114af693..000daa908ede 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -1315,7 +1315,7 @@ namespace dbaui _rControlList.emplace_back( new OSaveValueWidgetWrapper( m_xConnectionURL.get() ) ); } -void DBOConnectionHelper::commitURL() +bool DBOConnectionHelper::commitURL() { OUString sURL; OUString sOldPath; @@ -1344,7 +1344,7 @@ namespace dbaui setURLNoPrefix(sOldPath); SetRoadmapStateValue(false); callModifiedHdl(); -return; +return false; } } else @@ -1355,10 +1355,11 @@ namespace dbaui m_bUserGrabFocus = false; m_xConnectionURL->grab_focus(); m_bUserGrabFocus = true; -return; +return false; + case RET_CANCEL: setURLNoPrefix(sOldPath); -return; +return false; } } } @@ -1366,6 +1367,7 @@ namespace dbaui setURLNoPrefix(sURL); m_xConnectionURL->SaveValueNoPrefix(); +return true; } void DBOConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 1aa51976663c..04bca0a082ab 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -141,7 +141,7 @@ namespace dbaui IS_PATH_EXIST pathExists(const OUString& _rURL, bool bIsFile) const; boolcreateDirectoryDeep(const OUString& _rPathNormalized); -voidcommitURL(); +boolcommitURL(); /** opens the FileOpen dialog and asks for a FileName @param _aFileOpen diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index d9a96fa9b5cd..c98b80289240 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -179,6 +179,120 @@ namespace dbaui SetRoadmapStateValue(checkTestConnection()); callModifiedHdl(); } + +VclPtr DBOConnectionTabPageSetup::CreateDbaseTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +{ +return VclPtr::Create ( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); +} + +VclPtr DBOConnectionTabPageSetup::CreateMSAccessTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +{ +return VclPtr::Create( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); +} + +VclPtr DBOConnectionTabPageSetup::CreateADOTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +{ +return VclPtr::Create( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); +} + +VclPtr DBOConnectionTabPageSetup::CreateODBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +{ +return VclPtr::Create( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); +} + +VclPtr DBOConnectionTabPageSetup::CreateUserDefinedTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) +{ +return VclPtr::Create(pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, nullptr, nullptr, STR_COMMONURL); +} + +
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/GeneratedPackage.mk | 45 -- 1 file changed, 15 insertions(+), 30 deletions(-) New commits: commit 808dcac5f733ab5addcec0d3b3dcf5637aebd352 Author: Christian Lohmaier AuthorDate: Wed Oct 24 15:27:53 2018 +0200 Commit: Christian Lohmaier CommitDate: Thu Oct 25 09:35:31 2018 +0200 avoid running into commandline length limits on win with all-lang help also simplify the recipe by removing the one-time-use only calls to helper commands Unclear though why help adds the lang-dirs individually, as all come from the same subdir and end up in the same target dir... Change-Id: I489b1ac3f1312a565fb2a9cfc071d94201c74555 Reviewed-on: https://gerrit.libreoffice.org/62304 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/solenv/gbuild/GeneratedPackage.mk b/solenv/gbuild/GeneratedPackage.mk index bd279b060f1c..25af209b857e 100644 --- a/solenv/gbuild/GeneratedPackage.mk +++ b/solenv/gbuild/GeneratedPackage.mk @@ -22,43 +22,28 @@ gb_GeneratedPackage__get_srcdir = $(lastword $(subst <>, ,$(1))) gb_GeneratedPackage__get_destdir = $(firstword $(subst <>, ,$(1))) -define gb_GeneratedPackage__command_cp -mkdir -p $(dir $(2)) && \ -cp -R $(PACKAGE_SOURCEDIR)/$(1) $(2) -endef - -define gb_GeneratedPackage__command -$(call gb_Output_announce,$(2),$(true),GPK,2) -$(call gb_Helper_abbreviate_dirs,\ - rm -rf $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) && \ - $(foreach pair,$(PACKAGE_DIRS),\ - $(call gb_GeneratedPackage__command_cp,$(call gb_GeneratedPackage__get_srcdir,$(pair)),$(call gb_GeneratedPackage__get_destdir,$(pair))) &&) \ - $(FIND) \ - $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \ - \( -type f -o -type l \) -print \ - > $(1) \ -) -endef - -define gb_GeneratedPackage__check_dirs -$(if $(PACKAGE_DIRS),,$(call gb_Output_error,no dirs were added)) -$(foreach pair,$(PACKAGE_DIRS),\ - $(if $(wildcard $(PACKAGE_SOURCEDIR)/$(call gb_GeneratedPackage__get_srcdir,$(pair))),,\ - $(call gb_Output_error,source dir $(PACKAGE_SOURCEDIR)/$(call gb_GeneratedPackage__get_srcdir,$(pair)) does not exist) \ - ) \ -) - -endef - $(dir $(call gb_GeneratedPackage_get_target,%)).dir : $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) $(dir $(call gb_GeneratedPackage_get_target,%))%.dir : $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) +# require all added directories to exist +$(call gb_GeneratedPackage_get_target,%) :| $(foreach pair,$(PACKAGE_DIRS),$(PACKAGE_SOURCEDIR)/$(call gb_GeneratedPackage__get_srcdir,$(pair))) + +# split in two commands to avoid running into commandline/environment size limits +# on windows with all languages the processing of help can truncate the find command otherwise $(call gb_GeneratedPackage_get_target,%) : - $(call gb_GeneratedPackage__check_dirs,$*) - $(call gb_GeneratedPackage__command,$@,$*) + $(call gb_Output_announce,$*,$(true),GPK,2) + $(if $(PACKAGE_DIRS),,$(call gb_Output_error,no dirs were added)) + $(call gb_Helper_abbreviate_dirs,\ + rm -rf $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \ + && mkdir -p $(foreach pair,$(PACKAGE_DIRS),$(dir $(call gb_GeneratedPackage__get_destdir,$(pair \ + $(foreach pair,$(PACKAGE_DIRS),&& cp -R $(PACKAGE_SOURCEDIR)/$(call gb_GeneratedPackage__get_srcdir,$(pair)) $(call gb_GeneratedPackage__get_destdir,$(pair))) \ + ) + $(call gb_Helper_abbreviate_dirs,\ + $(FIND) $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \( -type f -o -type l \) -print > $@ \ + ) .PHONY : $(call gb_GeneratedPackage_get_clean_target,%) $(call gb_GeneratedPackage_get_clean_target,%) : ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: connectivity/source include/sfx2 include/svtools sfx2/source svtools/source vcl/inc
connectivity/source/drivers/mork/MQueryHelper.cxx |7 --- connectivity/source/drivers/mork/MQueryHelper.hxx |1 - include/sfx2/sidebar/FocusManager.hxx |1 - include/sfx2/tabdlg.hxx |3 --- include/svtools/dialogcontrolling.hxx | 11 --- sfx2/source/dialog/tabdlg.cxx |5 - sfx2/source/sidebar/FocusManager.cxx | 10 -- svtools/source/misc/dialogcontrolling.cxx | 19 --- vcl/inc/fontinstance.hxx |1 - 9 files changed, 58 deletions(-) New commits: commit a8520074425cd0b05ea54af4e189caafca634655 Author: Noel Grandin AuthorDate: Wed Oct 24 15:51:26 2018 +0200 Commit: Noel Grandin CommitDate: Thu Oct 25 09:19:59 2018 +0200 loplugin:unusedmethods Change-Id: I1f9ac5f8a090f365d9a21486029e1c13d721a4a4 Reviewed-on: https://gerrit.libreoffice.org/62338 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index 7f0d4ae08d52..6998df5e98fa 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -124,13 +124,6 @@ sal_Int32 MQueryHelper::getResultCount() const return result; } - -bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow ) -{ -return getResultCount() > nDBRow; -} - - bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ) { MQueryHelperResultEntry* pResEntry = getByIndex( nDBRow ); diff --git a/connectivity/source/drivers/mork/MQueryHelper.hxx b/connectivity/source/drivers/mork/MQueryHelper.hxx index 0aabc5aed26f..92c27f2135cb 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.hxx +++ b/connectivity/source/drivers/mork/MQueryHelper.hxx @@ -168,7 +168,6 @@ namespace connectivity void reset(); MQueryHelperResultEntry* getByIndex( sal_uInt32 nRow ); sal_Int32 getResultCount() const; -bool checkRowAvailable( sal_Int32 nDBRow ); bool getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ); sal_Int32 executeQuery(OConnection* xConnection, MQueryExpression & expr); const OColumnAlias&getColumnAlias() const { return m_rColumnAlias; } diff --git a/include/sfx2/sidebar/FocusManager.hxx b/include/sfx2/sidebar/FocusManager.hxx index c089419f05c8..a8f66b259788 100644 --- a/include/sfx2/sidebar/FocusManager.hxx +++ b/include/sfx2/sidebar/FocusManager.hxx @@ -64,7 +64,6 @@ public: */ void GrabFocus(); void GrabFocusPanel(); -void GrabFocusButton(const sal_Int32 nIndex); void SetDeckTitle(DeckTitleBar* pDeckTitleBar); void SetPanels(const SharedPanelContainer& rPanels); diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 13d469ff88fc..6a47844dd461 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -140,9 +140,6 @@ public: CreateTabPage pCreateFunc, // != 0 sal_uInt16 nPos = TAB_APPEND); -voidAddTabPage( sal_uInt16 nId, -const OUString &rRiderText); - voidRemoveTabPage( const OString& rName ); // Name of the label for the page in the notebook .ui voidRemoveTabPage( sal_uInt16 nId ); diff --git a/include/svtools/dialogcontrolling.hxx b/include/svtools/dialogcontrolling.hxx index 447ab1349edc..35b7a11171c5 100644 --- a/include/svtools/dialogcontrolling.hxx +++ b/include/svtools/dialogcontrolling.hxx @@ -138,10 +138,6 @@ namespace svt ControlDependencyManager(); ~ControlDependencyManager(); -/** clears all dialog controllers previously added to the manager -*/ -voidclear(); - /** ensures that a given window is enabled or disabled, according to the check state of a given radio button @param _rRadio @@ -258,13 +254,6 @@ namespace svt PWindowOperator( new EnableOnCheck< RadioButton >( _rButton ) ) ) { } - -RadioDependentEnabler( CheckBox& _rBox ) -:DialogController( _rBox, -PWindowEventFilter( new FilterForRadioOrCheckToggle( _rBox ) ), -PWindowOperator( new EnableOnCheck< CheckBox >( _rBox ) ) ) -{ -} }; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index ae9a9cbfd0da..72fd6089f4d2 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -643,11 +643,6 @@ void SfxTabDialog::Start_Impl() ActivatePageHdl( m_pT
[Libreoffice-commits] core.git: basic/source include/xmlscript xmlscript/source
basic/source/classes/eventatt.cxx |1 + basic/source/uno/dlgcont.cxx |1 + include/xmlscript/xml_helper.hxx |9 + include/xmlscript/xmldlg_imexp.hxx | 16 +--- include/xmlscript/xmllib_imexp.hxx |5 +++-- include/xmlscript/xmlmod_imexp.hxx |7 +-- xmlscript/source/xml_helper/xml_byteseq.cxx|3 +++ xmlscript/source/xml_helper/xml_element.cxx|1 + xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx |1 + xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx |2 ++ xmlscript/source/xmldlg_imexp/xmldlg_export.cxx|2 ++ xmlscript/source/xmldlg_imexp/xmldlg_import.cxx|1 + xmlscript/source/xmllib_imexp/xmllib_export.cxx|2 ++ xmlscript/source/xmllib_imexp/xmllib_import.cxx|1 + xmlscript/source/xmlmod_imexp/xmlmod_export.cxx|2 ++ xmlscript/source/xmlmod_imexp/xmlmod_import.cxx|1 + 16 files changed, 40 insertions(+), 15 deletions(-) New commits: commit d90ec5d26f1e9ff6afe7544cff8413d105d4d439 Author: Gabor Kelemen AuthorDate: Sun Oct 21 01:16:07 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 09:09:35 2018 +0200 tdf#42949 Fix IWYU warnings in include/xmlscript/* Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iacc5b98b947a26ca920cb9c49e579bc61d69b0c9 Reviewed-on: https://gerrit.libreoffice.org/62119 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index f76f694adb43..8524d0470674 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 7165a99b4fc0..06dd279dfadb 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/include/xmlscript/xml_helper.hxx b/include/xmlscript/xml_helper.hxx index 6ee6c3f5872f..b5fde5dfb13a 100644 --- a/include/xmlscript/xml_helper.hxx +++ b/include/xmlscript/xml_helper.hxx @@ -20,14 +20,15 @@ #define INCLUDED_XMLSCRIPT_XML_HELPER_HXX #include -#include #include -#include -#include -#include +#include #include +namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XDocumentHandler; } } } } } +namespace com { namespace sun { namespace star { namespace io { class XInputStream; } } } } +namespace com { namespace sun { namespace star { namespace io { class XOutputStream; } } } } + namespace xmlscript { diff --git a/include/xmlscript/xmldlg_imexp.hxx b/include/xmlscript/xmldlg_imexp.hxx index 34286a7f66b6..fcacfbf6d898 100644 --- a/include/xmlscript/xmldlg_imexp.hxx +++ b/include/xmlscript/xmldlg_imexp.hxx @@ -19,16 +19,18 @@ #ifndef INCLUDED_XMLSCRIPT_XMLDLG_IMEXP_HXX #define INCLUDED_XMLSCRIPT_XMLDLG_IMEXP_HXX -#include +#include -#include -#include -#include -#include - -#include #include +namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } } } } +namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } } +namespace com { namespace sun { namespace star { namespace io { class XInputStream; } } } } +namespace com { namespace sun { namespace star { namespace io { class XInputStreamProvider; } } } } +namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } } +namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XDocumentHandler; } } } } } +namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XExtendedDocumentHandler; } } } } } + namespace xmlscript { diff --git a/include/xmlscript/xmllib_imexp.hxx b/include/xmlscript/xmllib_imexp.hxx index 6bd49a47b23c..68eb292296c5 100644 --- a/include/xmlscript/xmllib_imexp.hxx +++ b/include/xmlscript/xmllib_imexp.hxx @@ -19,14 +19,15 @@ #ifndef INCLUDED_XMLSCRIPT_XMLLIB_IMEXP_HXX #define INCLUDED_XMLSCRIPT_XMLLIB_IMEXP_HXX -#include #include -#include #include #include +namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XDocumentHandler; } } } } } +namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XWriter; } } } } } + namespace xmlscript { diff --git a/include/xmlscript/xmlmod_imexp.hxx b/include/xmlscript/xmlmod_imexp.hxx index dd974cc712f6..df0c4cabae15 100644 --- a/include/xmlscript/xmlmod_imexp.hxx +++ b/include/xmlscript/xmlmod_imexp.hxx @@ -19,10 +19,13 @@ #ifndef INCLUDED_XMLSCRIPT_XMLMOD_IMEXP_HXX #define INCLUDED_XMLSCRIPT_XMLMOD_IMEXP_HXX -#include -#include
[Libreoffice-commits] core.git: include/vcl
include/vcl/filter/pdfdocument.hxx | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) New commits: commit 8160d5db205e44c1a218b0cbcf63278578e5f063 Author: Miklos Vajna AuthorDate: Wed Oct 24 21:18:44 2018 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 25 09:04:24 2018 +0200 vcl: use default member initializer for PDFElement Less code and other classes in the same header already do this. Change-Id: I8a64cabcdb4b95acb7e2f55ec371568702d9c331 Reviewed-on: https://gerrit.libreoffice.org/62333 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx index c245c815617b..3ec08020044a 100644 --- a/include/vcl/filter/pdfdocument.hxx +++ b/include/vcl/filter/pdfdocument.hxx @@ -51,15 +51,11 @@ class PDFNumberElement; /// A byte range in a PDF file. class VCL_DLLPUBLIC PDFElement { -bool m_bVisiting; -bool m_bParsing; +bool m_bVisiting = false; +bool m_bParsing = false; public: -PDFElement() -: m_bVisiting(false) -, m_bParsing(false) -{ -} +PDFElement() = default; virtual bool Read(SvStream& rStream) = 0; virtual ~PDFElement() = default; void setVisiting(bool bVisiting) { m_bVisiting = bVisiting; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source sw/qa
oox/source/export/drawingml.cxx | 30 +++--- sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx |binary 2 files changed, 6 insertions(+), 24 deletions(-) New commits: commit ba60a132e788201d4074c576352b4f462c16a9c6 Author: Adam Kovacs AuthorDate: Sat Oct 13 07:06:47 2018 -0400 Commit: László Németh CommitDate: Thu Oct 25 08:59:51 2018 +0200 tdf#108064 OOXML export: keep preset dashes with linewidth < 1pt Before this patch prstDash xml tags were preserved only with linewidth 1/4 pt, 1/2 pt or 3/4 pt below 1 pt. Now it is working for example with 0.33 pt. Change-Id: I36372edfaea560d8913cd4aa8ee551ee059ec682 Reviewed-on: https://gerrit.libreoffice.org/61737 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8d68fce8072e..5968cd9dd67c 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -661,6 +661,7 @@ void DrawingML::WriteOutline( const Reference& rXPropSet, Referenc if (GetProperty(rXPropSet, "LineDash")) { aLineDash = mAny.get(); +//this query is good for shapes, but in the case of charts it returns 0 values if (aLineDash.Dots == 0 && aLineDash.DotLen == 0 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 0) { OUString aLineDashName; GET(aLineDashName, LineDashName); @@ -733,31 +734,12 @@ void DrawingML::WriteOutline( const Reference& rXPropSet, Referenc int relDotLen = nLineWidth ? aLineDash.DotLen / nLineWidth : 0; int relDashLen = nLineWidth ? aLineDash.DashLen / nLineWidth : 0; int relDistance = nLineWidth ? aLineDash.Distance / nLineWidth : 0; -// fixing relative values in the case of mso preset linewidths -//todo: fix relDotLen, relDashLen and relDistance in every case of 0-1 linewidth -switch (nLineWidth) +// fixing relative values in the case of linewidths smaller than 1 pt +if (0 < nLineWidth && nLineWidth < 35) //35 HMM == 1 pt { -case 9: // 1/4 pt -{ -relDotLen = relDotLen ? (relDotLen + 1) / 4 : 0; -relDashLen = relDashLen ? (relDashLen + 1) / 4 : 0; -relDistance = relDistance ? (relDistance + 1) / 4 : 0; -break; -} -case 18: // 1/2 pt -{ -relDotLen = relDotLen ? (relDotLen + 1) / 2 : 0; -relDashLen = relDashLen ? (relDashLen + 1) / 2 : 0; -relDistance = relDistance ? (relDistance + 1) / 2 : 0; -break; -} -case 26: // 3/4 pt -{ -relDotLen = relDotLen ? (relDotLen + 1) * 3 / 4 : 0; -relDashLen = relDashLen ? (relDashLen + 1) * 3 / 4 : 0; -relDistance = relDistance ? (relDistance + 1) *3 / 4 : 0; -break; -} +relDotLen = relDotLen ? (relDotLen + 1) * (nLineWidth * 360.0 / 12700) : 0; +relDashLen = relDashLen ? (relDashLen + 1) * (nLineWidth * 360.0 / 12700) : 0; +relDistance = relDistance ? (relDistance + 1) * (nLineWidth * 360.0 / 12700) : 0; } // keep default mso preset linestyles (instead of custdash) if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 0 && relDashLen == 0 && relDistance == 3) diff --git a/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx index f9a0e11d78e2..b8eceb92de90 100644 Binary files a/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx and b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits