[Libreoffice-commits] core.git: sc/inc sfx2/source svl/source
sc/inc/global.hxx|4 sfx2/source/inc/sfxtypes.hxx |4 svl/source/inc/poolio.hxx|4 3 files changed, 12 deletions(-) New commits: commit d9c2523b0c83d0d8cf5874e33f45e018a77aebe4 Author: Gabor Kelemen Date: Sun May 13 23:29:04 2018 +0200 Drop module-specific defines of DELETEZ The one in tools/solar.h is the only one needed. Change-Id: I7a4e041694fb61329d16f300be4f986eb8d4ec48 Reviewed-on: https://gerrit.libreoffice.org/54202 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 912164234597..bbdd26d9d38a 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -272,10 +272,6 @@ namespace o3tl template<> struct typed_flags : is_typed_flags {}; } -#ifndef DELETEZ -#define DELETEZ(pPtr) { delete pPtr; pPtr = 0; } -#endif - enum CellType { CELLTYPE_NONE, diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx index d731086ba5fd..6ee10ed0e41f 100644 --- a/sfx2/source/inc/sfxtypes.hxx +++ b/sfx2/source/inc/sfxtypes.hxx @@ -25,10 +25,6 @@ #include #include -#ifndef DELETEZ -#define DELETEZ(pPtr) ( delete pPtr, pPtr = 0 ) -#endif - #if defined(DBG_UTIL) class SfxStack diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 359b88c863dd..59513517daba 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -30,10 +30,6 @@ class SfxPoolItem; class SfxItemPoolUser; -#ifndef DELETEZ -#define DELETEZ(pPtr) { delete pPtr; pPtr = 0; } -#endif - static const sal_uInt32 SFX_ITEMS_DEFAULT = 0xfffe; /** ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'private/Ashod/cd-5.3.3.2' - 88 commits - accessibility/inc basctl/inc basic/inc basic/source chart2/inc chart2/Library_chartcore.mk chart2/qa chart2/source comp
Rebased ref, commits from common ancestor: commit 94400c94c38724881380a7a3ee9c55a6deeea583 Author: Ashod Nakashian Date: Sun Apr 22 17:21:30 2018 -0400 svx: support no fill and no stroke paths in PDF import Change-Id: Ida5daa71d469805fd52e08e804fb9fa182d7d008 diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 94804d351f79..2a82b78b8dd6 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -1410,11 +1410,24 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int nPageObjectInd float fWidth = 1; FPDFPath_GetStrokeWidth(pPageObject, &fWidth); -SAL_WARN("sd.filter", "Path Stroke Width: " << fWidth); -const double dWidth = fabs(sqrt2(a, c) * fWidth); -SAL_WARN("sd.filter", "Path Stroke Width scaled: " << dWidth); +const double dWidth = 0.5 * fabs(sqrt2(mCurMatrix.a(), mCurMatrix.c()) * fWidth); mnLineWidth = lcl_ToLogic(lcl_PointToPixel(dWidth)); mnLineWidth /= 2; +SAL_WARN("sd.filter", "Path Stroke Width: " << fWidth << ", scaled: " << dWidth +<< ", Logical: " << mnLineWidth); + +int nFillMode = FPDF_FILLMODE_ALTERNATE; +FPDF_BOOL bStroke = true; +if (FPDFPath_GetDrawMode(pPageObject, &nFillMode, &bStroke)) +{ +SAL_WARN("sd.filter", "Got PATH FillMode: " << nFillMode << ", Storke: " << bStroke); +if (nFillMode == FPDF_FILLMODE_ALTERNATE) +mpVD->SetDrawMode(DrawModeFlags::Default); +else if (nFillMode == FPDF_FILLMODE_WINDING) +mpVD->SetDrawMode(DrawModeFlags::Default); +else +mpVD->SetDrawMode(DrawModeFlags::NoFill); +} unsigned int nR; unsigned int nG; @@ -1424,15 +1437,15 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int nPageObjectInd SAL_WARN("sd.filter", "Got PATH fill color: " << nR << ", " << nG << ", " << nB << ", " << nA); mpVD->SetFillColor(Color(nR, nG, nB)); -FPDFPath_GetStrokeColor(pPageObject, &nR, &nG, &nB, &nA); -SAL_WARN("sd.filter", - "Got PATH stroke color: " << nR << ", " << nG << ", " << nB << ", " << nA); -mpVD->SetLineColor(Color(nR, nG, nB)); - -// int nFillMode = 0; // No fill. -// bool bStroke = false; -// FPDFPath_GetDrawMode(pPageObject, &nFillMode, &bStroke); -// mpVD->Setstroke(Color(r, g, b)); +if (bStroke) +{ +FPDFPath_GetStrokeColor(pPageObject, &nR, &nG, &nB, &nA); +SAL_WARN("sd.filter", + "Got PATH stroke color: " << nR << ", " << nG << ", " << nB << ", " << nA); +mpVD->SetLineColor(Color(nR, nG, nB)); +} +else +mpVD->SetLineColor(COL_TRANSPARENT); // if(!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(basegfx::B2DPolyPolygon(aSource))) commit ae1c99eed4d2fb130e7f99afb409625c1389 Author: Ashod Nakashian Date: Sun Apr 22 17:01:18 2018 -0400 svx: support sub-paths in PDF import Change-Id: Ibcfd30383db6846e791aea7609ab196c4f3f2da4 diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index c5d50642e32b..94804d351f79 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -1313,17 +1313,19 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject, int nPageObjectIn void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex) { -SAL_WARN("sd.filter", "Got page object PATH: " << nPageObjectIndex); - double a, b, c, d, e, f; FPDFPath_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f); Matrix aPathMatrix(a, b, c, d, e, f); aPathMatrix.Concatinate(mCurMatrix); +basegfx::B2DPolyPolygon aPolyPoly; basegfx::B2DPolygon aPoly; std::vector aBezier; const int nSegments = FPDFPath_CountSegments(pPageObject); +SAL_WARN("sd.filter", + "Got page object PATH: " << nPageObjectIndex << " with " << nSegments << " segments."); + for (int nSegmentIndex = 0; nSegmentIndex < nSegments; ++nSegmentIndex) { FPDF_PATHSEGMENT pPathSegment = FPDFPath_GetPathSegment(pPageObject, nSegmentIndex); @@ -1338,16 +1340,16 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int nPageObjectInd double x = fx; double y = fy; -SAL_WARN("sd.filter", "Got point (" << x << ", " << y << ") matrix (" << a << ", " << b -<< ", " << c << ", " << d << ", " << e << ", " << f -<< ')'); aPathMatrix.Transform(x, y); - const bool bClose = FPDFPathSegment_GetClose(pPathSegment); if (bClose) aPoly.setClosed(bClose); // TODO: Review -SAL_WARN("sd.filter", - "Point corrected (" << x << ", " << y << "): " << (bClose ? "CLOSE" : "OPEN")); + +SAL_WARN("sd.filter", "Got " << (bClose
[Libreoffice-commits] core.git: o3tl/qa
o3tl/qa/test-sorted_vector.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d07f9e4d4ac6fb4d9074605b034e81cb7353f417 Author: Andrea Gelmini Date: Sun May 13 21:01:33 2018 +0200 Fix typo Change-Id: I87fce20463564fe9b32912fcbaf691c1c2839e2b Reviewed-on: https://gerrit.libreoffice.org/54201 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx index 2a1f87d93dc8..3de3f005f6c6 100644 --- a/o3tl/qa/test-sorted_vector.cxx +++ b/o3tl/qa/test-sorted_vector.cxx @@ -44,7 +44,7 @@ public: SwContent *p3 = new SwContent(3); std::unique_ptr p4( new SwContent(4) ); -// insert p3, p1 -> not presernt -> second is true +// insert p3, p1 -> not present -> second is true CPPUNIT_ASSERT( aVec.insert(p3).second ); CPPUNIT_ASSERT( aVec.insert(p1.get()).second ); // insert p3 again -> already present -> second is false ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 6 commits - download.lst external/curl Makefile.fetch RepositoryExternal.mk
Makefile.fetch |2 RepositoryExternal.mk|2 download.lst |3 external/curl/ExternalPackage_curl.mk| 10 external/curl/ExternalProject_curl.mk| 37 + external/curl/NSS-support-for-CERTINFO-feature.patch | 391 --- external/curl/UnpackedTarball_curl.mk|7 external/curl/curl-7.26.0_win-proxy.patch| 97 ++-- external/curl/curl-msvc-disable-protocols.patch.1| 35 + external/curl/curl-msvc-schannel.patch.1 | 22 - external/curl/curl-msvc.patch.1 | 48 +- 11 files changed, 140 insertions(+), 514 deletions(-) New commits: commit 596a17b2a616a627c9ab17dc4dd29c7ab6db Author: Michael Stahl Date: Wed Jan 24 11:44:26 2018 +0100 curl: upgrade to release 7.58.0 * fixes 2 CVEs * disable some new optional dependencies Change-Id: If7725d126e68de04b67969a83c0ea08573a43679 Reviewed-on: https://gerrit.libreoffice.org/48493 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 5e3799a0c8a92918b9e1868c942f8918ff61c003) Reviewed-on: https://gerrit.libreoffice.org/48539 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/download.lst b/download.lst index 2546b381f655..4c8ea886c240 100644 --- a/download.lst +++ b/download.lst @@ -2,8 +2,8 @@ ABW_MD5SUM := 40fa48e03b1e28ae0325cc34b35bc46d export ABW_TARBALL := libabw-0.0.2.tar.bz2 CDR_MD5SUM := fbcd8619fc6646f41d527c1329102998 export CDR_TARBALL := libcdr-0.0.15.tar.bz2 -CURL_MD5SUM := 7ce35f207562674e71dbada6891b37e3f043c1e7a82915cb9c2a17ad3a9d659b -export CURL_TARBALL := curl-7.57.0.tar.gz +CURL_MD5SUM := cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115 +export CURL_TARBALL := curl-7.58.0.tar.gz EBOOK_MD5SUM := 2f1ceaf2ac8752ed278e175447d9b978 export EBOOK_TARBALL := libe-book-0.0.3.tar.bz2 ETONYEK_MD5SUM := 3c50bc60394d1f2675fbf9bd22581363 diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk index 4efc3ef03cff..457b66239cc2 100644 --- a/external/curl/ExternalProject_curl.mk +++ b/external/curl/ExternalProject_curl.mk @@ -40,13 +40,21 @@ $(call gb_ExternalProject_get_state_target,curl,build): CPPFLAGS="$(curl_CPPFLAGS)" \ LDFLAGS=$(curl_LDFLAGS) \ ./configure \ - $(if $(filter MACOSX IOS,$(OS)),\ - --with-darwinssl, \ - --with-nss$(if $(filter NO,$(SYSTEM_NSS)),="$(call gb_UnpackedTarball_get_dir,nss)/dist/out")) \ - --without-ssl \ - --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \ - --disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \ - $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(if $(filter IOS MACOSX,$(OS)),\ + --with-darwinssl,\ + $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \ + --without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \ + --enable-ftp --enable-http --enable-ipv6 \ + --without-libidn2 --without-libpsl --without-librtmp \ + --without-libssh2 --without-metalink --without-nghttp2 \ + --without-libssh --without-brotli \ + --disable-ares \ + --disable-dict --disable-file --disable-gopher --disable-imap \ + --disable-ldap --disable-ldaps --disable-manual --disable-pop3 \ + --disable-rtsp --disable-smb --disable-smtp --disable-telnet \ + --disable-tftp \ + $(if $(filter LINUX,$(OS)),--without-ca-bundle --without-ca-path) \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \ && cd lib \ commit 8ce5fffd5b57f7303d7df5830de30af870c04660 Author: Michael Stahl Date: Wed Nov 29 11:30:49 2017 +0100 curl: upgrade to release 7.57.0 fixes 3 CVEs Change-Id: Idf5eee66fac399a2b338c2a9aaea2f56d2cb3a51 Reviewed-on: https://gerrit.libreoffice.org/45480 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit a16eb857f3497a5ac65a7c7e89d0d6b8614aeb5e) Reviewed-on: https://gerrit.libreoffice.org/45510
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 48/28086a389647c04a5854b07587b229c9176269
48/28086a389647c04a5854b07587b229c9176269 |1 + 1 file changed, 1 insertion(+) New commits: commit b0f4dfacdb7708e0377050f659a1240b3439e0e2 Author: Caolán McNamara Date: Sun May 13 21:23:54 2018 +0100 Notes added by 'git notes add' diff --git a/48/28086a389647c04a5854b07587b229c9176269 b/48/28086a389647c04a5854b07587b229c9176269 new file mode 100644 index ..e95b17218191 --- /dev/null +++ b/48/28086a389647c04a5854b07587b229c9176269 @@ -0,0 +1 @@ +prefer: f5ca04caca1b6888cdc6b00b8465a53e6d5cf38d ___ 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/swriter/01/mm_savemergeddoc.xhp |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 88fef6367411f87b870369389ac79ce43bcf0d7b Author: Caolán McNamara Date: Sun May 13 18:06:52 2018 +0100 update helpids Change-Id: I32fcc7514ed75fcf9c5a140d1a9f70e70001c3d1 diff --git a/source/text/swriter/01/mm_savemergeddoc.xhp b/source/text/swriter/01/mm_savemergeddoc.xhp index 3451bb256..c3b841357 100644 --- a/source/text/swriter/01/mm_savemergeddoc.xhp +++ b/source/text/swriter/01/mm_savemergeddoc.xhp @@ -49,11 +49,11 @@ From Selects a range of records starting at the record number in the From box and ending at the record number in the To box. - + From Enter the number of the first record to include in the mail merge. - + To Enter the number of the last record to include in the mail merge. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 96337c845c026236975d6a8af52867a5e8d28430 Author: Caolán McNamara Date: Sun May 13 18:06:52 2018 +0100 Updated core Project: help 88fef6367411f87b870369389ac79ce43bcf0d7b update helpids Change-Id: I32fcc7514ed75fcf9c5a140d1a9f70e70001c3d1 diff --git a/helpcontent2 b/helpcontent2 index d6cf5222fb61..88fef6367411 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit d6cf5222fb6188eed6bad6cb3e0f5ee9bdafb5d2 +Subproject commit 88fef6367411f87b870369389ac79ce43bcf0d7b ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - solenv/bin svtools/source
solenv/bin/modules/ExtensionsLst.pm |2 +- svtools/source/dialogs/addresstemplate.cxx |2 +- svtools/source/filter/FilterConfigCache.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 4828086a389647c04a5854b07587b229c9176269 Author: Matthias Seidel Date: Sun May 13 19:38:57 2018 + Fixed typos (successfull -> successful) diff --git a/solenv/bin/modules/ExtensionsLst.pm b/solenv/bin/modules/ExtensionsLst.pm index 7b4eaa4f7cf3..8754d8b2e1dc 100644 --- a/solenv/bin/modules/ExtensionsLst.pm +++ b/solenv/bin/modules/ExtensionsLst.pm @@ -483,7 +483,7 @@ sub Download (@) my $last_was_redirect = 0; my $response = $agent->get($URL); -# When download was successfull then check the md5 checksum and rename the .part file +# When download was successful then check the md5 checksum and rename the .part file # into the actual extension name. if ($response->is_success()) { diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 0b73ed8120fc..5771acb22122 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -834,7 +834,7 @@ void AssignmentPersistentData::Commit() WaitObject aWaitCursor(this); -// no matter what we do here, we handled the currently selected data source (no matter if successfull or not) +// no matter what we do here, we handled the currently selected data source (no matter if successful or not) m_aDatasource.SaveValue(); // create an interaction handler (may be needed for connecting) diff --git a/svtools/source/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx index 08901ce113a8..d18d28902d55 100644 --- a/svtools/source/filter/FilterConfigCache.cxx +++ b/svtools/source/filter/FilterConfigCache.cxx @@ -129,7 +129,7 @@ String FilterConfigCache::FilterConfigCacheEntry::GetShortName() specify, which config package should be opened. Must be one of the defined static values TYPEPKG or FILTERPKG. -@return A valid object if open was successfull. The access on opened +@return A valid object if open was successful. The access on opened data will be readonly. It returns NULL in case open failed. @throws It let pass RuntimeExceptions only. ___ 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/dbui/mmresultdialogs.cxx| 87 +++ sw/source/ui/dialog/swdlgfact.cxx|6 - sw/source/ui/dialog/swdlgfact.hxx|2 sw/source/ui/inc/mmresultdialogs.hxx | 27 +++- sw/source/uibase/app/apphdl.cxx |2 sw/uiconfig/swriter/ui/mmresultsavedialog.ui | 40 +--- 7 files changed, 87 insertions(+), 79 deletions(-) New commits: commit 4a1cdfef802deacf119c56ea51d5fddd59aeb17a Author: Caolán McNamara Date: Sun May 13 19:33:11 2018 +0100 weld SwMMResultSaveDialog and set a proper parent for it Change-Id: Ia03e549e9fdde5925d85af3332d63253d9fbe911 Reviewed-on: https://gerrit.libreoffice.org/54199 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 67aecd817661..5caf37cb4c5b 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -498,7 +498,7 @@ public: // for tabpage virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0; -virtual void ExecuteMMResultSaveDialog() = 0; +virtual void ExecuteMMResultSaveDialog(weld::Window* pParent) = 0; virtual void ExecuteMMResultPrintDialog(weld::Window* pParent) = 0; virtual void ExecuteMMResultEmailDialog() = 0; diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index b2f8cb2c3d7e..b0c82cbc2ac5 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -208,50 +208,36 @@ public: void SetBCC(const OUString& rSet) {m_xBCCED->set_text(rSet);} }; -SwMMResultSaveDialog::SwMMResultSaveDialog() -: SfxModalDialog(nullptr, "MMResultSaveDialog", "modules/swriter/ui/mmresultsavedialog.ui"), -m_bCancelSaving(false) +SwMMResultSaveDialog::SwMMResultSaveDialog(weld::Window* pParent) +: GenericDialogController(pParent, "modules/swriter/ui/mmresultsavedialog.ui", "MMResultSaveDialog") +, m_bCancelSaving(false) +, m_xSaveAsOneRB(m_xBuilder->weld_radio_button("singlerb")) +, m_xSaveIndividualRB(m_xBuilder->weld_radio_button("individualrb")) +, m_xFromRB(m_xBuilder->weld_radio_button("fromrb")) +, m_xFromNF(m_xBuilder->weld_spin_button("from")) +, m_xToFT(m_xBuilder->weld_label("toft")) +, m_xToNF(m_xBuilder->weld_spin_button("to")) +, m_xOKButton(m_xBuilder->weld_button("ok")) { -get(m_pSaveAsOneRB, "singlerb"); -get(m_pSaveIndividualRB, "individualrb"); -get(m_pFromRB, "fromrb"); -get(m_pFromNF, "from-nospin"); -get(m_pToFT, "toft"); -get(m_pToNF, "to-nospin"); -get(m_pOKButton, "ok"); - -Link aLink = LINK(this, SwMMResultSaveDialog, DocumentSelectionHdl_Impl); -m_pSaveAsOneRB->SetClickHdl(aLink); -m_pSaveIndividualRB->SetClickHdl(aLink); -m_pFromRB->SetClickHdl(aLink); +Link aLink = LINK(this, SwMMResultSaveDialog, DocumentSelectionHdl_Impl); +m_xSaveAsOneRB->connect_toggled(aLink); +m_xSaveIndividualRB->connect_toggled(aLink); +m_xFromRB->connect_toggled(aLink); // m_pSaveAsOneRB is the default, so disable m_pFromNF and m_pToNF initially. -aLink.Call(m_pSaveAsOneRB); +aLink.Call(*m_xSaveAsOneRB); SwView* pView = ::GetActiveView(); std::shared_ptr xConfigItem = pView->GetMailMergeConfigItem(); assert(xConfigItem); sal_Int32 nCount = xConfigItem->GetMergedDocumentCount(); -m_pToNF->SetMax(nCount); -m_pToNF->SetValue(nCount); +m_xFromNF->set_max(nCount); +m_xToNF->set_max(nCount); +m_xToNF->set_value(nCount); -m_pOKButton->SetClickHdl(LINK(this, SwMMResultSaveDialog, SaveOutputHdl_Impl)); +m_xOKButton->connect_clicked(LINK(this, SwMMResultSaveDialog, SaveOutputHdl_Impl)); } SwMMResultSaveDialog::~SwMMResultSaveDialog() { -disposeOnce(); -} - -void SwMMResultSaveDialog::dispose() -{ -m_pSaveAsOneRB.clear(); -m_pSaveIndividualRB.clear(); -m_pFromRB.clear(); -m_pFromNF.clear(); -m_pToFT.clear(); -m_pToNF.clear(); -m_pOKButton.clear(); - -SfxModalDialog::dispose(); } SwMMResultPrintDialog::SwMMResultPrintDialog(weld::Window* pParent) @@ -440,12 +426,12 @@ void SwMMResultEmailDialog::FillInEmailSettings() } -IMPL_LINK(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, Button*, pButton, void) +IMPL_LINK(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, weld::ToggleButton&, rButton, void) { -bool bEnableFromTo = pButton == m_pFromRB; -m_pFromNF->Enable(bEnableFromTo); -m_pToFT->Enable(bEnableFromTo); -m_pToNF->Enable(bEnableFromTo); +bool bEnableFromTo = &rButton == m_xFromRB.get(); +m_xFromNF->set_sensitive(bEnableFromTo); +m_xToFT->set_sensitive(bEnableFromTo); +m_xToNF->set_sensitive(bEnableFromTo); } IMPL_LINK(SwMMResultPrintDialog, DocumentSelectionHdl_Impl, weld::ToggleButton&, rButton, void) @@
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/misc/glossary.cxx | 132 +++-- sw/uiconfig/swriter/ui/renameautotextdialog.ui | 42 +++ 2 files changed, 76 insertions(+), 98 deletions(-) New commits: commit 9f55cc13d64b4c8d60b1ff2e93ed854b0dccad46 Author: Caolán McNamara Date: Sun May 13 17:55:03 2018 +0100 weld SwNewGlosNameDlg Change-Id: Ie1c320958813bfb602da46738782b9e1e9fe5a9e Reviewed-on: https://gerrit.libreoffice.org/54196 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index b38de3134e14..c62a67a214c6 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -114,64 +114,54 @@ struct GroupUserData }; // dialog for new block name -class SwNewGlosNameDlg : public ModalDialog +class SwNewGlosNameDlg : public weld::GenericDialogController { -VclPtrm_pNewName; TextFilter m_aNoSpaceFilter; -VclPtrm_pNewShort; -VclPtrm_pOk; -VclPtrm_pOldName; -VclPtrm_pOldShort; +VclPtr m_pParent; + +std::unique_ptr m_xNewName; +std::unique_ptr m_xNewShort; +std::unique_ptr m_xOk; +std::unique_ptr m_xOldName; +std::unique_ptr m_xOldShort; protected: -DECL_LINK( Modify, Edit&, void ); -DECL_LINK(Rename, Button*, void); +DECL_LINK(Modify, weld::Entry&, void); +DECL_LINK(Rename, weld::Button&, void); +DECL_LINK(TextFilterHdl, OUString&, bool); public: -SwNewGlosNameDlg( vcl::Window* pParent, - const OUString& rOldName, - const OUString& rOldShort ); -virtual ~SwNewGlosNameDlg() override; -virtual void dispose() override; - -OUString GetNewName() const { return m_pNewName->GetText(); } -OUString GetNewShort() const { return m_pNewShort->GetText(); } -}; +SwNewGlosNameDlg(SwGlossaryDlg* pParent, + const OUString& rOldName, + const OUString& rOldShort); -SwNewGlosNameDlg::SwNewGlosNameDlg(vcl::Window* pParent, -const OUString& rOldName, -const OUString& rOldShort ) -: ModalDialog(pParent, "RenameAutoTextDialog", -"modules/swriter/ui/renameautotextdialog.ui") -{ -get(m_pNewName, "newname"); -get(m_pNewShort, "newsc"); -m_pNewShort->SetTextFilter(&m_aNoSpaceFilter); -get(m_pOk, "ok"); -get(m_pOldName, "oldname"); -get(m_pOldShort, "oldsc"); - -m_pOldName->SetText( rOldName ); -m_pOldShort->SetText( rOldShort ); -m_pNewName->SetModifyHdl(LINK(this, SwNewGlosNameDlg, Modify )); -m_pNewShort->SetModifyHdl(LINK(this, SwNewGlosNameDlg, Modify )); -m_pOk->SetClickHdl(LINK(this, SwNewGlosNameDlg, Rename )); -m_pNewName->GrabFocus(); -} +OUString GetNewName() const { return m_xNewName->get_text(); } +OUString GetNewShort() const { return m_xNewShort->get_text(); } +}; -SwNewGlosNameDlg::~SwNewGlosNameDlg() +IMPL_LINK(SwNewGlosNameDlg, TextFilterHdl, OUString&, rTest, bool) { -disposeOnce(); +rTest = m_aNoSpaceFilter.filter(rTest); +return true; } -void SwNewGlosNameDlg::dispose() +SwNewGlosNameDlg::SwNewGlosNameDlg(SwGlossaryDlg* pParent, const OUString& rOldName, const OUString& rOldShort) +: GenericDialogController(pParent->GetFrameWeld(), "modules/swriter/ui/renameautotextdialog.ui", "RenameAutoTextDialog") +, m_pParent(pParent) +, m_xNewName(m_xBuilder->weld_entry("newname")) +, m_xNewShort(m_xBuilder->weld_entry("newsc")) +, m_xOk(m_xBuilder->weld_button("ok")) +, m_xOldName(m_xBuilder->weld_entry("oldname")) +, m_xOldShort(m_xBuilder->weld_entry("oldsc")) { -m_pNewName.clear(); -m_pNewShort.clear(); -m_pOk.clear(); -m_pOldName.clear(); -m_pOldShort.clear(); -ModalDialog::dispose(); +m_xNewShort->connect_insert_text(LINK(this, SwNewGlosNameDlg, TextFilterHdl)); + +m_xOldName->set_text(rOldName); +m_xOldShort->set_text(rOldShort); +m_xNewName->connect_changed(LINK(this, SwNewGlosNameDlg, Modify )); +m_xNewShort->connect_changed(LINK(this, SwNewGlosNameDlg, Modify )); +m_xOk->connect_clicked(LINK(this, SwNewGlosNameDlg, Rename )); +m_xNewName->grab_focus(); } // query / set currently set group @@ -503,17 +493,15 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) else if (sItemIdent == "rename") { m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText())); -ScopedVclPtrInstance pNewNameDlg(this, m_pNameED->GetText(), - m_pShortNameEdit->GetText()); -if( RET_OK == pNewNameDlg->Execute() && -pGlossaryHdl->Rename( m_pShortNameEdit->GetText(), -pNewNameDlg->GetNewShort(), -pNewNameDlg->GetNewName(
Fwd: Gsoc 2018 Introduction
-- Forwarded message -- From: Raghav Lalvani Date: Mon, May 14, 2018 at 12:04 AM Subject: Gsoc 2018 Introduction To: libreoffice@lists.freedesktop.org Hello Everyone, Let me introduce myself: I am Raghav Lalvani currently pursuing Btech in CSE from Christ University, Bengaluru, India. My project aims at improving the LibreOffice Android Client by fixing its most annoying bugs. Adding new features to document viewer and experimental editing part, Enhancing overall UI/UX, performance and Making it more developer friendly by improving documentation and inline commands. https://summerofcode.withgoogle.com/projects/#4871954650103808 I am in the middle of LO Build on windows. Thanks for the opportunity and I look forward to a great summer working with LibreOffice. Regard, Raghav ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Gsoc 2018 Introduction
Hello Everyone, Let me introduce myself: I am Raghav Lalvani currently pursuing Btech in CSE from Christ University, Bengaluru, India. My project aims at improving the LibreOffice Android Client by fixing its most annoying bugs. Adding new features to document viewer and experimental editing part, Enhancing overall UI/UX, performance and Making it more developer friendly by improving documentation and inline commands. https://summerofcode.withgoogle.com/projects/#4871954650103808 I am in the middle of LO Build on windows. Thanks for the opportunity and I look forward to a great summer working with LibreOffice. Regard, Raghav ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/svx sd/inc sd/qa sd/source sd/uiconfig
include/svx/langbox.hxx |2 sd/inc/sdabstdlg.hxx|2 sd/qa/unit/dialogs-test.cxx |5 sd/source/ui/dlg/dlgfield.cxx | 190 sd/source/ui/dlg/sddlgfact.cxx | 14 +- sd/source/ui/dlg/sddlgfact.hxx | 11 +- sd/source/ui/inc/dlgfield.hxx | 25 +--- sd/source/ui/view/drviews2.cxx |3 sd/source/ui/view/outlnvs2.cxx |3 sd/uiconfig/simpress/ui/dlgfield.ui | 23 +++- 10 files changed, 144 insertions(+), 134 deletions(-) New commits: commit 1bbc741c078899a16cedd78def6d4107f3ed4c96 Author: Caolán McNamara Date: Fri May 11 16:11:47 2018 +0100 weld SdModifyFieldDlg Change-Id: I7e84f09b854d30474d37dfb3ce47a8a739dd5543 Reviewed-on: https://gerrit.libreoffice.org/54148 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx index b64f5d28fc3f..3b91701f8df9 100644 --- a/include/svx/langbox.hxx +++ b/include/svx/langbox.hxx @@ -170,6 +170,8 @@ public: voidSelectEntryPos(int nPos) { m_xControl->set_active(nPos); } void connect_changed(const Link& rLink) { m_aChangeHdl = rLink; } +void save_value() { m_xControl->save_value(); } +bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); } void hide() { m_xControl->hide(); } }; diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 27fb17ddd9ed..076555758960 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -177,7 +177,7 @@ public: virtual VclPtr CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; virtual VclPtr CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; virtual VclPtr CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0; -virtual VclPtr CreateSdModifyFieldDlg(vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; +virtual VclPtr CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; virtual VclPtr CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; virtual VclPtr CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; virtual VclPtr CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 8a2d6603ac55..d68ef7e4b5e1 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -338,9 +338,10 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) } case 6: { -// CreateSdModifyFieldDlg(vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) override; +// CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) override; +auto const parent = getViewShell()->GetActiveWindow(); pRetval = getSdAbstractDialogFactory()->CreateSdModifyFieldDlg( -Application::GetDefDialogParent(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), nullptr, getEmptySfxItemSet()); break; diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index b20291547764..0f185c25813f 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -38,36 +38,24 @@ /** * dialog to edit field commands */ -SdModifyFieldDlg::SdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) : -ModalDialog ( pWindow, "EditFieldsDialog", "modules/simpress/ui/dlgfield.ui" ), -maInputSet ( rSet ), -pField ( pInField ) +SdModifyFieldDlg::SdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) +: GenericDialogController(pWindow, "modules/simpress/ui/dlgfield.ui", "EditFieldsDialog") +, m_aInputSet(rSet) +, m_pField(pInField) +, m_xRbtFix(m_xBuilder->weld_radio_button("fixedRB")) +, m_xRbtVar(m_xBuilder->weld_radio_button("varRB")) +, m_xLbLanguage(new LanguageBox(m_xBuilder->weld_combo_box_text("languageLB"))) +, m_xLbFormat(m_xBuilder->weld_combo_box_text("formatLB")) { -get(m_pRbtFix, "fixedRB"); -get(m_pRbtVar, "varRB"); -get(m_pLbLanguage, "languageLB"); -get(m_pLbFormat, "formatLB"); - -m_pLbLanguage->SetLanguageList( SvxLanguageListFlags::ALL|SvxLanguageListFlags::ONLY_KNOWN, false ); -m_pLbLanguage->SetSelectHdl( LINK( this, SdModifyFieldDlg, LanguageChangeHdl ) ); +m_xLbLanguage->SetLanguageLis
[Libreoffice-commits] core.git: extensions/test sc/source svx/source
extensions/test/ole/EventListenerSample/EventListener/EventListener.rc |4 ++-- sc/source/ui/docshell/docsh8.cxx |2 +- svx/source/form/fmmodel.cxx|4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) New commits: commit b8a51074ae8dd40549947b7239a80ee6b9731e2f Author: Johnny_M Date: Thu May 10 13:46:13 2018 +0200 Translate German comments Change-Id: I6a03e921b28da5ac26235f32f547f36e00a47e46 Reviewed-on: https://gerrit.libreoffice.org/54079 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc b/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc index 532ff23f2666..2de599591d67 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc +++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.rc @@ -31,7 +31,7 @@ #undef APSTUDIO_READONLY_SYMBOLS -// Deutsch (Deutschland) resources +// German (Germany) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) #ifdef _WIN32 @@ -118,7 +118,7 @@ BEGIN IDS_PROJNAME"EventListener" END -#endif// Deutsch (Deutschland) resources +#endif// German (Germany) resources diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index d9781310ebdd..d9631c8443e2 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -912,7 +912,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding if (!aCell.isEmpty()) { if (aCell.meType == CELLTYPE_EDIT) -{ // Paragraphs erhalten +{ // preserve paragraphs lcl_getLongVarCharEditString(aString, aCell, aEditEngine); } else diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 1fc2b4844f59..ef5f56e09c41 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -100,7 +100,7 @@ SdrPage* FmFormModel::AllocPage(bool bMasterPage) void FmFormModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos) { -// hack solange method intern +// hack for as long as the method is internal if (m_pObjShell && !m_pImpl->mxUndoEnv->IsListening( *m_pObjShell )) SetObjectShell(m_pObjShell); @@ -126,7 +126,7 @@ SdrPage* FmFormModel::RemovePage(sal_uInt16 nPgNum) void FmFormModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos) { -// hack solange method intern +// hack for as long as the method is internal if (m_pObjShell && !m_pImpl->mxUndoEnv->IsListening( *m_pObjShell )) SetObjectShell(m_pObjShell); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svgio/qa svgio/source
svgio/qa/cppunit/SvgImportTest.cxx| 66 +- svgio/qa/cppunit/data/Drawing_NoWidthHeight.svg | 12 svgio/qa/cppunit/data/Drawing_WithWidthHeight.svg | 14 svgio/source/svgreader/svgsvgnode.cxx | 51 +++-- 4 files changed, 124 insertions(+), 19 deletions(-) New commits: commit 7e6dac4edce063a766497ecb498e293bf4e16e66 Author: Tomaž Vajngerl Date: Sun May 13 20:21:17 2018 +0900 svgio: fix rendering when the width/height isn't present in SVG The general size of the image should be the same when width/height attributes are present. It is very wrong to assume the size of the image is the area covered by all the primitives in the image. Change-Id: I56f241e84dee37796f9804ce2569c4eb416e83a0 Reviewed-on: https://gerrit.libreoffice.org/54191 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index a83ec4aae189..6b71a0dfeb7a 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -27,11 +27,13 @@ namespace { +using namespace css; using namespace css::uno; using namespace css::io; using namespace css::graphic; using drawinglayer::primitive2d::Primitive2DSequence; using drawinglayer::primitive2d::Primitive2DContainer; +using drawinglayer::primitive2d::Primitive2DReference; class Test : public test::BootstrapFixture, public XmlTestTools { @@ -61,6 +63,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testMaskText(); void testTdf4(); void testTdf101237(); +void testBehaviourWhenWidthAndHeightIsOrIsNotSet(); Primitive2DSequence parseSvg(const OUString& aSource); @@ -90,6 +93,7 @@ public: CPPUNIT_TEST(testMaskText); CPPUNIT_TEST(testTdf4); CPPUNIT_TEST(testTdf101237); +CPPUNIT_TEST(testBehaviourWhenWidthAndHeightIsOrIsNotSet); CPPUNIT_TEST_SUITE_END(); }; @@ -132,7 +136,6 @@ void Test::checkRectPrimitive(Primitive2DSequence const & rPrimitive) } - bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB) { const sal_Int32 nCount(rA.getLength()); @@ -629,7 +632,68 @@ void Test::testTdf101237() assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", "color", "#ff"); assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line", "color", "#00"); assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line", "width", "5"); +} + +void Test::testBehaviourWhenWidthAndHeightIsOrIsNotSet() +{ +// This test checks the behaviour when width and height attributes +// are and are not set. In both cases the result must be the same, +// however if the width / height are set, then the size of the image +// is enforced, but this isn't really possible in LibreOffice (or +// maybe we could lock the size in this case). +// The behaviour in browsers is that when a SVG image has width / height +// attributes set, then the image is shown with that size, but if it +// isn't set then it is shown as scalable image which is the size of +// the container. + +{ +Primitive2DSequence aSequence = parseSvg("svgio/qa/cppunit/data/Drawing_WithWidthHeight.svg"); +CPPUNIT_ASSERT(aSequence.hasElements()); + +geometry::RealRectangle2D aRealRect; +basegfx::B2DRange aRange; +uno::Sequence aViewParameters; + +for (Primitive2DReference const & xReference : aSequence) +{ +if (xReference.is()) +{ +aRealRect = xReference->getRange(aViewParameters); +aRange.expand(basegfx::B2DRange(aRealRect.X1, aRealRect.Y1, aRealRect.X2, aRealRect.Y2)); +} +} + +double fWidth = (aRange.getWidth() / 2540.0) * 96.0; +double fHeight = (aRange.getHeight() / 2540.0) * 96.0; + +CPPUNIT_ASSERT_DOUBLES_EQUAL(11.0, fWidth, 1E-12); +CPPUNIT_ASSERT_DOUBLES_EQUAL(11.0, fHeight, 1E-12); +} + +{ +Primitive2DSequence aSequence = parseSvg("svgio/qa/cppunit/data/Drawing_NoWidthHeight.svg"); +CPPUNIT_ASSERT(aSequence.hasElements()); + +geometry::RealRectangle2D aRealRect; +basegfx::B2DRange aRange; +uno::Sequence aViewParameters; + +for (Primitive2DReference const & xReference : aSequence) +{ +if (xReference.is()) +{ +aRealRect = xReference->getRange(aViewParameters); +aRange.expand(basegfx::B2DRange(aRealRect.X1, aRealRect.Y1, aRealRect.X2, aRealRect.Y2)); +} +} + +double fWidth = (aRange.getWidth() / 2540.0) * 96.0; +double fHeight = (aRange.getHeight() / 2540.0) * 96.0; + +CPPUNIT_ASSERT_DOUBLES_EQUAL(11.0, fWidth, 1E-12); +CPPUNIT_ASSERT_DOUBLES_EQUAL(11.0, fHeight, 1E-12); +
[Libreoffice-commits] core.git: o3tl/qa
o3tl/qa/test-sorted_vector.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 72ce1de3e3c70fa94b0ed14541d751dd5654b6b0 Author: Tomaž Vajngerl Date: Sun May 13 20:50:57 2018 +0900 o3tl: add some comments to sorted_vector test Change-Id: Iebedbb5afb45a92e52a8a390b9b7f6daae2337eb Reviewed-on: https://gerrit.libreoffice.org/54192 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx index 713cb185fa48..2a1f87d93dc8 100644 --- a/o3tl/qa/test-sorted_vector.cxx +++ b/o3tl/qa/test-sorted_vector.cxx @@ -37,26 +37,34 @@ public: void testBasics() { o3tl::sorted_vector > aVec; + +// create 4 test elements std::unique_ptr p1( new SwContent(1) ); std::unique_ptr p2( new SwContent(2) ); SwContent *p3 = new SwContent(3); std::unique_ptr p4( new SwContent(4) ); +// insert p3, p1 -> not presernt -> second is true CPPUNIT_ASSERT( aVec.insert(p3).second ); CPPUNIT_ASSERT( aVec.insert(p1.get()).second ); +// insert p3 again -> already present -> second is false CPPUNIT_ASSERT( !aVec.insert(p3).second ); +// 2 element should be present CPPUNIT_ASSERT_EQUAL( static_cast(2), aVec.size() ); +// check the order -> should be p1, p3 +// by index access CPPUNIT_ASSERT_EQUAL( p1.get(), aVec[0] ); CPPUNIT_ASSERT_EQUAL( p3, aVec[1] ); - +// by begin, end CPPUNIT_ASSERT_EQUAL( p1.get(), *aVec.begin() ); CPPUNIT_ASSERT_EQUAL( p3, *(aVec.end()-1) ); - +// by front, back CPPUNIT_ASSERT_EQUAL( p1.get(), aVec.front() ); CPPUNIT_ASSERT_EQUAL( p3, aVec.back() ); +// find elements CPPUNIT_ASSERT( aVec.find(p1.get()) != aVec.end() ); CPPUNIT_ASSERT_EQUAL( static_cast(0), aVec.find(p1.get()) - aVec.begin() ); CPPUNIT_ASSERT( aVec.find(p3) != aVec.end() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: wizards/source
wizards/source/access2base/Database.xba |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 32cad25f949eabea52e1cf7962ba18a3edd1c647 Author: Jean-Pierre Ledure Date: Sun May 13 15:06:55 2018 +0200 Access2Base - FIX Sql errors when apostrophe in table names Correct replacement of square brackets by quoting string diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index fad41abfbaa2..ebb6ada1bd7f 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -1851,7 +1851,7 @@ Const cstSingleQuote = "'" End If vSubStrings() = Split(psSql, cstSingleQuote) For i = 0 To UBound(vSubStrings) - If (i Mod 2) = 0 Then ' Only even substrings are parsed for square brackets + If (i Mod 2) = 0 Or (i = UBound(vSubStrings)) Then ' Only even substrings are parsed for square brackets. Last substring is parsed anyway vSubStrings(i) = Join(Split(vSubStrings(i), "["), sQuote) vSubStrings(i) = Join(Split(vSubStrings(i), "]"), sQuote) End If ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/global.hxx |1 - sc/source/core/data/global.cxx | 11 --- 2 files changed, 12 deletions(-) New commits: commit 8010f473c77b9f384a7067f487bc24469f8c0cd3 Author: Gabor Kelemen Date: Sat May 12 22:24:39 2018 +0200 Drop newly unused ScGlobal::GetRscString Change-Id: I744b069542007d7ed965ef229a263c09a27181ce Reviewed-on: https://gerrit.libreoffice.org/54187 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index fdb1e5e37467..912164234597 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -566,7 +566,6 @@ public: SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection(); SC_DLLPUBLIC static ScUserList* GetUserList(); static void SetUserList( const ScUserList* pNewList ); -SC_DLLPUBLIC static const OUString& GetRscString(const char* pResId); /// Open the specified URL. static void OpenURL(const OUString& rURL, const OUString& rTarget); SC_DLLPUBLIC static OUStringGetAbsDocName( const OUString& rFileName, diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 432b4ae2d468..9e4ce14e3ddf 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -86,7 +86,6 @@ ScAutoFormat* ScGlobal::pAutoFormat = nullptr; LegacyFuncCollection* ScGlobal::pLegacyFuncCollection = nullptr; ScUnoAddInCollection* ScGlobal::pAddInCollection = nullptr; ScUserList* ScGlobal::pUserList = nullptr; -std::map* ScGlobal::pRscString = nullptr; LanguageTypeScGlobal::eLnge = LANGUAGE_SYSTEM; css::lang::Locale* ScGlobal::pLocale = nullptr; SvtSysLocale* ScGlobal::pSysLocale = nullptr; @@ -310,13 +309,6 @@ void ScGlobal::SetUserList( const ScUserList* pNewList ) } } -const OUString& ScGlobal::GetRscString(const char* pResId) -{ -if (pRscString->find(pResId) == pRscString->end()) -(*pRscString)[pResId] = ScResId(pResId); -return (*pRscString)[pResId]; -} - OUString ScGlobal::GetErrorString(FormulaError nErr) { const char* pErrNumber; @@ -462,8 +454,6 @@ void ScGlobal::Init() pCharClass = pSysLocale->GetCharClassPtr(); pLocaleData = pSysLocale->GetLocaleDataPtr(); -pRscString = new std::map; - pEmptyBrushItem = new SvxBrushItem( COL_TRANSPARENT, ATTR_BACKGROUND ); pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND ); pEmbeddedBrushItem = new SvxBrushItem( COL_LIGHTCYAN, ATTR_BACKGROUND ); @@ -551,7 +541,6 @@ void ScGlobal::Clear() DELETEZ(pLegacyFuncCollection); DELETEZ(pAddInCollection); DELETEZ(pUserList); -DELETEZ(pRscString); DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr! DELETEZ(pStarCalcFunctionMgr); ScParameterClassification::Exit(); ___ 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/inc/calbck.hxx |4 sw/inc/frmfmt.hxx |4 sw/inc/section.hxx |1 sw/inc/unotextbodyhf.hxx |1 sw/source/core/layout/atrfrm.cxx |2 sw/source/core/unocore/unotext.cxx | 183 +++-- 6 files changed, 86 insertions(+), 109 deletions(-) New commits: commit 439f17c5cf43b38092b1b834bb006420220262e1 Author: Bjoern Michaelsen Date: Thu May 10 10:51:42 2018 +0200 dont use SwClient/SwModify in unocore: HeadFootText Change-Id: Icf0fa7ec07c8c52981c50bc03a34ae0fa9683fcf Reviewed-on: https://gerrit.libreoffice.org/54184 Tested-by: Jenkins Reviewed-by: Björn Michaelsen diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index f5748d50a728..913a7f6e173e 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -83,6 +83,10 @@ namespace sw class SW_DLLPUBLIC BroadcasterMixin { SvtBroadcaster m_aNotifier; public: +BroadcasterMixin& operator=(const BroadcasterMixin&) +{ +return *this; // Listeners are never copied or moved. +} SvtBroadcaster& GetNotifier() { return m_aNotifier; } }; /// refactoring out the some of the more sane SwClient functionality diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 787988467407..a8f61f3cf17a 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -53,7 +53,9 @@ namespace sw class SwFrameFormats; /// Style of a layout element. -class SW_DLLPUBLIC SwFrameFormat: public SwFormat +class SW_DLLPUBLIC SwFrameFormat +: public SwFormat +, public sw::BroadcasterMixin { friend class SwDoc; friend class SwPageDesc;///< Is allowed to call protected CTor. diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index eb4cc6913f38..30b582b89a80 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -270,7 +270,6 @@ enum class SectionSort { Not, Pos }; class SW_DLLPUBLIC SwSectionFormat : public SwFrameFormat , public ::sfx2::Metadatable -, public sw::BroadcasterMixin { friend class SwDoc; diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 11aa3cbf794f..439d434dade0 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -116,7 +116,6 @@ public: static css::uno::Reference< css::text::XText > CreateXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader); -static bool IsXHeadFootText(SwClient const *const pClient); // XInterface virtual css::uno::Any SAL_CALL queryInterface( diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index bcc42a8b06f8..7f4d27ad6e1c 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -121,7 +121,7 @@ static void lcl_DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) // It's suboptimal if the format is deleted beforehand. SwIterator aIter(*pFormat); for(SwClient* pLast = aIter.First(); bDel && pLast; pLast = aIter.Next()) -if (dynamic_cast(pLast) == nullptr && !SwXHeadFootText::IsXHeadFootText(pLast)) +if (dynamic_cast(pLast) == nullptr) bDel = false; } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 6d01370e5d19..5d9bde6d73a7 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -2453,108 +2454,90 @@ SwXBodyText::hasElements() } class SwXHeadFootText::Impl -: public SwClient +: public SvtListener { +public: +SwFrameFormat* m_pHeadFootFormat; +bool m_bIsHeader; -public: - -boolm_bIsHeader; - -Impl( SwFrameFormat & rHeadFootFormat, const bool bIsHeader) -: SwClient(& rHeadFootFormat) -, m_bIsHeader(bIsHeader) -{ -} - -SwFrameFormat * GetHeadFootFormat() const { -return static_cast( -const_cast(GetRegisteredIn())); -} +Impl(SwFrameFormat& rHeadFootFormat, const bool bIsHeader) +: m_pHeadFootFormat(&rHeadFootFormat) +, m_bIsHeader(bIsHeader) +{ +if(m_pHeadFootFormat) +StartListening(m_pHeadFootFormat->GetNotifier()); +} -SwFrameFormat & GetHeadFootFormatOrThrow() { -SwFrameFormat *const pFormat( GetHeadFootFormat() ); -if (!pFormat) { -throw uno::RuntimeException("SwXHeadFootText: disposed or invalid", nullptr); +SwFrameFormat* GetHeadFootFormat() const { +return m_pHeadFootFormat; } -return *pFormat; -} -protected: -// SwClient -virtual void Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew) override; +SwFrameFormat& GetHeadFootFormatOrThrow() { +if (!m_pHeadFootFormat) { +