/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #pragma once #include #include #include class SdrOutliner; struct ImpMeasureRec; struct ImpMeasurePoly; namespace sdr::properties { class MeasureProperties; } class SdrMeasureObjGeoData final : public SdrTextObjGeoData { public: Point aPt1; Point aPt2; public: SdrMeasureObjGeoData(); virtual ~SdrMeasureObjGeoData() override; }; class SVXCORE_DLLPUBLIC SdrMeasureObj final : public SdrTextObj { private: // to allow sdr::properties::MeasureProperties access to SetTextDirty() friend class sdr::properties::MeasureProperties; friend class SdrMeasureField; virtual std::unique_ptr CreateObjectSpecificViewContact() override; virtual std::unique_ptr CreateObjectSpecificProperties() override; Point aPt1; Point aPt2; bool bTextDirty; void ImpTakeAttr(ImpMeasureRec& rRec) const; OUString TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind) const; void ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol) const; static basegfx::B2DPolyPolygon ImpCalcXPoly(const ImpMeasurePoly& rPol); void ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) const; void SetTextDirty() { bTextDirty=true; SetTextSizeDirty(); if (!getOutRectangle().IsEmpty()) { SetBoundRectDirty(); SetBoundAndSnapRectsDirty(/*bNotMyself*/true); } } void UndirtyText() const; virtual std::unique_ptr NewGeoData() const override; virtual void SaveGeoData(SdrObjGeoData& rGeo) const override; virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override; public: SdrMeasureObj(SdrModel& rSdrModel); // Copy constructor SdrMeasureObj(SdrModel& rSdrModel, SdrMeasureObj const & rSource); SdrMeasureObj( SdrModel& rSdrModel, const Point& rPt1, const Point& rPt2); virtual ~SdrMeasureObj() override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual SdrObjKind GetObjIdentifier() const override; virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual sal_uInt32 GetHdlCount() const override; virtual void AddToHdlList(SdrHdlList& rHdlList) const override; // special drag methods virtual bool hasSpecialDrag() const override; virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override; virtual bool applySpecialDrag(SdrDragStat& rDrag) override; virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override; virtual bool BegCreate(SdrDragStat& rStat) override; virtual bool MovCreate(SdrDragStat& rStat) override; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override; virtual bool BckCreate(SdrDragStat& rStat) override; virtual void BrkCreate(SdrDragStat& rStat) override; virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override; virtual PointerStyle GetCreatePointer() const override; virtual void NbcMove(const Size& rSiz) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override; virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override; virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override; virtual Degree100 GetRotateAngle() const override; virtual void RecalcSnapRect() override; virtual sal_uInt32 GetSnapPointCount() const override; virtual Point GetSnapPoint(sal_uInt32 i) const override; virtual bool IsPolyObj() const override; virtual sal_uInt32 GetPointCount() const override; virtual Point GetPoint(sal_uInt32 i) const override; virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override; virtual rtl::Reference DoConvertToPolyObj(bool bBezier, bool bAddText) const override; virtual bool BegTextEdit(SdrOutliner& rOutl) override; virtual const Size& GetTextSize() const override; virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override; virtual void TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const override; virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override; virtual EEAnchorMode GetOutlinerViewAnchorMode() const override; virtual void NbcSetOutlinerParaObject(std::optional pTextObject) override; virtual OutlinerParaObject* GetOutlinerParaObject() const override; virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, bool bEdit, std::optional& rpTxtColor, std::optional& rpFldColor, std::optional& rpFldLineStyle, OUString& rRet) const override; // #i97878# virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override; virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override; }; // Creating: // ~~~~~~~~~ // dragging reference point 1 to reference point 2 -> reference edge // // Defaults: // ~~~~~~~~~~~~~ // dimension line and auxiliary dimension lines: solid black hairlines // arrows : 2mm x 4mm // text size // ___ // | dimension | 2mm // |<--------------------->|--- // | | 8mm // | | // Pt1============# Pt2-- <----reference edge (from Pt1 to Pt2) // # # |___ <-excess length of the auxiliary dimension line(s) // # #=========# // # objected to be dimensioned # // #=======================# // // Attributes: // ~~~~~~~~~~ // 1. Where is the text: middle, right or left (default=automatic) // 2. Text above or below the line or line broken by text (default=automatic) // Default=8mm // 3. The distance from the dimension line to the reference edge (= to the dimensioned object) // 4. dimension line below the reference edge (default=no)) // 5. excess length of the auxiliary dimension lines beyond the reference edge (2x, default=0) // 6. excess length of the auxiliary dimension lines past the dimension line (default=2mm) // 7. distance between the auxiliary dimension line and the reference edge // // Dragging: Handle Shift // ~~~~~~~~~ // - reference points SolidQuadHdl only the length // 1.+2. Seizing the text // 3.+4. Hdl on arrow (2x) SolidQuadHdl only the Bool // 5. Hdl one end point CircHdl both lengths ? // 6.+7. no dragging // // Open: // ~~~~~~ // - radiuses (anchor as type immediately) // // Special: // ~~~~~~~~ // Connecting to a maximum of two objects // -> during Copy, etc. use the respective code of the connectors?!? // this probably will be pretty complicated ... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ lue='distro/suse/suse-4.0.3'>distro/suse/suse-4.0.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
ject'>tdf#143122 - Port Java examples to C++
AgeCommit message (Expand)Author
Hossein
Porting FirstSteps/FirstUnoContact.java to C++ is done. More information on this example can be found in the DevGuide: LibreOffice Developer's Guide: Chapter 1 - First Steps - First Contact https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps Change-Id: I84b0a60738bfe614158d7eabf8bff3cda1ccca50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132910 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-04-20tdf#143123 - Port Java examples to PythonHossein
Porting FirstSteps/FirstUnoContact.java to Python is done. More information on this example can be found in the DevGuide: LibreOffice Developer's Guide: Chapter 1 - First Steps - First Contact https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps Change-Id: I8a97672a0b437177f19ddce029e6ef27e97533ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132914 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-04-12odk: update DevGuide wiki links and correct history in footerIlmari Lauhakangas
Change-Id: I95c78d1346d354b755aeecaa1e6c9d789be0b693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132905 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-06Remove duplicate DevGuide example FirstConnectionHossein
While cleaning up "LibreOffice DevGuide: Chapter 1 - First Steps" in the TDF Wiki, I understood that only 3 examples were compiled via the Makefile, but there were 4 java files. It turned out that the FirstUnoContact.java and FirstConnection.java are essentially the same. I removed the second one, as it was not built, and was not referenced elsewhere. Change-Id: I7df5dd9dfc3aae15de4484b4a3dd6272066a8683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132457 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-13Fix typosAndrea Gelmini
Change-Id: I9f583937da2cf49fc9013d9e36d63fff312ccb92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131495 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-02-25Provide unoidl-write also for the SDKStephan Bergmann
...after the new types.rdb format that unoidl-write generates has been used internally since LibreOffice 4.1 in 2013; following up on 6db34b6b33ba8e3b13683efd05df8441b87e9c92 "Directly build UNOIDL .rdb files from .idl files" and its "The legacy tools idlc, regcompare, regmerge, and regview are still contained in the URE or SDK for now." The tools idlc and regmerge are deprecated but still shipped in the SDK for now. The plan is to drop them completely for LO 7.5. odk/examples/ and ure/source/uretest/ are adapted to use unoidl-write instead of idlc and regmerge: * unoidl-write does not use a C preprocessor and the # directives in .idl files, it supports reading a single .idl file (containing an arbitrary number of declarations) or a directory tree where each directory corresponds to a UNOIDL module of the same name and each .idl file contains the declaration of the (non-module) UNOIDL entity of the same name. For some of the odk/examples/, that required moving individual .idl files into sub-directories named after the respective modules. In odk/settings/std.mk, definitinos of IDL and REGMERGE have been replaced with a new UNOIDLWRITE. * unoidl-write always enforces reserved UNOIDL identifier restrictions (see 04af4e4f55f3ef319a78edd4d0109e2e7eba90b6 "[API CHANGE] Fix all bad UNOIDL identifiers across offapi" and 620179240670bd00f60555f1f5c5b0268492f97c "Enforce the UNOIDL identifier scheme") (which idlc only enforced optionally with -cid -we). That required renaming "my_module" in odk/examples/DevelopersGuide/Components/CppComponent/. * The new types.rdb format is not compatibly with LibreOffice < 4.1. Clients generating extensions containing such files are advised to use appropriate LibreOffice-minimal-version elements. Change-Id: I1a248fd96e86ecbf407f829bc100d44bfe7f4e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130533 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-15tdf#145759 Using M_PI from cmath instead of magic constants.pragat-pandya
Replace the instances of Pi's value as magic number by M_PI Use M_PI_2 and 2_M_PI instead of calculating these values in code. Use basegfx functions to convert angle units. Change-Id: I6cca7cc93704a70ccf3a0571a56a789bc9df51ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129479 Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com> Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
2022-02-09Fix typosAndrea Gelmini
Change-Id: I82405059d900b6605075bf5756f3f0fb99e9002e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129451 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-01Bump copyright year to 2021Adolfo Jayme Barrientos
Change-Id: Icbb000677066127fa67e8c22fb0ab6880acc0169
2021-11-15Clean C++ SDK example "counter"Hossein
* Use <iostream> instead of <stdio.h> Change-Id: I5cc70613c0b183c24bfa73b779dac3b382b31c93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123328 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-15Fixing the license statement for the Convertor C++ exampleHossein
Fixing the license statement for the 'Convertor.cxx' and 'Makefile' according to the '/TEMPLATE.SOURCECODE.HEADER' This example was added in 83b529d88388c7c8e0563242a030063bd95c4bed Change-Id: I654d641999aab6951ad21f84fd75e080bb709ec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125128 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-09Add Convertor C++ exampleHossein
* Add Convertor.cxx * Used Makefile from DocumentLoader with some changes * Updated odk make files * output.pdf is generated from the input odt file Change-Id: I3e46f2895443f75b2f3815280b0f793bca5138e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123736 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-25Cleanup DocumentLoader C++ SDK exampleHossein
* Remove unncessary C-style cast from DocumentLoader.cxx * Remove trailing whitespaces from Makefile Change-Id: I7cff589353d3e40301cf45ce0a76e0c75beddf13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124115 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-09Typo: *adress* -> *address* (except from not translated German parts)Julien Nabet
Change-Id: I62e12aed5bc67119433c39ff333f69b79944dca3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123318 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-05drop 'using namespace std' in o* r* x*Julien Nabet
Change-Id: I15d56d133cf464a3cb6483be785b1259c7f35b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123120 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-03drop 'using namespace std' hereRoman Kuznetsov
Change-Id: I6ebbd0ece563f0d877b03389fa9a96311cd207cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122867 Tested-by: Jenkins Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2021-09-20Adapt SetWindowLong call to 64-bit buildStephan Bergmann
This failed with GWL_WNDPROC being undefined in 64-bit builds. See the note at <https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlongptra>: "To write code that is compatible with both 32-bit and 64-bit versions of Windows, use SetWindowLongPtr." Change-Id: I7abcc681b4daf459eb0c0481266949c75ecf4dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122341 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-20Fix type of css.drawing.FillProperties FillColor propertyStephan Bergmann
(where css.util.Color is a typedef for UNOIDL LONG). This caused issues on Windows, where in C/C++ sal_Int32 is a typedef for long rather than int. Change-Id: Ic0407674d06a219210d7f0448100005d7135eb79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122340 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-17tdf#143550 - use the term "gluepoints" consistentlyrocso
Change-Id: Id10dc2ef13f54a148a800003cc4bd88ca1a0056f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122233 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-09-10This example doesn't have any idl filesStephan Bergmann
Change-Id: Ia70268084603db3329d276533a9351e6c1eebbca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121894 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-09Fix apparent typosStephan Bergmann
...introduced with aaebbb0e597bfeb8e1c545130a0d17a55b164228 "INTEGRATION: CWS jsc21" (but which never caused an issue as cppumaker generated output for all of $(COMP_RDB) anyway when the undefined $(TYPESLIST) didn't contribute anything to its command line) Change-Id: Ic6792ad9edc159c02d307ca72500605bc3c38077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121851 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-26Remove spurious odk/examples/java/MinimalComponent/BuildMinimalComponent.xmlStephan Bergmann
It had been added together with odk/examples/java/MinimalComponent/Makefile in ff4c86ff37af5136466d49a9fb394974ee62cb0f "Added an example for a minimal UNO component", and it apparently is an Ant build script that shall do the same as the Makefile. However, it is apparently unused: For one, it does not appear to get referenced from anywhere else in the code or to get mentioned at <https://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide>. And for another, it would apparently only work on Windows (using e.g. "${ODKPATH}/windows/bin/idlc.exe"), but would typically fail even there with something like > > ant -f BuildMinimalComponent.xml > Buildfile: C:\lo\core\instdir\sdk\examples\java\MinimalComponent\BuildMinimalComponent.xml > > init: > > unoidl: > > BUILD FAILED > C:\lo\core\instdir\sdk\examples\java\MinimalComponent\BuildMinimalComponent.xml:35: The directory D:\cvs\api\odk\WINexample.out\misc does not exist due to the hardcoded D:/cvs/api/odk paths. Change-Id: Idd020bcf1a2383295704b208d3ac2be047f270ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121050 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-25Fix corrupted odk/examples/java/ConverterServlet/web.xmlStephan Bergmann
Instead of just adding a license header, 2b4fd2c89a38ccac13c72f2e94501a8702e7da4b "re-base on ALv2 code" had apparently erroneously overwritten this file with the content of the completely unrelated odk/examples/java/MinimalComponent/BuildMinimalComponent.xml. Change-Id: Iee6dcb528dbb444a132c27e7183b3957319882c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121037 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-18Fix typosAndrea Gelmini
Change-Id: I0a8ce634944df4af5c9e2000af5f6429b4e40b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-07-16Porting C++/Java DocumentLoader example to PythonHossein
* Using UNO for Python * Opening the file in LibreOffice if it is listeing on port 2083 Change-Id: I14b1a38da5d66dd2ee8c859071c148ce08a080d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118142 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: Jenkins
2021-07-14Fix typosAndrea Gelmini
Change-Id: I809231e7e6ceaa93c2d0b523de8a4b93b07b449c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118841 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-07-13Ported Draw example from Java to C++ and done some tweaksHossein
* Created Draw.cxx * Used Makefile from DocumentLoader with some changes * Updated examples.html to reflect the addition * Updated odk make files Change-Id: I37426d63854222ef8bedb5f61edb420baec4d28a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118034 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-07-12Cleaning up DocumentLoader C++ SDK exampleHossein
* Removing calls to C functions * Simplifying string usage Change-Id: Ia8ca329d7ad586d98e309809e430006eaac9eaaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118131 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-06-23Remove unused DOCTYPE from odk/examples xcu fileStephan Bergmann
The declared entities have apparently never been referenced ever since the file's introduction in 9fa09d43d0dc0ec0ac71bad31b85ce7fc302ee90 "INTEGRATION: CWS sdkinspector2". (And at least xmlreader skips and ignores the content of such document type declarations anyway.) Change-Id: I8263200f52bb5f1692090995574619f9c0ec478f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117658 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-01Drop FAR/NEAR from 16-bit WinAPI timesMike Kaganski
Change-Id: Idf71c662138c281333a83cc76a9d75cbf086f362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110236 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-05tdf#96505 : Get rid of cargo cult long integer literalsumutbayramoglu
Change-Id: I7b269fb5bafceba071ebe649a696ef61301c4018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-03Bump copyright year to 2021Adolfo Jayme Barrientos
Change-Id: I3159bfc21a35fc80aef57c7d809d8ea8c62a732e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108566 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-03Replace unowinreg.dll with execution of `reg QUERY`Stephan Bergmann
The SDK's <https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/ Transparent_Use_of_Office_UNO_Components> on all platforms included the Windows- specific unowinreg.dll in generated jars (so that those jars, when distributed to a Windows environment, would find a LO installation by inspecting the Windows registry). That unowinreg.dll was originally built as a 32-bit DLL (though when building a 64-bit Windows LO, it happened to be built as a 64-bit DLL). For non-Windows LO builds, it could either be built locally with a MinGW toolchain (--enable-build-unowinreg) or downloaded from dev-www.libreoffice.org. However, that had various issues: For one, unowinreg.dll was not necessarily available in a distributed jar as a 64-bit DLL for use with a 64-bit JRE on Windows. (Theoretically, running such a jar with a 32-bit JRE to access a 64-bit LO installation's URE jars could have worked. But practically, those URE jars in turn require native DLLs, which would then not have been available as 32-bit DLLs for use in the 32-bit JRE.) For another, at least the unowinreg.dll resulting from --enable-build-unowinreg on Fedora 33 would have had a dependency on libgcc_s_dw2-1.dll that would generally not have been available in a target Windows environment. There appears to be no pure Java way to read the Windows registry, but instead of using a native code DLL for that, it appears to work just as well to call out to reg.exe and parse its output. This removes the --enable-build-unowinreg and --with-mingw-cross-compiler configuration options. (The sole use of the MinGW toolchain in LO was for building unowinreg.dll.) Change-Id: I3283ea38c884d3221a205e5ab6ec99a2691ef474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107140 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-21tdf#123936 Formatting files in module odk with clang-formatPhilipp Hofer
Change-Id: I427263ee98206c00cd2b3392fc9f2f55ad1ded5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105692 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-09-27Fix an odk/examples dependencyStephan Bergmann
ImageShrink.oxt is created in the org/openoffice/comp/test sub-make, and CustomTarget_odk/build-examples_java had once failed for me with > make[2]: *** No rule to make target '~/lo/core/workdir/CustomTarget/odk/build-examples_java/out/sdk/LINUXexample.out/bin/ImageShrink.oxt', needed by 'ComponentsThumbsExample'. Stop. Change-Id: I926d0691e7eee3506d4afe2eda1a2fc873422e18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>