[Libreoffice-commits] core.git: Branch 'feature/vcl-opengl2' - android/experimental helpcontent2 sw/source vcl/headless vcl/inc vcl/ios vcl/source
android/experimental/LOAndroid3/.gitignore |1 helpcontent2 |2 - sw/source/core/draw/dflyobj.cxx|4 ++ vcl/headless/svpinst.cxx | 18 ++--- vcl/inc/generic/gendata.hxx|2 - vcl/inc/opengl/openglinst.hxx | 54 - vcl/inc/opengl/saldata.hxx | 21 +++ vcl/inc/opengl/salgdi.h| 46 vcl/inc/opengl/salvd.h |2 - vcl/ios/iosinst.cxx| 14 ++- vcl/source/outdev/font.cxx |2 + 11 files changed, 100 insertions(+), 66 deletions(-) New commits: commit be6f16401d7fc9121c0129a018f6aaed2e3a98e6 Author: Ptyl Dragon p...@cloudon.com Date: Tue Oct 21 16:24:42 2014 +0300 tiled rendering app now renders blank tiles Change-Id: I1b6ff522edcb2c57860434a1f64a445e55f7dbb1 diff --git a/android/experimental/LOAndroid3/.gitignore b/android/experimental/LOAndroid3/.gitignore new file mode 100644 index 000..4d82deb --- /dev/null +++ b/android/experimental/LOAndroid3/.gitignore @@ -0,0 +1 @@ +/AndroidManifest.xml diff --git a/helpcontent2 b/helpcontent2 index b1065d4..2dd0975 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit b1065d43c77fc050760c7427d371b5460b54d249 +Subproject commit 2dd0975408b8fbae59c9f924d8e013f48d23da52 diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index caad92d..cc02a0c 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include config_features.h + #include hintids.hxx #include svx/svdtrans.hxx #include editeng/protitem.hxx @@ -469,7 +471,9 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject( // if there's no viewport set, all fly-frames will be painted, // which is slow, wastes memory, and can cause other trouble. (void) rViewInformation; // suppress unused parameter warning +#if !HAVE_VCL_OPEN_GL_BACKEND assert(!rViewInformation.getViewport().isEmpty()); +#endif if ( !pFlyFrm-IsFlyInCntFrm() ) { // it is also necessary to restore the VCL MapMode from ViewInformation since e.g. diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 2fa3448..9cab138 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -240,12 +240,18 @@ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics #else #if HAVE_VCL_OPEN_GL_BACKEND -SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics */, - long /* nDX */, long /*nDY*/, - sal_uInt16 /* nBitCount */, - const SystemGraphicsData* /* pData */ ) -{ -return nullptr; +SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, + long nDX, long nDY, + sal_uInt16 nBitCount, + const SystemGraphicsData* pData ) +{ +OpenGLSalVirtualDevice * pNew = new OpenGLSalVirtualDevice(pGraphics, + nDX, + nDY, + nBitCount, + pData); +pNew-SetSize( nDX, nDY ); +return pNew; } #endif #endif diff --git a/vcl/inc/generic/gendata.hxx b/vcl/inc/generic/gendata.hxx index 334193d..8f6a29a 100644 --- a/vcl/inc/generic/gendata.hxx +++ b/vcl/inc/generic/gendata.hxx @@ -22,7 +22,7 @@ enum SalGenericDataType { SAL_DATA_GTK, SAL_DATA_GTK3, SAL_DATA_TDE3, SAL_DATA_KDE3, SAL_DATA_KDE4, SAL_DATA_UNX, SAL_DATA_SVP, SAL_DATA_ANDROID, SAL_DATA_IOS, - SAL_DATA_HEADLESS }; + SAL_DATA_HEADLESS, SAL_DATA_OPEN_GL }; class VCL_DLLPUBLIC SalGenericData : public SalData { diff --git a/vcl/inc/opengl/openglinst.hxx b/vcl/inc/opengl/openglinst.hxx deleted file mode 100644 index 0c9ac4d..000 --- a/vcl/inc/opengl/openglinst.hxx +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered
[Libreoffice-commits] core.git: Branch 'feature/vcl-opengl2' - 3 commits - config_host/config_features.h.in configure.ac include/vcl ios/experimental ios/.gitignore sw/source vcl/headless vcl/inc vcl/
config_host/config_features.h.in |5 configure.ac | 10 include/vcl/sysdata.hxx | 11 ios/.gitignore|1 ios/experimental/TiledLibreOffice/.gitignore |9 ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore |1 sw/source/core/view/viewsh.cxx|3 vcl/Library_vcl.mk| 19 vcl/headless/svpgdi.cxx |5 vcl/headless/svpinst.cxx | 22 vcl/inc/headless/svpframe.hxx |7 vcl/inc/headless/svpgdi.hxx | 18 vcl/inc/headless/svpinst.hxx |6 vcl/inc/headless/svpvd.hxx|4 vcl/inc/opengl/openglinst.hxx | 54 + vcl/inc/opengl/salbmp.h | 98 +++ vcl/inc/opengl/salgdi.h | 302 ++ vcl/inc/opengl/salvd.h| 57 + vcl/inc/saldatabasic.hxx |9 vcl/ios/iosinst.cxx | 15 20 files changed, 645 insertions(+), 11 deletions(-) New commits: commit c3fe92ca70ad58e2fbac78508d343f06a80c7e86 Author: Ptyl Dragon p...@cloudon.com Date: Mon Oct 6 14:40:58 2014 +0300 change return type to ImplFontCharMapPtr post creating vcl-opengl2 branch Change-Id: Id2022cf1b3665b54356c28deda51d82e172a839e diff --git a/vcl/inc/opengl/salgdi.h b/vcl/inc/opengl/salgdi.h index 4631182..0f71248 100644 --- a/vcl/inc/opengl/salgdi.h +++ b/vcl/inc/opengl/salgdi.h @@ -185,7 +185,7 @@ public: // get the current font's metrics virtual voidGetFontMetric( ImplFontMetricData*, int /* nFallbackLevel */ ) SAL_OVERRIDE {} // get the repertoire of the current font -virtual const ImplFontCharMap* +virtual const ImplFontCharMapPtr GetImplFontCharMap() const SAL_OVERRIDE { return nullptr; commit 500149536c75fd4b3f81ebaf5fa624ee143809f6 Author: Ptyl Dragon p...@cloudon.com Date: Mon Oct 6 12:52:55 2014 +0300 make works with OpenGLSalInstance / OpenGLSalGraphics Change-Id: Ie5156dd15122586e9c173a3532759a3be728809a diff --git a/configure.ac b/configure.ac index f01ed6f..6e85b87 100644 --- a/configure.ac +++ b/configure.ac @@ -2448,6 +2448,7 @@ if test $_os != iOS -a $_os != Android; then fi if test $enable_vgl == yes; then + HAVE_VCL_OPEN_GL_BACKEND=TRUE AC_DEFINE(HAVE_VCL_OPEN_GL_BACKEND) fi diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index 4cfc737..fa909af 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_VCL_SYSDATA_HXX #define INCLUDED_VCL_SYSDATA_HXX +#include config_features.h + #include vector #include cstddef @@ -36,9 +38,12 @@ class NSView; #endif #ifdef IOS +#if HAVE_VCL_OPEN_GL_BACKEND +#else typedef const struct __CTFont * CTFontRef; typedef struct CGContext *CGContextRef; #endif +#endif #if defined( WNT ) #include windef.h @@ -140,7 +145,10 @@ struct SystemGraphicsData #elif defined( ANDROID ) // Nothing #elif defined( IOS ) +#if HAVE_VCL_OPEN_GL_BACKEND +#else CGContextRefrCGContext; // CoreGraphics graphic context +#endif #elif defined( UNX ) void* pDisplay; // the relevant display connection longhDrawable; // a drawable @@ -159,7 +167,10 @@ struct SystemGraphicsData #elif defined( ANDROID ) // Nothing #elif defined( IOS ) +#if HAVE_VCL_OPEN_GL_BACKEND +#else , rCGContext( NULL ) +#endif #elif defined( UNX ) , pDisplay( NULL ) , hDrawable( 0 ) diff --git a/ios/.gitignore b/ios/.gitignore index 08c6a68..3d2a3a2 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -7,3 +7,4 @@ # /lo.xcconfig +/.log diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore b/ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore new file mode 100644 index 000..ba78577 --- /dev/null +++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/.gitignore @@ -0,0 +1 @@ +/native-code.mm diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 0731c2b..7506b6b 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1851,7 +1851,10 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD if (pViewShell) { SystemGraphicsData aData; +#if HAVE_VCL_OPEN_GL_BACKEND +#else aData.rCGContext = (CGContextRef) context; +#endif VirtualDevice aDevice(aData, (sal_uInt16)0
[Libreoffice-commits] core.git: Changes to 'refs/changes/97/6397/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/97/6397/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/73/6373/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/79/6379/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/92/6492/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/92/6492/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/96/6396/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/79/6379/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/96/6396/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/20/6320/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/95/6395/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/93/6293/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/95/6395/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/93/6293/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/80/6380/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/80/6380/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/92/6292/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/92/6292/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/51/6351/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/51/6351/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/55/6355/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/55/6355/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: LiMux student kick-off
This week we (CloudOn) did a kick off for the openGL project, mainly reviewing OpenGL, and what we know of the requirements for the project. My conclusions so far (feel free to correct them. i'm an OpenGL noob): 1. We should use OpenGL 3.0 ES API - i.e use the 3.0 ES API subset, even when using non OpenGL ES (e.g on linux, osx, windows) 2. Use cases: a. Tiled rendering (i.e mobile) - i. OpenGL renders to a memory buffer. It would be best if the tile memory would have been this memory buffer, but if not, then this memory buffer is later copied to the tile OpenGL context. ii. Context creation is handled by the Mobile app iii. this is the simple case b. Window (i.e Desktop) - i. LibreOffice's SalInstance should create an OpenGL window, and provide the openGL context (enabling the option can be denoted via a compilation flag). This needs to be done per OS, though possibly, can be simplified via abstraction frameworks such as SDL, or what have you. Possibly, this task is a good candidate for mentoring ii. the rendering is done via 3 buffers: 2 buffers (front and back) for de-interlacing, and 1 back layer buffer for actual rendering. Additionally, for stuff like copy area, we might require temp buffers for bit blit, and resending these bitmaps back to the GPU. Would be happy to find a better solution, as it sounds like copying the same bitmap 4 times... iii. this is the complex case, and as such, arguably, we should begin the work on tiled rendering, then apply the solution on the window / Desktop case, in a later iteration. 3. Shaders - For simplicity and performance (i.e to not compile shaders again and again), we should use one costant naive Vertex shader all the time, and one constant Fragment shader, which uses if statements to differentiate between 2 states - solid color, and texture. AFAIK, VCL does not use any other more complex rendering. Note also, that if statements in GLSL are optimized on the GPU, so using them should not cost performance. 4. Text - would be rendered using the current software implementation, and rendered via openGL, as bitmaps. Considering these, action items are (VERY roughly): A. add build flags if necessary B. decide whether to approach tiled rendering first. If so, solve context creation on mobile apps. If not, implement the OpenGL context creation for SalInstances on all OSes C. Write the shader D. Replace the VCL primitive drawing functions one by one, with OpenGL counterparts E. Handle the copy area case F. Handle the Bitmap case G. Handle the text case if agreed upon, we could distribute the action items, and begin the actual work On Wed, Sep 17, 2014 at 1:10 PM, Michael Meeks michael.me...@collabora.com wrote: On Wed, 2014-09-17 at 11:47 +0200, Jan-Marek Glogowski wrote: AFAIK Miklos was Michaels suggestion for the mentoring - can't remember. Matus is the XFastParser expert =) I guess it'd be nice to have a small XFastParser unit test as well (as some sort of entry-level easy-hack there). Probably we should simply add a Wiki page for easier coordination? Sure - why not =) Comments please All sounds sensible, my hope is that we can mentor interactively and superimpose the two-weekly what got done meetings =) Anyhow - exciting tasks ! ATB, Michael. -- michael.me...@collabora.com , Pseudo Engineer, itinerant idiot -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedIn http://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Blog http://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: LiMux student kick-off
hi Markus hope you enjoy your vacation and thanks for the feedback inline On Wed, Sep 17, 2014 at 2:58 PM, Markus Mohrhard markus.mohrh...@googlemail.com wrote: Hey, So I will only be able to provide a short feedback as I'm still on vacation for another month and don't have access to any computer. On Sep 17, 2014 9:29 PM, Ptyl Dragon p...@cloudon.com wrote: This week we (CloudOn) did a kick off for the openGL project, mainly reviewing OpenGL, and what we know of the requirements for the project. My conclusions so far (feel free to correct them. i'm an OpenGL noob): 1. We should use OpenGL 3.0 ES API - i.e use the 3.0 ES API subset, even when using non OpenGL ES (e.g on linux, osx, windows) That is way too young. Currently I think we should target Opengl 2.1 and keep an option for OpenGL 3.2 open. That would mean we would target something along of OpenGL ES 2.0. I can't check right now the differences between the es version and the normal opengl version. ok, then we'll use GL2.1. we'll make sure we use only API used in ES 2 too. We need simple thing. after all, we are not making a First Person Shooter. For starters we are just making a 2d rendering engine 2. Use cases: a. Tiled rendering (i.e mobile) - i. OpenGL renders to a memory buffer. It would be best if the tile memory would have been this memory buffer, but if not, then this memory buffer is later copied to the tile OpenGL context. ii. Context creation is handled by the Mobile app iii. this is the simple case b. Window (i.e Desktop) - i. LibreOffice's SalInstance should create an OpenGL window, and provide the openGL context (enabling the option can be denoted via a compilation flag). This needs to be done per OS, though possibly, can be simplified via abstraction frameworks such as SDL, or what have you. Possibly, this task is a good candidate for mentoring We have that already. The OpenGLContext class abstracts the creation of a context. We can't use an existing framework as it needs to integrate with vcl at least on the desktop. good to know ii. the rendering is done via 3 buffers: 2 buffers (front and back) for de-interlacing, and 1 back layer buffer for actual rendering. Additionally, for stuff like copy area, we might require temp buffers for bit blit, and resending these bitmaps back to the GPU. Would be happy to find a better solution, as it sounds like copying the same bitmap 4 times... At least on the desktop this is not true. We have automatic front and back buffer. I know that this is a bit more complicated on mobile platforms but even then I think you only need 2 FBO. The place where you want a FBO for copy operations textures seem like the better idea. I don't think i follow. Is the idea is to keep using the current rendering mechanism, and just use OpenGL to render lines and rectangles? in any case, for tiled rendering, we want to render all the elements in the tile together and at once, per tile. If this is all done by OpenGL, it would ensure the performance we require. Also note that in tiled rendering, notions like copyArea are irrelevant, as by definition, each tile contains nothing of the neighboring tiles. iii. this is the complex case, and as such, arguably, we should begin the work on tiled rendering, then apply the solution on the window / Desktop case, in a later iteration. I totally disagree here. The desktop stuff is already working and it is only some work necessary to create a new vcl plugin. I would prefer if we start there as this can easily be tested by many people and the development plan is already available (see the estimation that Michael shared with you). For the tiled rendering we first need to work on some infrastructure problems that are not yet fully understood. I would like to understand the details of what you just said: 1. what exactly is the thing that is already working on desktop? (explanation + code pointers) 2. what are VCL plugins? Does VCL have a plugin infrastructure ? does it use dynamic linking (if so, it won't work for iOS)? it would be great if someone could direct me to some code pointers that show how this plugin infrastructure works 3. I'm not sure if i saw the OpenGL development plan, so i'd be happy if anyone could direct me to it. I want to learn all there is to learn, so to be able to actively expedite this front (i.e hack the way myself) As Markus is now on vacation, perhaps someone else can help me with these issues? I don't want to stall a month now, as I believe we can make progress in this time frame 3. Shaders - For simplicity and performance (i.e to not compile shaders again and again), we should use one costant naive Vertex shader all the time, and one constant Fragment shader, which uses if statements to differentiate between 2 states - solid color, and texture. AFAIK, VCL does not use any other more complex
Re: LiMux student kick-off
inline On Wed, Sep 17, 2014 at 8:17 PM, Michael Meeks michael.me...@collabora.com wrote: Hi Ptyl, On Wed, 2014-09-17 at 15:45 +0300, Ptyl Dragon wrote: ok, then we'll use GL2.1. we'll make sure we use only API used in ES 2 too. The whole situation around different GL versions vs. mismatching GLES versions etc. is too horrible for words =) my hope is that we could support OpenGL 3.2 - to get a good Mac baseline, and fallback for Linux where we can. Regarding this, from the little i've learned so far of OpenGL, the main thing would be to avoid use the OpenGL extensions and API calls that don't exist in ES, which from what i know so far (and i might be wrong) include using only triangles, lines and dots (which might not be ideal for the polypolygons stuff, but is necessary for porting to ES), refrain from using GLSL 4.x stuff, possibly avoid GLU and GLUT (i think they are unsupported in iOS) and the likes. In other words, whatever feature of OpenGL we use, we should first ensure it exists in the target OpenGL ES version we choose, on Android and iOS. We need simple thing. after all, we are not making a First Person Shooter. For starters we are just making a 2d rendering engine =) I don't think i follow. Is the idea is to keep using the current rendering mechanism, and just use OpenGL to render lines and rectangles? I guess that's a good first start. in any case, for tiled rendering, we want to render all the elements in the tile together and at once, per tile. If this is all done by OpenGL, it would ensure the performance we require. Sure - doesn't that follow from a pure OpenGL renderer ? yes. That's why i thought it was tiled rendering is the simpler case, because once we agree the target is to use a pure GL renderer, then doing the quasi mode (i.e. use the existing solution and augment it with OpenGL) becomes a bit of a spaghetti over the pure OpenGL solution - i.e rendering in OpenGL, then copying to non OpenGL while still using a double buffer for OpenGL, and maintaining the existing VCL rendering in parallel. In my mind, what would have worked better is to avoid the quasi mode, do a pure OpenGL rendering, then integrating it in Desktop via a desktop tiled rendering mechanismthough i guess that's a waterfall in itself. Still, if we focus on that, we'd get to Android high performance support faster, and i think that in many ways, that should be the goal, because of all the OSes on which libreoffice runs (in one way or another) android suffers the worst rendering performance. I would think, the other platforms can wait since they are getting decent performance already. But i can see why you would disagree with me on this. Also note that in tiled rendering, notions like copyArea are irrelevant, as by definition, each tile contains nothing of the neighboring tiles. The copyArea stuff is interesting; my hope is that we could get rid of that mess; however that intersects with some of the paint / timer work that is also planned for the interns - since we currently defer re-painting of various things to a timeout. in our iOS implementation we solved the timer issues by considering them as damaged areas, similar to areas changed by editing. Viewer only functionality may not require this by default, but still, it can solve this without getting rid of the timers. Still, i agree that in the long run, the timer thing needs to go. 1. what exactly is the thing that is already working on desktop? (explanation + code pointers) We have some nice cross-platform GL context creation going on that Markus created I believe (sadly he is away from a PC / E-mail from now) - which should be easy to re-use. great! 2. what are VCL plugins? Does VCL have a plugin infrastructure ? does it use dynamic linking (if so, it won't work for iOS)? it would be great if someone could direct me to some code pointers that show how this plugin infrastructure works The backends have the vcl/inc/ API including salgdi there to implement; but on Linux we can choose dynamically between many of these backends eg. KDE3, KDE4, GTK2, GTK3, raw-X etc. got it 3. I'm not sure if i saw the OpenGL development plan, so i'd be happy if anyone could direct me to it. I've just forwarded you some rough notes. thanks. i looked at them. Possibly, i will need a hands on review of it, to know where CloudOn / myself can bulge in. I want to learn all there is to learn, so to be able to actively expedite this front (i.e hack the way myself) Sure - so I think one thing we need to get unwound (and that you identified and raised) is the issue of immediate rendering. If we go for immediate rendering; then we need to render to an off-screen frame-buffer, and then we can fool around with copyArea etc. ;-) [ this is not such a terrible thing to do of course but not ideal
[Libreoffice-commits] core.git: desktop/source
desktop/source/app/sofficemain.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit b00ce3241ef6456d10af869b2bc07cf0db7618dd Author: Ptyl Dragon p...@cloudon.com Date: Mon Aug 18 18:29:20 2014 +0300 fix for PtylTestEncryptionAndExport (on sofficemain.cxx) Change-Id: I2857dae2df3b3e7e89b5bd56b35a4b8f3868920e diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index ef7d172..dff16e8 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -134,7 +134,10 @@ extern C void PtylTestEncryptionAndExport(const char *pathname) utl::MediaDescriptor media; media[utl::MediaDescriptor::PROP_FILTERNAME()] = OUString(MS Word 2007 XML); -css::uno::Sequencecss::beans::NamedValue encryptionData = comphelper::OStorageHelper::CreatePackageEncryptionData(myPassword); +OUString password(myPassword); +css::uno::Sequencecss::beans::NamedValue encryptionData(1); +encryptionData[0].Name = OOXPassword; +encryptionData[0].Value = css::uno::makeAny(password); media[utl::MediaDescriptor::PROP_ENCRYPTIONDATA()] = encryptionData; css::uno::Referencecss::frame::XModel model(component, css::uno::UNO_QUERY); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/ctfonts.cxx |1 + vcl/quartz/ctlayout.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit 4b1ccdefe2594d8bec9343171c15ff1f90ac97bf Author: Ptyl Dragon p...@cloudon.com Date: Thu May 8 15:58:50 2014 +0300 fix memory leaks in vcl quartz Change-Id: Ifb6a924759b8a3a7f459f2335144ca4dda434cb9 diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 029caed..919ac5d 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -207,6 +207,7 @@ bool CoreTextStyle::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolyg const CGPathElement aClosingElement = { kCGPathElementCloseSubpath, NULL }; MyCGPathApplierFunc( (void*)aGgoData, aClosingElement ); #endif +CFRelease( xPath ); return true; } diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 9376402..5c61150 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -552,6 +552,7 @@ sal_Int32 CTLayout::GetTextBreak( long nMaxWidth, long /*nCharExtra*/, int nFact CTTypesetterRef aCTTypeSetter = CTTypesetterCreateWithAttributedString( mpAttrString ); const double fCTMaxWidth = (double)nMaxWidth / nFactor; CFIndex nIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth ); +CFRelease( aCTTypeSetter ); if( nIndex = mnCharCount ) return -1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/IOS_ARM_GCC.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f62b06eb1d05306601d4736973fc16a17666 Author: Ptyl Dragon p...@cloudon.com Date: Mon Apr 14 17:25:37 2014 +0300 Use -Os instead of -O3 Change-Id: I3bc3397c6a505c758703e506474657fa97ef51bd diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk index 8d8406a..398fc7a 100644 --- a/solenv/gbuild/platform/IOS_ARM_GCC.mk +++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk @@ -26,7 +26,7 @@ ifeq ($(CXX),) $(error You must set CXX in the environment. See README.cross for example.) endif -gb_COMPILERDEFAULTOPTFLAGS := -O3 +gb_COMPILERDEFAULTOPTFLAGS := -Os include $(GBUILDDIR)/platform/com_GCC_defs.mk ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - sw/source
sw/source/core/view/viewsh.cxx | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) New commits: commit 6c3c19b5ba971aef4d552ad2fa76e896fce3301e Author: Ptyl Dragon p...@cloudon.com Date: Mon Nov 4 13:34:44 2013 +0200 removed use of envvars in touch_lo_draw_tile Change-Id: Id9ee6e616fe417023d0ce011263659056e80a5a2 diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index eef78eb..7ac4c0d 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1800,8 +1800,6 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD Application::AcquireSolarMutex(1); if (pViewShell) { -static bool bUseTileSize = getenv(USETILESIZE) != NULL; -static bool bCallSetSwVisArea = bUseTileSize getenv(CALLSETSWVISAREA) != NULL; // TODO create a VirtualDevice based on SystemGraphicsData instead so // that we get direct rendering; something like: // @@ -1816,23 +1814,12 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD aMapMode.SetScaleX(scaleX); aMapMode.SetScaleY(scaleY); aDevice.SetMapMode(aMapMode); -if (bCallSetSwVisArea) -{ -SwRect foo = pViewShell-VisArea(); -SAL_INFO(sw, old VisArea: foo); -SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) ); -foo = pViewShell-VisArea(); -SAL_INFO(sw, new VisArea: foo); -} // resizes the virtual device so to contain the entrie context aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); // scroll the requested area into view if necessary pViewShell-MakeVisible(SwRect(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight; // draw - works in logic coordinates -if (bUseTileSize) -pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight))); -else -pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight; +pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), aDevice.PixelToLogic(Size(contextWidth, contextHeight; // copy the aDevice content to mpImage Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight; BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 3 commits - ios/shared sw/source vcl/ios
ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m |2 ++ sw/source/core/view/viewsh.cxx |1 + vcl/ios/iosinst.cxx |1 + 3 files changed, 4 insertions(+) New commits: commit f9e972fb84335de2e7e7533e8e5cfa1a488f4e99 Author: Ptyl Dragon p...@cloudon.com Date: Mon Nov 4 16:10:10 2013 +0200 release BitmapReadAccess after use to fix 1 mb per render mem leak Change-Id: I4d9a580132eb9a8d618c1165f962b47be4e80695 diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 7ac4c0d..e3f7cbb 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1830,6 +1830,7 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD context, contextWidth, contextHeight); +aBitmap.ReleaseAccess(readAccess); } Application::ReleaseSolarMutex(); } commit 75f61fe97b3a6e5069ccad63995bfa2af981dc54 Author: Ptyl Dragon p...@cloudon.com Date: Mon Nov 4 16:08:39 2013 +0200 releasing the CGDataProvider to prevent possible memory leaks Change-Id: Ib64f457bd9cc185e979b1a3e9f07fdba93da88d7 diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 39208f5..c0f7073 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -412,6 +412,7 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh CGRect targetRect = CGRectMake( 0, 0, targetWidth, targetHeight ); CGContextDrawImage( context, targetRect, sourceImage ); CGImageRelease(sourceImage); +CGDataProviderRelease(provider); } extern C commit 8121f1d8dca970edbe9c64441dabfc2efb7dc3a6 Author: Ptyl Dragon p...@cloudon.com Date: Mon Nov 4 16:06:15 2013 +0200 measuring the time it takes to render a tile Change-Id: I37db170af0e507c99d571b94ff78a1987944290e diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m index 1b25648..784c0dd 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m @@ -43,6 +43,7 @@ - (void)drawRect:(CGRect)rect { +NSTimeInterval startTime = CACurrentMediaTime(); CGContextRef context = UIGraphicsGetCurrentContext(); MLODpxPoint tilePosition =MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY); @@ -62,6 +63,7 @@ tilePosition, tileSize); +NSLog(@tile rendering took %f seconds,CACurrentMediaTime() - startTime); MLODpxSize size = touch_lo_get_content_size(); NSLog(@touch_lo_get_content_size: width=%f, height=%f,size.width, size.height); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - ios/shared sw/source
ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m | 117 -- ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h |1 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m |6 sw/source/core/view/viewsh.cxx | 11 4 files changed, 111 insertions(+), 24 deletions(-) New commits: commit 3bd4b54bcd18f6614fd1274b10fdd99c24a5cece Author: Ptyl Dragon p...@cloudon.com Date: Fri Nov 1 12:51:51 2013 +0200 removed DPX RIP (0,0) coords shift. played with rendering parameters Change-Id: Ib2a3b017aa59bc1a8408b42f101fd041270494aa diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 6d1837c..8280222 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1810,10 +1810,11 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD aMapMode.SetScaleX(scaleX); aMapMode.SetScaleY(scaleY); aDevice.SetMapMode(aMapMode); +SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) ); // resizes the virtual device so to contain the entrie context aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); // draw - works in logic coordinates -pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight))); +pViewShell-PaintTile(aDevice, Rectangle(Point(0, 0), Size(tileWidth, tileHeight))); // copy the aDevice content to mpImage Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight; BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); @@ -1845,8 +1846,8 @@ MLODpxSize touch_lo_get_content_size() extern C MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint) { -MLODpxSize contentSize = touch_lo_get_content_size(); -MLORip x = MLORipByDpx(mloDpxPoint.x - (contentSize.width/2.0f)); +//MLODpxSize contentSize = touch_lo_get_content_size(); +MLORip x = MLORipByDpx(mloDpxPoint.x /*- (contentSize.width/2.0f)*/); MLORip y = MLORipByDpx(mloDpxPoint.y); return MLORipPointByRips(x,y); } @@ -1854,8 +1855,8 @@ MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint) extern C MLODpxPoint MLODpxPointByRipPoint(MLORipPoint mloRipPoint) { -MLODpxSize contentSize = touch_lo_get_content_size(); -MLODpx x = MLODpxByRip(mloRipPoint.x) + (contentSize.width/2.0f); +//MLODpxSize contentSize = touch_lo_get_content_size(); +MLODpx x = MLODpxByRip(mloRipPoint.x)/* + (contentSize.width/2.0f)*/; MLODpx y = MLODpxByRip(mloRipPoint.y); return MLODpxPointByDpxes(x,y); } commit b75dd58ba7359d78a6cb241d92ff70ee1f01de20 Author: Ptyl Dragon p...@cloudon.com Date: Fri Nov 1 12:48:31 2013 +0200 tiledrendering new stepper ui for tor Change-Id: I3d4586c84adfa9f0416a043230c6227bda98d9dd diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m index f286390..22d98fa 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m @@ -14,9 +14,14 @@ @property (nonatomic,strong) MLOTestingTileParameterExtractor extractor; @property UILabel * label; @property UITextField * data; +@property UITextField * step; @property NSInteger defaultValue; +@property UIStepper * dataStepper; +@property UIStepper * stepStepper; @end +static const CGFloat DEFAULT_STEP_VALUE = 1; + @implementation MLOTestingTileParameter -(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor:(MLOTestingTileParameterExtractor) extractor defaultValue:(NSInteger) defaultValue{ @@ -26,13 +31,59 @@ self.params = params; self.extractor = extractor; self.defaultValue = defaultValue; - [self initLabel:label]; -[self initTextField]; +self.dataStepper = [self createStepper]; +self.stepStepper = [self createStepper]; +[self initDataTextField]; +[self initStepTextField]; } return self; } +-(UIStepper *) createStepper{ +UIStepper * stepper = [UIStepper new]; +stepper.maximumValue = MAXFLOAT; +stepper.minimumValue = -MAXFLOAT; +stepper.stepValue = DEFAULT_STEP_VALUE; +stepper.autorepeat = YES; +stepper.continuous = NO; +[stepper addObserver:self forKeyPath:@value + options: NSKeyValueObservingOptionNew + context:0]; +return stepper
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared
ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 2902b39b3e349f26c04fc93acd37b7db813b1e55 Author: Ptyl Dragon p...@cloudon.com Date: Fri Nov 1 13:09:28 2013 +0200 UISteppers now go down as well Change-Id: I06e1b7fec490ec373a9775915d6dc2c30ce805f1 diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m index 22d98fa..1107eef 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m @@ -48,7 +48,7 @@ static const CGFloat DEFAULT_STEP_VALUE = 1; stepper.autorepeat = YES; stepper.continuous = NO; [stepper addObserver:self forKeyPath:@value - options: NSKeyValueObservingOptionNew + options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:0]; return stepper; } @@ -57,8 +57,10 @@ static const CGFloat DEFAULT_STEP_VALUE = 1; { if (object == self.dataStepper) { - NSNumber * floatNumber = change[NSKeyValueChangeNewKey]; -CGFloat value = [self currentDataValue] + [floatNumber floatValue]; +NSNumber * newNumber = change[NSKeyValueChangeNewKey]; +NSNumber * oldNumber = change[NSKeyValueChangeOldKey]; + +CGFloat value = [self currentDataValue] + [newNumber floatValue] - [oldNumber floatValue]; if(value == ((NSInteger) value)){ self.data.text = [[NSNumber numberWithInteger:(NSInteger) value] stringValue]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - ios/shared
ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h |6 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m | 25 ++- ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h |7 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m | 82 -- 4 files changed, 100 insertions(+), 20 deletions(-) New commits: commit 9e274de101a5b35665973a6cb17f41a85d2cd25f Author: Ptyl Dragon p...@cloudon.com Date: Fri Nov 1 15:19:42 2013 +0200 added linking of width and height Change-Id: I2282fcfffed5c17eb1798d3198d6f04dc27208e9 diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h index df0f70b..8465b5d 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h @@ -8,12 +8,15 @@ #import MLOObject.h +typedef enum {WIDTH_IS_HEIGHT,WIDTH_IS_NOT_HEIGHT} MLOTestingTileParametersMode; +#define MLOTestingTileParametersModeString(enum) [@[@WIDTH_IS_HEIGHT,@WIDTH_IS_NOT_HEIGHT] objectAtIndex:enum] + typedef void (^MLOTestingTileParameterExtractor)(CGFloat value); @class MLOTestingTileParametersViewController; @interface MLOTestingTileParameter : MLOObject --(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor1:(MLOTestingTileParameterExtractor) extractor extractor2:(MLOTestingTileParameterExtractor) linkedExtractor defaultValue:(NSInteger) defaultValue; --(void)extract:(BOOL) isExtractor1; +-(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor widthIsHeightExtractor:(MLOTestingTileParameterExtractor) widthIsHeightExtractor defaultValue:(NSInteger) defaultValue; +-(void)extractMode:(MLOTestingTileParametersMode) mode; -(void)setParamFrame:(CGRect) paramFrame; -(void)addToSuperview; @end diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m index b5fcd8d..9c0af4f 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m @@ -11,8 +11,8 @@ @interface MLOTestingTileParameter () @property MLOTestingTileParametersViewController * params; -@property (nonatomic,strong) MLOTestingTileParameterExtractor extractor1; -@property (nonatomic,strong) MLOTestingTileParameterExtractor extractor2; +@property (nonatomic,strong) MLOTestingTileParameterExtractor widthIsHeightExtractor; +@property (nonatomic,strong) MLOTestingTileParameterExtractor widthIsNotHeightExtractor; @property UILabel * label; @property UITextField * data; @property UITextField * step; @@ -25,13 +25,13 @@ static const CGFloat DEFAULT_STEP_VALUE = 1; @implementation MLOTestingTileParameter --(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label extractor1:(MLOTestingTileParameterExtractor) extractor1 extractor2:(MLOTestingTileParameterExtractor) extractor2 defaultValue:(NSInteger) defaultValue{ +-(MLOTestingTileParameter *)initWithParams:(MLOTestingTileParametersViewController *) params label:(NSString *)label widthIsNotHeightExtractor:(MLOTestingTileParameterExtractor) widthIsNotHeightExtractor widthIsHeightExtractor:(MLOTestingTileParameterExtractor) widthIsHeightExtractor defaultValue:(NSInteger) defaultValue{ NSLog(@Creating tile testing param %@ with default value %d,label,defaultValue); self = [self init]; if(self){ self.params = params; -self.extractor1 = extractor1; -self.extractor2 = extractor2; +self.widthIsHeightExtractor = widthIsHeightExtractor; +self.widthIsNotHeightExtractor = widthIsNotHeightExtractor; self.defaultValue = defaultValue; [self initLabel:label]; self.dataStepper = [self createStepper]; @@ -169,16 +169,20 @@ static const CGFloat DEFAULT_STEP_VALUE = 1; return [self.data.text floatValue]; } --(void)extract:(BOOL) isExtractor1{ - -NSLog(@%@ extract %d,self,isExtractor1?1:2); - -CGFloat dataValue = [self currentDataValue]; +-(MLOTestingTileParameterExtractor) getExtractor:(MLOTestingTileParametersMode) mode{ +switch (mode) { +case WIDTH_IS_HEIGHT: +return self.widthIsHeightExtractor; +case WIDTH_IS_NOT_HEIGHT: +return self.widthIsNotHeightExtractor
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared
ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h |1 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m | 12 ++ ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m | 19 +++--- ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m |7 +++ 4 files changed, 34 insertions(+), 5 deletions(-) New commits: commit 9f1e17cf4f8130fb356de4c69634154d08ea87e7 Author: Ptyl Dragon p...@cloudon.com Date: Fri Nov 1 15:55:44 2013 +0200 changed testing app UI to be more clear what it does Change-Id: I5307478fc47f0810cae24c72ce509ac6a409bf1b diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h index 8465b5d..041e198 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h @@ -19,4 +19,5 @@ typedef void (^MLOTestingTileParameterExtractor)(CGFloat value); -(void)extractMode:(MLOTestingTileParametersMode) mode; -(void)setParamFrame:(CGRect) paramFrame; -(void)addToSuperview; +-(void)enterMode:(MLOTestingTileParametersMode)mode; @end diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m index 9c0af4f..a661539 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m @@ -185,4 +185,16 @@ static const CGFloat DEFAULT_STEP_VALUE = 1; extractor([self currentDataValue]); } } +-(BOOL)isSupportingMode:(MLOTestingTileParametersMode) mode{ +return [self getExtractor:mode]!=nil; +} +-(void)enterMode:(MLOTestingTileParametersMode)mode{ +CGFloat alpha = [self isSupportingMode:mode] ? 1.0f: 0.0f; +self.label.alpha = alpha; +self.data.alpha = alpha; +self.dataStepper.alpha = alpha; +self.step.alpha =alpha; +self.stepStepper.alpha = alpha; +} + @end diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m index 0c18b82..f8fcadb 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m @@ -45,11 +45,22 @@ { CGContextRef context = UIGraphicsGetCurrentContext(); +MLODpxPoint tilePosition =MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY); +MLODpxSize tileSize = MLODpxSizeByDpxes(self.tester.params.tileWidth,self.tester.params.tileHeight); +NSInteger contextWidth = self.tester.params.contextWidth; +NSInteger contextHeight = self.tester.params.contextHeight; + +NSLog(@touch_lo_draw_tile(contextWidth=%d, contextHeight=%d, tilePosition=%@, tileSize=%@, + contextWidth, + contextHeight, + NSStringFromCGPoint(tilePosition), + NSStringFromCGSize(tileSize)); + touch_lo_draw_tile(context, - self.tester.params.contextWidth, - self.tester.params.contextHeight, - MLODpxPointByDpxes(self.tester.params.tilePosX,self.tester.params.tilePosY), - MLODpxSizeByDpxes(self.tester.params.tileWidth,self.tester.params.tileHeight)); + contextWidth, + contextHeight, + tilePosition, + tileSize); MLODpxSize size = touch_lo_get_content_size(); NSLog(@touch_lo_get_content_size: width=%f, height=%f,size.width, size.height); diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m index 4a235e1..52d7b64 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m @@ -26,11 +26,13 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f; self = [self init]; if(self){ self.tester = tester; -self.mode = WIDTH_IS_HEIGHT; [self initParams]; [self initModeButton]; [self initRenderButton]; +self.mode = WIDTH_IS_NOT_HEIGHT; +[self changeMode]; + } NSLog(@%@ initWithTester,self); @@ -96,6 +98,9 @@ static const CGFloat
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared
ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 4ba4d45da9f1f1df28fd68a29091e57bd30a9d61 Author: Ptyl Dragon p...@cloudon.com Date: Fri Nov 1 16:11:21 2013 +0200 fix less than 1 step limit Change-Id: Ic5fd714ff975b6e5afbe7ff78f3fc1da398a658d diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m index a661539..89267e5 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m @@ -34,18 +34,18 @@ static const CGFloat DEFAULT_STEP_VALUE = 1; self.widthIsNotHeightExtractor = widthIsNotHeightExtractor; self.defaultValue = defaultValue; [self initLabel:label]; -self.dataStepper = [self createStepper]; -self.stepStepper = [self createStepper]; +self.dataStepper = [self stepperWithMinValue:-MAXFLOAT]; +self.stepStepper = [self stepperWithMinValue:1]; [self initDataTextField]; [self initStepTextField]; } return self; } --(UIStepper *) createStepper{ +-(UIStepper *) stepperWithMinValue:(CGFloat) minValue{ UIStepper * stepper = [UIStepper new]; stepper.maximumValue = MAXFLOAT; -stepper.minimumValue = -MAXFLOAT; +stepper.minimumValue = minValue; stepper.stepValue = DEFAULT_STEP_VALUE; stepper.autorepeat = YES; stepper.continuous = NO; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch ios/shared sw/source
include/touch/touch.h | 98 ++ ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m |8 sw/source/core/view/viewsh.cxx | 46 ++-- 3 files changed, 90 insertions(+), 62 deletions(-) New commits: commit d1528ec8e05d2a8bde93facbe338bde4cc1e017a Author: Ptyl Dragon p...@cloudon.com Date: Thu Oct 31 15:20:13 2013 +0200 added units MLODpxes and MLORips Change-Id: Ica09fbd0f6a822f464df302dba4cf40d1d089697 diff --git a/include/touch/touch.h b/include/touch/touch.h index 6601a05..5902376 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -71,69 +71,89 @@ typedef basegfx::B2IBox MLORect; // MLODip - Device Independent Pixels -typedef long long MLOPixel; -static const MLOPixel LO_TWIPS_TO_MLO_PIXEL_RATIO = 10L; -struct MLOPixelSize { -MLOPixel width; -MLOPixel height; +typedef long long MLORip; +typedef CGFloat MLODpx; +typedef CGPoint MLODpxPoint; +typedef CGSize MLODpxSize; + +CG_INLINE MLODpxPoint +MLODpxPointByDpxes(MLODpx x, MLODpx y) +{ +return CGPointMake(x, y); +} + +CG_INLINE MLODpxSize +MLODpxSizeByDpxes(MLODpx width, MLODpx height) +{ +return CGSizeMake(width, height); +} + +static const MLORip LO_TWIPS_TO_MLO_RIP_RATIO = 10L; + +struct MLORipSize +{ +MLORip width; +MLORip height; }; -typedef struct MLOPixelSize MLOPixelSize; -struct MLOPixelPoint { -MLOPixel x; -MLOPixel y; +typedef struct MLORipSize MLORipSize; + +struct MLORipPoint +{ +MLORip x; +MLORip y; }; -typedef struct MLOPixelPoint MLOPixelPoint; +typedef struct MLORipPoint MLORipPoint; -CG_INLINE CGFloat -MLOPixelToCGFloat(MLOPixel mloPixel) +CG_INLINE MLODpx +MLODpxByRip(MLORip rip) { -return (CGFloat) (mloPixel / LO_TWIPS_TO_MLO_PIXEL_RATIO); +return (MLODpx) (rip / LO_TWIPS_TO_MLO_RIP_RATIO); } -CG_INLINE MLOPixel -CGFloatToMLOPixel(CGFloat cgFloat) +CG_INLINE MLORip +MLORipByDpx(MLODpx dpx) { -return (MLOPixel) cgFloat * LO_TWIPS_TO_MLO_PIXEL_RATIO; +return (MLORip) (dpx * LO_TWIPS_TO_MLO_RIP_RATIO); } -CG_INLINE MLOPixelSize -MLOPixelSizeMake(MLOPixel width, MLOPixel height) +CG_INLINE MLORipSize +MLORipSizeByRips(MLORip width, MLORip height) { -MLOPixelSize size; size.width = width; size.height = height; return size; +MLORipSize ripSize; ripSize.width = width; ripSize.height = height; return ripSize; } -CG_INLINE MLOPixelPoint -MLOPixelPointMake(MLOPixel x, MLOPixel y) +CG_INLINE MLORipPoint +MLORipPointByRips(MLORip x, MLORip y) { -MLOPixelPoint point; point.x = x; point.y = y; return point; +MLORipPoint point; point.x = x; point.y = y; return point; } -CG_INLINE MLOPixelSize -CGSizeToMLOPixelSize(CGSize cgSize) +CG_INLINE MLORipSize +MLORipSizeByDpxSize(MLODpxSize dpxSize) { -MLOPixelSize mloPixelSize; -mloPixelSize.width = MLOPixelToCGFloat(cgSize.width); -mloPixelSize.height = MLOPixelToCGFloat(cgSize.height); -return mloPixelSize; +MLORipSize ripSize; +ripSize.width = MLORipByDpx(dpxSize.width); +ripSize.height = MLORipByDpx(dpxSize.height); +return ripSize; } -CG_INLINE CGSize -MLOPixelsToCGSize(MLOPixel width, MLOPixel height) +CG_INLINE MLODpxSize +MLODpxSizeByRips(MLORip width, MLORip height) { -CGFloat fWidth = MLOPixelToCGFloat(width); -CGFloat fHeight = MLOPixelToCGFloat(height); +CGFloat fWidth = MLODpxByRip(width); +CGFloat fHeight = MLODpxByRip(height); return CGSizeMake(fWidth, fHeight); } -CG_INLINE CGSize -MLOPixelSizeToCGSize(MLOPixelSize mloPixelSize) +CG_INLINE MLODpxSize +MLODpxSizeByRipSize(MLORipSize ripSize) { -return MLOPixelsToCGSize(mloPixelSize.width, mloPixelSize.height); +return MLODpxSizeByRips(ripSize.width, ripSize.height); } -MLOPixelPoint CGPointToMLOPixelPoint(CGPoint cgPoint); +MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint); -CGPoint MLOPixelPointToCGPoint(MLOPixelPoint mloPixelPoint); +MLODpxPoint MLODpxPointByMLORipPoint(MLORipPoint mloRipPoint); // selection @@ -178,9 +198,9 @@ void touch_lo_keyboard_input(int c); tilePosX, tilePosY, tileWidth, tileHeight address the part of the document to be drawn. context, contextHeight, contextWidth specify where to draw. */ -void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); +void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tilePosition, MLODpxSize tileSize); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -CGSize touch_lo_get_content_size(); +MLODpxSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/ios/shared
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - ios/shared sw/source
ios/shared/ios_sharedlo/cxx/mlo_uno.h |4 ios/shared/ios_sharedlo/cxx/mlo_uno.mm | 307 +- ios/shared/ios_sharedlo/objective_c/view_controllers/scroller/MLOScrollerData.m |2 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m |3 sw/source/core/view/viewsh.cxx |5 5 files changed, 169 insertions(+), 152 deletions(-) New commits: commit fafadd775696afd5dbed22fcfe37c7ea599fd40d Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 30 13:33:13 2013 +0200 1st implementation of touch_lo_get_content_size Change-Id: I8b72c4366b502a71f2ed3bf917296c9553364d83 diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m index 82a970f..f709fc4 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m @@ -59,6 +59,9 @@ self.tester.params.tileHeight); CGContextRestoreGState(context); + +MLOContentSize size = touch_lo_get_content_size(); +NSLog(@MLOContentSize: width=%lld, height=%lld,size.width, size.height); } @end diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 1df00fed..420715a 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1823,6 +1823,11 @@ MLOContentSize touch_lo_get_content_size() SwWrtShell *pViewShell = GetActiveWrtShell(); if (pViewShell) { +static const long WIDTH_ADDITION = 6L * DOCUMENTBORDER; +static const long HEIGHT_ADDITION = 2L * DOCUMENTBORDER; +Size documentSize =pViewShell-GetView().GetDocSz(); +return MLOContentSizeMake(documentSize.Width() + WIDTH_ADDITION, + documentSize.Height() + HEIGHT_ADDITION); } return MLOContentSizeMake(0,0); } commit ab15ab1d7776349dce9f34f1a7c17612b90c6cbf Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 30 13:02:38 2013 +0200 refactored mlo_uno to be in lo C++ conventions Change-Id: I908902e6b9224b90c196a7f39b573e07b4928250 diff --git a/ios/shared/ios_sharedlo/cxx/mlo_uno.h b/ios/shared/ios_sharedlo/cxx/mlo_uno.h index df53190..c1e499c 100644 --- a/ios/shared/ios_sharedlo/cxx/mlo_uno.h +++ b/ios/shared/ios_sharedlo/cxx/mlo_uno.h @@ -14,11 +14,13 @@ extern C { #endif typedef enum {MARK_ALL,MARK_FIRST,MARK_NEXT,MARK_PREVIOUS} MLOFindSelectionType; +typedef enum {LAST_PAGE,CURRENT_PAGE} MLOGetPageType; BOOL mlo_is_document_open(void); BOOL mlo_open_file(NSString * file); void mlo_close(void); -long mlo_get_pages(BOOL last); +long mlo_get_page_count(void); +long mlo_get_current_page(void); int mlo_find(NSString * toSearch,MLOFindSelectionType type); void mlo_get_selection(NSMutableString * mutableString); void mlo_fetch_view_data(NSMutableString * mutableString); diff --git a/ios/shared/ios_sharedlo/cxx/mlo_uno.mm b/ios/shared/ios_sharedlo/cxx/mlo_uno.mm index 49a4fac..2107324 100644 --- a/ios/shared/ios_sharedlo/cxx/mlo_uno.mm +++ b/ios/shared/ios_sharedlo/cxx/mlo_uno.mm @@ -92,132 +92,136 @@ rtl::OUString lastSearch; /// functions -Reference XComponentContext getXComponentContext(){ -if(!openedComponentContext.get()){ +Reference XComponentContext getXComponentContext() +{ +if(!openedComponentContext.get()) +{ openedComponentContext.set(cppu::defaultBootstrap_InitialComponentContext()); - LOG_EVAL(openedComponentContext,@XComponentContext); } return openedComponentContext; } -ReferenceXMultiComponentFactory getXComponentFactory(){ -if(!openedXComponentFactory.get()){ +ReferenceXMultiComponentFactory getXComponentFactory() +{ +if(!openedXComponentFactory.get()) +{ openedXComponentFactory.set(getXComponentContext()-getServiceManager()); - LOG_EVAL(openedXComponentFactory,@XMultiComponentContext); } - return openedXComponentFactory; } -ReferenceXInterface getXDesktop(){ -if(!openedXDesktop.get()){ - +ReferenceXInterface getXDesktop() +{ +if(!openedXDesktop.get()) +{ openedXDesktop.set(getXComponentFactory()-createInstanceWithContext ( OU(com.sun.star.frame.Desktop), getXComponentContext())); - LOG_EVAL(openedXDesktop, @XDesktop); } - return openedXDesktop; } -Reference XComponentLoader getXComponentLoader(){ -if(!openedXComponentLoader.get()){ +Reference XComponentLoader getXComponentLoader() +{ +if(!openedXComponentLoader.get()) +{ openedXComponentLoader.set(Reference XComponentLoader ( Desktop::create
[Libreoffice-commits] core.git: ios/shared
ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m |4 1 file changed, 4 insertions(+) New commits: commit 95f112d200db6ae61f7510ae95e3f0eaa60a8929 Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 30 15:41:21 2013 +0200 added stub for void touch_ui_selection_none in MLOGestureEngine Change-Id: I45f957863dc26b2ef40bdfed04cb689325f5b170 Reviewed-on: https://gerrit.libreoffice.org/6492 Reviewed-by: Tor Lillqvist t...@collabora.com Tested-by: Tor Lillqvist t...@collabora.com diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m index 3523dca..53d3c74 100644 --- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m +++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m @@ -470,3 +470,7 @@ void touch_ui_selection_start(MLOSelectionKind kind, rectangles[i].origin.y); } } + +void touch_ui_selection_none(){ +// STUB +} \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch ios/shared sw/source
include/touch/touch.h | 74 -- ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m |4 sw/source/core/view/viewsh.cxx | 26 ++- 3 files changed, 90 insertions(+), 14 deletions(-) New commits: commit 19879fe620e72f45f8faffee8f8d1271d803aa6e Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 30 19:42:09 2013 +0200 ready for integration with CATiledLayer Change-Id: I50f519a37036ed3d17f73c80b33f4a9c4c19cb52 diff --git a/include/touch/touch.h b/include/touch/touch.h index 6ba2fab..f0cdabe 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -69,19 +69,75 @@ typedef CGRect MLORect; typedef basegfx::B2IBox MLORect; #endif -typedef long long MLOContentSizeDimension; -struct MLOContentSize { -MLOContentSizeDimension width; -MLOContentSizeDimension height; +// MLODip - Device Independent Pixels + +typedef long long MLOPixel; +static const MLOPixel LO_TWIPS_TO_MLO_PIXEL_RATIO = 10L; +struct MLOPixelSize { +MLOPixel width; +MLOPixel height; +}; +typedef struct MLOPixelSize MLOPixelSize; +struct MLOPixelPoint { +MLOPixel x; +MLOPixel y; }; -typedef struct MLOContentSize MLOContentSize; +typedef struct MLOPixelPoint MLOPixelPoint; + +CG_INLINE CGFloat +MLOPixelToCGFloat(MLOPixel mloPixel) +{ +return (CGFloat) (mloPixel / LO_TWIPS_TO_MLO_PIXEL_RATIO); +} + +CG_INLINE MLOPixel +CGFloatToMLOPixel(CGFloat cgFloat) +{ +return (MLOPixel) cgFloat * LO_TWIPS_TO_MLO_PIXEL_RATIO; +} + +CG_INLINE MLOPixelSize +MLOPixelSizeMake(MLOPixel width, MLOPixel height) +{ +MLOPixelSize size; size.width = width; size.height = height; return size; +} + +CG_INLINE MLOPixelPoint +MLOPixelPointMake(MLOPixel x, MLOPixel y) +{ +MLOPixelPoint point; point.x = x; point.y = y; return point; +} + +CG_INLINE MLOPixelSize +CGSizeToMLOPixelSize(CGSize cgSize) +{ +MLOPixelSize mloPixelSize; +mloPixelSize.width = MLOPixelToCGFloat(cgSize.width); +mloPixelSize.height = MLOPixelToCGFloat(cgSize.height); +return mloPixelSize; +} + +CG_INLINE CGSize +MLOPixelsToCGSize(MLOPixel width, MLOPixel height) +{ +CGFloat fWidth = CGFloatToMLOPixel(width); +CGFloat fHeight = CGFloatToMLOPixel(height); +return CGSizeMake(fWidth, fHeight); +} -CG_INLINE MLOContentSize -MLOContentSizeMake(MLOContentSizeDimension width, MLOContentSizeDimension height) +CG_INLINE CGSize +MLOPixelSizeToCGSize(MLOPixelSize mloPixelSize) { -MLOContentSize size; size.width = width; size.height = height; return size; +return MLOPixelsToCGSize(mloPixelSize.width, mloPixelSize.height); } +MLOPixelPoint CGPointToMLOPixelPoint(CGPoint cgPoint); + +CGPoint MLOPixelPointToCGPoint(MLOPixelPoint mloPixelPoint); + + +// selection + void touch_ui_selection_start(MLOSelectionKind kind, const void *documentHandle, MLORect *rectangles, @@ -124,7 +180,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -MLOContentSize touch_lo_get_content_size(); +CGSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m index 3523dca..f2a6f8e 100644 --- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m +++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m @@ -470,3 +470,7 @@ void touch_ui_selection_start(MLOSelectionKind kind, rectangles[i].origin.y); } } + +void touch_ui_selection_none(){ +// STUB +} diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 420715a..8606126 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1818,7 +1818,7 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int Application::ReleaseSolarMutex(); } extern C -MLOContentSize touch_lo_get_content_size() +CGSize touch_lo_get_content_size() { SwWrtShell *pViewShell = GetActiveWrtShell(); if (pViewShell) @@ -1826,14 +1826,30 @@ MLOContentSize touch_lo_get_content_size() static const long WIDTH_ADDITION = 6L * DOCUMENTBORDER; static const long HEIGHT_ADDITION = 2L * DOCUMENTBORDER; Size documentSize =pViewShell-GetView().GetDocSz(); -return MLOContentSizeMake(documentSize.Width() + WIDTH_ADDITION, +return MLOPixelsToCGSize(documentSize.Width() + WIDTH_ADDITION
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - include/touch sw/source
include/touch/touch.h |1 + sw/source/core/view/viewsh.cxx | 10 ++ 2 files changed, 11 insertions(+) New commits: commit 1d8592059259a3ccc5088516c3f14fc34e49c160 Author: Ptyl Dragon p...@cloudon.com Date: Tue Oct 29 16:11:58 2013 +0200 added the touch_lo_get_content_size to touch.h Change-Id: I53287cbc84f99b56f575479860c3e8f890c49a35 diff --git a/include/touch/touch.h b/include/touch/touch.h index 979a8de..a480fb6 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -111,6 +111,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); +Size touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) commit ae6ef002d3b4c5eef98a4751d3a6e04e6f1a7d9b Author: Ptyl Dragon p...@cloudon.com Date: Tue Oct 29 16:11:29 2013 +0200 added Size touch_lo_get_content_size() Change-Id: I0874f511e217713ba695e55d07133378a33fced9 diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index d64e1fa..9427b3d 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1815,6 +1815,16 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int } } +extern C +Size touch_lo_get_content_size() +{ +SwWrtShell *pViewShell = GetActiveWrtShell(); +Size contentSize(0,0); +if (pViewShell) +{ +} +return contentSize; +} #endif extern C void touch_ui_selection_none() {} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch sw/source vcl/ios
include/touch/touch.h |2 +- sw/source/core/view/viewsh.cxx | 12 vcl/ios/iosinst.cxx| 11 +++ 3 files changed, 12 insertions(+), 13 deletions(-) New commits: commit 8e22438b560121b74f588cef19891b4e2c3e45a6 Author: Ptyl Dragon p...@cloudon.com Date: Tue Oct 29 16:22:06 2013 +0200 changed to CGSize Change-Id: Ic84fcadf4332210693586825cdd8e32ef0f2a727 diff --git a/include/touch/touch.h b/include/touch/touch.h index a480fb6..ae4f491 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -111,7 +111,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -Size touch_lo_get_content_size(); +CGSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 9427b3d..c4a8dd8 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1772,7 +1772,6 @@ void ViewShell::PaintTile(OutputDevice *pOut, const Rectangle rRect) } #if !HAVE_FEATURE_DESKTOP - extern C void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight) { @@ -1814,17 +1813,6 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int contextHeight); } } - -extern C -Size touch_lo_get_content_size() -{ -SwWrtShell *pViewShell = GetActiveWrtShell(); -Size contentSize(0,0); -if (pViewShell) -{ -} -return contentSize; -} #endif extern C void touch_ui_selection_none() {} diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 39208f5..d6e580a 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -415,6 +415,17 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh } extern C +CGSize touch_lo_get_content_size() +{ +CGSize contentSize = CGSizeMake(0,0); +SalFrame *pFocus = IosSalInstance::getInstance()-getFocusFrame(); +if (pFocus) +{ +} +return contentSize; +} + +extern C void touch_lo_render_windows(void *context, int minX, int minY, int width, int height) { CGContextRef cgContext = (CGContextRef) context; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch sw/source vcl/ios
include/touch/touch.h | 15 ++- sw/source/core/view/viewsh.cxx |9 + vcl/ios/iosinst.cxx| 11 --- 3 files changed, 23 insertions(+), 12 deletions(-) New commits: commit 02cf93393fc0c0af8673008dee159a976acaeb3a Author: Ptyl Dragon p...@cloudon.com Date: Tue Oct 29 18:12:00 2013 +0200 created a long long unit for MLOContentSize Change-Id: I41910058088161119d3cae8ca625d456652d890f diff --git a/include/touch/touch.h b/include/touch/touch.h index ae4f491..6ba2fab 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -69,6 +69,19 @@ typedef CGRect MLORect; typedef basegfx::B2IBox MLORect; #endif +typedef long long MLOContentSizeDimension; +struct MLOContentSize { +MLOContentSizeDimension width; +MLOContentSizeDimension height; +}; +typedef struct MLOContentSize MLOContentSize; + +CG_INLINE MLOContentSize +MLOContentSizeMake(MLOContentSizeDimension width, MLOContentSizeDimension height) +{ +MLOContentSize size; size.width = width; size.height = height; return size; +} + void touch_ui_selection_start(MLOSelectionKind kind, const void *documentHandle, MLORect *rectangles, @@ -111,7 +124,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -CGSize touch_lo_get_content_size(); +MLOContentSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 68ba9bb..1df00fed 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1817,6 +1817,15 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int } Application::ReleaseSolarMutex(); } +extern C +MLOContentSize touch_lo_get_content_size() +{ +SwWrtShell *pViewShell = GetActiveWrtShell(); +if (pViewShell) +{ +} +return MLOContentSizeMake(0,0); +} #endif extern C void touch_ui_selection_none() {} diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index d6e580a..39208f5 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -415,17 +415,6 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh } extern C -CGSize touch_lo_get_content_size() -{ -CGSize contentSize = CGSizeMake(0,0); -SalFrame *pFocus = IosSalInstance::getInstance()-getFocusFrame(); -if (pFocus) -{ -} -return contentSize; -} - -extern C void touch_lo_render_windows(void *context, int minX, int minY, int width, int height) { CGContextRef cgContext = (CGContextRef) context; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - sw/source
sw/source/core/view/viewsh.cxx | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) New commits: commit f13e30c4fbb669f2885c99a676c5905f1356891e Author: Ptyl Dragon p...@cloudon.com Date: Mon Oct 28 09:24:57 2013 +0200 iOS uses virtual device too Change-Id: I468b41268f97af444974e05bc38fa5ca975a9d31 diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index cf313f5..e2a8bd6 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1784,13 +1784,16 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int // TODO create a VirtualDevice based on SystemGraphicsData instead so // that we get direct rendering; something like: // -// SystemGraphicsData aData; -// [setup the aData] -// VirtualDevice aDevice(aData, [color depth]); -//VirtualDevice aDevice; -//aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); -pViewShell-PaintTile(pViewShell-GetOut(), Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); -Bitmap aBitmap(pViewShell-GetOut()-GetBitmap(Point(0,0), pViewShell-GetOut()-PixelToLogic(Size(contextWidth, contextHeight; +VirtualDevice aDevice; +MapMode aMapMode(aDevice.GetMapMode()); +aMapMode.SetMapUnit(MAP_TWIP); +aMapMode.SetOrigin(Point(-tilePosX, -tilePosY)); +aDevice.SetMapMode(aMapMode); +aDevice.SetOutputSizePixel(aDevice.PixelToLogic(Size(contextWidth, contextHeight))); +// draw +pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight))); +// copy the aDevice content to mpImage +Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight; BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); touch_lo_copy_buffer((void *) readAccess-GetBuffer(), tileWidth, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - sw/source
sw/source/core/view/viewsh.cxx | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) New commits: commit 9c9fb5116e80b431a92a57b829d9e90ec538f78f Author: Ptyl Dragon p...@cloudon.com Date: Mon Oct 28 13:50:50 2013 +0200 in progress tile rendering Change-Id: Ie49fc47700287c3c21f234e3fece2b3afd272d24 diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index e2a8bd6..fdf7577 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -162,7 +162,9 @@ void ViewShell::DLPrePaint2(const Region rRegion) if(mpTargetPaintWindow-GetPreRenderDevice()) { mpBufferedOut = mpOut; +#ifndef IOS mpOut = (mpTargetPaintWindow-GetTargetOutputDevice()); +#endif } // remember original paint MapMode for wrapped FlyFrame paints @@ -192,11 +194,13 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer) mPrePostPaintRegions.pop(); // clear if(0 != mpTargetPaintWindow) { +#ifndef IOS // #i74769# restore buffered OutDev if(mpTargetPaintWindow-GetPreRenderDevice()) { mpOut = mpBufferedOut; } +#endif // #i74769# use SdrPaintWindow now direct Imp()-GetDrawView()-EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer); @@ -1788,16 +1792,22 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int MapMode aMapMode(aDevice.GetMapMode()); aMapMode.SetMapUnit(MAP_TWIP); aMapMode.SetOrigin(Point(-tilePosX, -tilePosY)); +// scaling +Fraction scaleX(contextWidth,tileWidth); +Fraction scaleY(contextHeight,tileHeight); +aMapMode.SetScaleX(scaleX); +aMapMode.SetScaleY(scaleY); aDevice.SetMapMode(aMapMode); -aDevice.SetOutputSizePixel(aDevice.PixelToLogic(Size(contextWidth, contextHeight))); +// resizes the virtual device so to contain the entrie context +aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); // draw pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight))); // copy the aDevice content to mpImage Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight; BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); touch_lo_copy_buffer((void *) readAccess-GetBuffer(), - tileWidth, - tileHeight, + contextWidth, + contextHeight, readAccess- GetScanlineSize(), context, contextWidth, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared sw/source
ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m | 12 +- sw/source/core/view/viewsh.cxx |8 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) New commits: commit deaee517c69ee7026a70b71867d7ca476e582987 Author: Ptyl Dragon p...@cloudon.com Date: Mon Oct 28 16:54:21 2013 +0200 for tor Change-Id: I1565450c763e4f0bf1a724978b5550163d627482 diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m index be2e144..acd00c1 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m @@ -39,12 +39,12 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f; } -(void)initParams{ -self.params = @[[self createParam:@contextWidth extractor:^(CGFloat value){self.contextWidth = value;} value:300], -[self createParam:@contextHeight extractor:^(CGFloat value){self.contextHeight = value;} value:300], -[self createParam:@tilePosX extractor:^(CGFloat value){self.tilePosX = value;} value:0], -[self createParam:@tilePosY extractor:^(CGFloat value){self.tilePosY = value;} value:0], -[self createParam:@tileWidth extractor:^(CGFloat value){self.tileWidth = value;} value:300], -[self createParam:@tileHeight extractor:^(CGFloat value){self.tileHeight = value;} value:300] +self.params = @[[self createParam:@contextWidth extractor:^(CGFloat value){self.contextWidth = value;} value:600], +[self createParam:@contextHeight extractor:^(CGFloat value){self.contextHeight = value;} value:600], +[self createParam:@tilePosX extractor:^(CGFloat value){self.tilePosX = value;} value:600], +[self createParam:@tilePosY extractor:^(CGFloat value){self.tilePosY = value;} value:600], +[self createParam:@tileWidth extractor:^(CGFloat value){self.tileWidth = value;} value:1000], +[self createParam:@tileHeight extractor:^(CGFloat value){self.tileHeight = value;} value:1000] ]; } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index fdf7577..d64e1fa 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1792,15 +1792,15 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int MapMode aMapMode(aDevice.GetMapMode()); aMapMode.SetMapUnit(MAP_TWIP); aMapMode.SetOrigin(Point(-tilePosX, -tilePosY)); -// scaling -Fraction scaleX(contextWidth,tileWidth); -Fraction scaleY(contextHeight,tileHeight); +// scaling +Fraction scaleX(tileWidth,contextWidth); +Fraction scaleY(tileHeight,contextHeight); aMapMode.SetScaleX(scaleX); aMapMode.SetScaleY(scaleY); aDevice.SetMapMode(aMapMode); // resizes the virtual device so to contain the entrie context aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); -// draw +// draw - works in logic coordinates pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight))); // copy the aDevice content to mpImage Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - sw/qa
sw/qa/tiledrendering/tiledrendering.cxx |7 +-- sw/qa/tiledrendering/tiledrendering.ui |2 +- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 9fd0abe9abfe37cb1591e1db794e0c921d95b172 Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 23 11:55:16 2013 +0200 added links to the image in tiled rendering Change-Id: Ic9d972fd67123e3ab04f023806f7f96c89a883a7 diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx index bfd20c3..6af94ec 100644 --- a/sw/qa/tiledrendering/tiledrendering.cxx +++ b/sw/qa/tiledrendering/tiledrendering.cxx @@ -21,37 +21,68 @@ #include vcl/vclmain.hxx #include vcl/field.hxx #include vcl/button.hxx +#include vcl/fixed.hxx +#include sfx2/filedlghelper.hxx +#include com/sun/star/ui/dialogs/TemplateDescription.hpp +#include com/sun/star/ui/dialogs/XFilePicker.hpp +#include com/sun/star/uno/XInterface.hpp +#include com/sun/star/frame/XComponentLoader.hpp +#include com/sun/star/frame/Desktop.hpp +#include com/sun/star/lang/XComponent.hpp +#include com/sun/star/beans/XPropertySet.hpp + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::ui::dialogs; +using namespace ::sfx2; -class UIPreviewApp : public Application +class TiledRenderingApp : public Application { +private: +uno::Referenceuno::XComponentContext xContext; +uno::Referencelang::XMultiComponentFactory xFactory; +uno::Referencelang::XMultiServiceFactory xSFactory; +uno::Referenceuno::XInterface xDesktop; +uno::Referenceframe::XComponentLoader xLoader; +uno::Referencelang::XComponent xComponent; public: virtual void Init(); virtual int Main(); +void Open(OUString aFileUrl); }; -using namespace com::sun::star; class TiledRenderingDialog: public ModalDialog{ +private: +TiledRenderingApp * app; public: -TiledRenderingDialog() : ModalDialog(DIALOG_NO_PARENT, TiledRendering, qa/sw/ui/tiledrendering.ui) +TiledRenderingDialog(TiledRenderingApp * app) : +ModalDialog(DIALOG_NO_PARENT, TiledRendering, qa/sw/ui/tiledrendering.ui), +app(app) { PushButton * renderButton; get(renderButton,buttonRenderTile); renderButton-SetClickHdl( LINK( this, TiledRenderingDialog, RenderHdl)); + +PushButton * chooseDocumentButton; +get(chooseDocumentButton,buttonChooseDocument); +chooseDocumentButton-SetClickHdl( LINK( this, TiledRenderingDialog, ChooseDocumentHdl)); + SetStyle(GetStyle()|WB_CLOSEABLE); } + virtual ~TiledRenderingDialog() { } DECL_LINK ( RenderHdl, Button * ); +DECL_LINK ( ChooseDocumentHdl, Button * ); -sal_Int32 extractInt(const char * name) +sal_Int32 ExtractInt(const char * name) { NumericField * pField; get(pField,name); OUString aString(pField-GetText()); -std::cerr param name returned aString /n; return aString.toInt32(); } @@ -59,67 +90,79 @@ public: IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG ) { -extractInt(spinContextWidth); -extractInt(spinContextHeight); -extractInt(spinTilePosX); -extractInt(spinTilePosY); -extractInt(spinTileWidth); -extractInt(spinTileHeight); +ExtractInt(spinContextWidth); +ExtractInt(spinContextHeight); +ExtractInt(spinTilePosX); +ExtractInt(spinTilePosY); +ExtractInt(spinTileWidth); +ExtractInt(spinTileHeight); +FixedImage * pImage; +get(pImage,imageTile); +return 1; +} + +IMPL_LINK ( TiledRenderingDialog, ChooseDocumentHdl, Button *, EMPTYARG ) +{ +FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 ); +uno::Reference XFilePicker xFP = aDlgHelper.GetFilePicker(); +if( aDlgHelper.Execute() == ERRCODE_NONE ) +{ +OUString aFileUrl =xFP-getFiles().getConstArray()[0]; +app-Open(aFileUrl); +} return 1; } -void UIPreviewApp::Init() +void TiledRenderingApp::Open(OUString aFileUrl){ +static const OUString TARGET(_default); +static const Sequencebeans::PropertyValue PROPS (0); +if(xComponent.get()) +{ +xComponent-dispose(); +xComponent.clear(); +} +xComponent.set(xLoader-loadComponentFromURL(aFileUrl,TARGET,0,PROPS)); +} + +void TiledRenderingApp::Init() { -uno::Referenceuno::XComponentContext xContext = -cppu::defaultBootstrap_InitialComponentContext(); -uno::Referencelang::XMultiComponentFactory xFactory = -xContext-getServiceManager(); -uno::Referencelang::XMultiServiceFactory xSFactory = -uno::Referencelang::XMultiServiceFactory (xFactory, uno::UNO_QUERY_THROW); +xContext.set(cppu::defaultBootstrap_InitialComponentContext()); +xFactory.set(xContext-getServiceManager()); +xSFactory.set(uno::Referencelang::XMultiServiceFactory (xFactory, uno::UNO_QUERY_THROW)); comphelper
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - include/touch ios/shared sw/source vcl/ios
include/touch/touch.h |2 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m |1 sw/source/core/view/viewsh.cxx | 26 ++- vcl/ios/iosinst.cxx | 36 +- 4 files changed, 60 insertions(+), 5 deletions(-) New commits: commit ef0d8a50f5d65ebcdc77af0749cfeaf74235f01c Author: Ptyl Dragon p...@cloudon.com Date: Thu Oct 24 11:28:42 2013 +0200 now showing blank tile Change-Id: I76cbf205e1983bea1ebae28f5172b2fbc250 diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m index bcc2191..5dc9db1 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m @@ -30,6 +30,7 @@ -(void)initScrollView{ self.scrollView = [UIScrollView new]; +self.scrollView.backgroundColor = [UIColor grayColor]; self.view = self.scrollView; } -(void)resize{ diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index bb50ea5..4cdb37d 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -55,7 +55,9 @@ #include ndole.hxx #include ndindex.hxx #include accmap.hxx +#include vcl/bitmapex.hxx #include svtools/colorcfg.hxx +#include vcl/bmpacc.hxx #include svtools/accessibilityoptions.hxx #include accessibilityoptions.hxx #include statstr.hrc @@ -64,6 +66,7 @@ #include sortedobjs.hxx #include anchoredobject.hxx #include wrtsh.hxx +#include vcl/alpha.hxx #include ../../ui/inc/view.hxx #include PostItMgr.hxx @@ -1790,7 +1793,16 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); pViewShell-PaintTile(aDevice, Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); -//TODO now get it to the 'context' +BitmapEx aBitmapEx(aDevice.GetBitmapEx(Point(0,0), aDevice.GetOutputSizePixel())); +Bitmap aBitmap = aBitmapEx.GetBitmap(); +BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); +touch_lo_copy_buffer((void *) readAccess-GetBuffer(), + tileWidth, + tileHeight, + readAccess- GetScanlineSize(), + context, + contextWidth, + contextHeight); } } commit 7569a946c8b9fb9bd814e4aff9f170cd92a8c30b Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 23 18:35:40 2013 +0200 refactored to allow copying FixedImage to ios Change-Id: Icecdae8ea2bb68c228f038758af8fb688ce9dd4a diff --git a/include/touch/touch.h b/include/touch/touch.h index 7dddaf3..979a8de 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -110,7 +110,7 @@ tilePosX, tilePosY, tileWidth, tileHeight address the part of the document to be context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); - +void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index a1a441e..bb50ea5 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -17,6 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifdef IOS + +#include touch/touch.h + +#endif + #include com/sun/star/accessibility/XAccessible.hpp #include sfx2/viewfrm.hxx #include sfx2/progress.hxx @@ -66,6 +72,8 @@ #include vcl/svapp.hxx #include svx/sdrpaintwindow.hxx + + sal_Bool ViewShell::mbLstAct = sal_False; ShellResource *ViewShell::mpShellRes = 0; Window *ViewShell::mpCareWindow = 0; @@ -1761,7 +1769,7 @@ void ViewShell::PaintTile(OutputDevice *pOut, const Rectangle rRect) #if !HAVE_FEATURE_DESKTOP extern C -void touch_lo_draw_tile(void * /*context*/, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight) +void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight) { // Currently we
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared sw/source
ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m |8 +++ sw/source/core/view/viewsh.cxx | 11 -- 2 files changed, 9 insertions(+), 10 deletions(-) New commits: commit 8ff597b589f49a27ee75b7a8bd7301a90e7b4770 Author: Ptyl Dragon p...@cloudon.com Date: Thu Oct 24 16:48:28 2013 +0200 now iOS draws something (upside down) Change-Id: Ibf04322d34605fce30b2fa477de98a3e2ff9c2d1 diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m index 2381df9..be2e144 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m @@ -39,12 +39,12 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f; } -(void)initParams{ -self.params = @[[self createParam:@contextWidth extractor:^(CGFloat value){self.contextWidth = value;} value:100], -[self createParam:@contextHeight extractor:^(CGFloat value){self.contextHeight = value;} value:100], +self.params = @[[self createParam:@contextWidth extractor:^(CGFloat value){self.contextWidth = value;} value:300], +[self createParam:@contextHeight extractor:^(CGFloat value){self.contextHeight = value;} value:300], [self createParam:@tilePosX extractor:^(CGFloat value){self.tilePosX = value;} value:0], [self createParam:@tilePosY extractor:^(CGFloat value){self.tilePosY = value;} value:0], -[self createParam:@tileWidth extractor:^(CGFloat value){self.tileWidth = value;} value:100], -[self createParam:@tileHeight extractor:^(CGFloat value){self.tileHeight = value;} value:100] +[self createParam:@tileWidth extractor:^(CGFloat value){self.tileWidth = value;} value:300], +[self createParam:@tileHeight extractor:^(CGFloat value){self.tileHeight = value;} value:300] ]; } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index af6b8af..3a978d4 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -58,6 +58,7 @@ #include vcl/bitmapex.hxx #include svtools/colorcfg.hxx #include vcl/bmpacc.hxx +#include vcl/alpha.hxx #include svtools/accessibilityoptions.hxx #include accessibilityoptions.hxx #include statstr.hrc @@ -1790,12 +1791,10 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int // SystemGraphicsData aData; // [setup the aData] // VirtualDevice aDevice(aData, [color depth]); -VirtualDevice aDevice; -aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); - -pViewShell-PaintTile(aDevice, Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); -BitmapEx aBitmapEx(aDevice.GetBitmapEx(Point(0,0), aDevice.GetOutputSizePixel())); -Bitmap aBitmap = aBitmapEx.GetBitmap(); +//VirtualDevice aDevice; +//aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); +pViewShell-PaintTile(pViewShell-GetOut(), Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); +Bitmap aBitmap(pViewShell-GetOut()-GetBitmap(Point(0,0), pViewShell-GetOut()-PixelToLogic(Size(contextWidth, contextHeight; BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); touch_lo_copy_buffer((void *) readAccess-GetBuffer(), tileWidth, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 4 commits - sw/Executable_tiledrendering.mk sw/qa
sw/Executable_tiledrendering.mk |1 sw/qa/tiledrendering/tiledrendering.cxx | 156 ++-- sw/qa/tiledrendering/tiledrendering.ui | 12 +- 3 files changed, 116 insertions(+), 53 deletions(-) New commits: commit ea2738ec4571530ef2e40f1c9862a358df3dd08c Author: Ptyl Dragon p...@cloudon.com Date: Wed Oct 23 11:08:26 2013 +0200 tiledrendering opens files Change-Id: Ifbf5a3aad016e1c90c4c331b2f72b44203717f90 diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx index a6205a6..9991bbe 100644 --- a/sw/qa/tiledrendering/tiledrendering.cxx +++ b/sw/qa/tiledrendering/tiledrendering.cxx @@ -24,23 +24,40 @@ #include sfx2/filedlghelper.hxx #include com/sun/star/ui/dialogs/TemplateDescription.hpp #include com/sun/star/ui/dialogs/XFilePicker.hpp -#include sfx2/filedlghelper.hxx +#include com/sun/star/uno/XInterface.hpp +#include com/sun/star/frame/XComponentLoader.hpp +#include com/sun/star/frame/Desktop.hpp +#include com/sun/star/lang/XComponent.hpp +#include com/sun/star/beans/XPropertySet.hpp + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::ui::dialogs; +using namespace ::sfx2; -class UIPreviewApp : public Application +class TiledRenderingApp : public Application { +private: +uno::Referenceuno::XComponentContext xContext; +uno::Referencelang::XMultiComponentFactory xFactory; +uno::Referencelang::XMultiServiceFactory xSFactory; +uno::Referenceuno::XInterface xDesktop; +uno::Referenceframe::XComponentLoader xLoader; +uno::Referencelang::XComponent xComponent; public: virtual void Init(); virtual int Main(); +void Open(OUString aFileUrl); }; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ui::dialogs; -using namespace ::sfx2; class TiledRenderingDialog: public ModalDialog{ +private: +TiledRenderingApp * app; public: -TiledRenderingDialog() : ModalDialog(DIALOG_NO_PARENT, TiledRendering, qa/sw/ui/tiledrendering.ui) +TiledRenderingDialog(TiledRenderingApp * app) : +ModalDialog(DIALOG_NO_PARENT, TiledRendering, qa/sw/ui/tiledrendering.ui), +app(app) { PushButton * renderButton; get(renderButton,buttonRenderTile); @@ -52,6 +69,7 @@ public: SetStyle(GetStyle()|WB_CLOSEABLE); } + virtual ~TiledRenderingDialog() { } @@ -59,12 +77,11 @@ public: DECL_LINK ( RenderHdl, Button * ); DECL_LINK ( ChooseDocumentHdl, Button * ); -sal_Int32 extractInt(const char * name) +sal_Int32 ExtractInt(const char * name) { NumericField * pField; get(pField,name); OUString aString(pField-GetText()); -std::cerr param name returned aString \n; return aString.toInt32(); } @@ -72,12 +89,12 @@ public: IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG ) { -extractInt(spinContextWidth); -extractInt(spinContextHeight); -extractInt(spinTilePosX); -extractInt(spinTilePosY); -extractInt(spinTileWidth); -extractInt(spinTileHeight); +ExtractInt(spinContextWidth); +ExtractInt(spinContextHeight); +ExtractInt(spinTilePosX); +ExtractInt(spinTilePosY); +ExtractInt(spinTileWidth); +ExtractInt(spinTileHeight); return 1; } @@ -87,64 +104,62 @@ IMPL_LINK ( TiledRenderingDialog, ChooseDocumentHdl, Button *, EMPTYARG ) uno::Reference XFilePicker xFP = aDlgHelper.GetFilePicker(); if( aDlgHelper.Execute() == ERRCODE_NONE ) { -OUString aFilePath =xFP-getFiles().getConstArray()[0]; -std::cerr aFilePath \n; +OUString aFileUrl =xFP-getFiles().getConstArray()[0]; +app-Open(aFileUrl); } return 1; } -void UIPreviewApp::Init() +void TiledRenderingApp::Open(OUString aFileUrl){ +static const OUString TARGET(_default); +static const Sequencebeans::PropertyValue PROPS (0); +if(xComponent.get()) +{ +xComponent-dispose(); +xComponent.clear(); +} +xComponent.set(xLoader-loadComponentFromURL(aFileUrl,TARGET,0,PROPS)); +} + +void TiledRenderingApp::Init() { -uno::Referenceuno::XComponentContext xContext = -cppu::defaultBootstrap_InitialComponentContext(); -uno::Referencelang::XMultiComponentFactory xFactory = -xContext-getServiceManager(); -uno::Referencelang::XMultiServiceFactory xSFactory = -uno::Referencelang::XMultiServiceFactory (xFactory, uno::UNO_QUERY_THROW); +xContext.set(cppu::defaultBootstrap_InitialComponentContext()); +xFactory.set(xContext-getServiceManager()); +xSFactory.set(uno::Referencelang::XMultiServiceFactory (xFactory, uno::UNO_QUERY_THROW)); comphelper::setProcessServiceFactory(xSFactory); // Create UCB (for backwards compatibility, in case some code still uses // plain createInstance
[Libreoffice-commits] core.git: ios/shared
ios/shared/ios_sharedlo/cxx/mlo_uno.mm |1 + 1 file changed, 1 insertion(+) New commits: commit 6dd844917205a051c880ff7609c28e09698770c8 Author: Ptyl Dragon p...@cloudon.com Date: Sun Oct 20 12:10:18 2013 +0200 fix save several file on by reseting the xstorable on close Change-Id: I329d43e06b0c81cebda0464ebb0fff41714020a3 Reviewed-on: https://gerrit.libreoffice.org/6355 Reviewed-by: Tor Lillqvist t...@collabora.com Tested-by: Tor Lillqvist t...@collabora.com diff --git a/ios/shared/ios_sharedlo/cxx/mlo_uno.mm b/ios/shared/ios_sharedlo/cxx/mlo_uno.mm index 20c079b..49a4fac 100644 --- a/ios/shared/ios_sharedlo/cxx/mlo_uno.mm +++ b/ios/shared/ios_sharedlo/cxx/mlo_uno.mm @@ -365,6 +365,7 @@ mlo_close(void){ openedXSelectionSupplier.clear(); openedXFrame.clear(); openedXDispatchProvider.clear(); +openedXStorable.clear(); resetLastSearch(); NSLog(@XComponent disposed successfully); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: ios/shared
ios/shared/ios_sharedlo/cxx/mlo_uno.h |1 ios/shared/ios_sharedlo/cxx/mlo_uno.mm | 25 ++ ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.h |2 ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m | 19 ++- ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m |3 - ios/shared/ios_sharedlo/objective_c/view_controllers/toolbar/MLOToolbarViewController.m | 11 ++-- 6 files changed, 53 insertions(+), 8 deletions(-) New commits: commit 1034a2eb97a291846ff0d9b67677946ecab7df87 Author: Ptyl Dragon p...@cloudon.com Date: Sat Oct 19 12:51:02 2013 +0200 added save to ios app and removed keyboard on open Change-Id: Ibfa9373cc82d7e2022190e158f94eb323a57f241 Reviewed-on: https://gerrit.libreoffice.org/6351 Reviewed-by: Tor Lillqvist t...@collabora.com Tested-by: Tor Lillqvist t...@collabora.com diff --git a/ios/shared/ios_sharedlo/cxx/mlo_uno.h b/ios/shared/ios_sharedlo/cxx/mlo_uno.h index d9ec63b..df53190 100644 --- a/ios/shared/ios_sharedlo/cxx/mlo_uno.h +++ b/ios/shared/ios_sharedlo/cxx/mlo_uno.h @@ -23,6 +23,7 @@ extern C { void mlo_get_selection(NSMutableString * mutableString); void mlo_fetch_view_data(NSMutableString * mutableString); void mlo_select_all(void); +void mlo_save(void); #ifdef __cplusplus } diff --git a/ios/shared/ios_sharedlo/cxx/mlo_uno.mm b/ios/shared/ios_sharedlo/cxx/mlo_uno.mm index ff92821..20c079b 100644 --- a/ios/shared/ios_sharedlo/cxx/mlo_uno.mm +++ b/ios/shared/ios_sharedlo/cxx/mlo_uno.mm @@ -26,6 +26,7 @@ #include com/sun/star/frame/XDispatchHelper.hpp #include com/sun/star/frame/DispatchHelper.hpp #include com/sun/star/frame/XComponentLoader.hpp +#include com/sun/star/frame/XStorable.hpp #include com/sun/star/awt/XScrollBar.hpp #include com/sun/star/container/XContentEnumerationAccess.hpp #include com/sun/star/frame/Desktop.hpp @@ -83,6 +84,7 @@ ReferenceXSearchable openedXSearchable; ReferenceXSelectionSupplier openedXSelectionSupplier; ReferenceXFrame openedXFrame; ReferenceXDispatchProvider openedXDispatchProvider; +ReferenceXStorable openedXStorable; ReferenceXIndexAccess currentFindAll; rtl::OUString lastSearch; @@ -229,6 +231,15 @@ ReferenceXDispatchHelper getXDispatchHelper(){ return helper; } +ReferenceXStorable getXStorable(){ +if(!openedXStorable.get()){ +ReferenceXStorable stroable(getXModel(),UNO_QUERY); +openedXStorable.set(stroable); +LOG_EVAL(openedXStorable, @XDispatchProvider); +} +return openedXStorable; +} + NSString * createFileUri(NSString * file){ if(file==nil){ NSString * app_root_escaped = [[[NSBundle mainBundle] bundlePath] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; @@ -477,4 +488,18 @@ mlo_select_all(void){ OUString(_self), 0, SequencePropertyValue ()); +} + +extern C +void +mlo_save(void){ +if(mlo_is_document_open()){ +ReferenceXStorable storable =getXStorable(); +if(storable-isReadonly()){ +NSLog(@Cannot save changes. File is read only); +}else{ +storable-store(); +NSLog(@saved changes); +} +} } \ No newline at end of file diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.h b/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.h index c30fda0..6649ce0 100644 --- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.h +++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.h @@ -15,4 +15,6 @@ -(void)addToMainViewController; -(void)show; -(void)hide; +-(void)showLibreOffice; +-(void)hideLibreOffice; @end diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m index f7d483f..fde1d82 100644 --- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m +++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOKeyboardManager.m @@ -15,6 +15,7 @@ @interface MLOKeyboardManager () @property MLOMainViewController * mainViewController; @property UITextView * textView; +@property BOOL allowLoToinvokdeKeyboard; @property BOOL isShown; @end @@ -40,6 +41,13 @@ -(void)addToMainViewController{ [self.mainViewController.canvas addSubview:self.textView]; } +-(void)hideLibreOffice{ +self.allowLoToinvokdeKeyboard =NO; +[self hide]; +} +-(void)showLibreOffice{ +self.allowLoToinvokdeKeyboard =NO; +} -(void)initTextView{ self.textView = [[UITextView alloc] initWithFrame:CGRECT_ONE]; self.textView.alpha = 0.0f; @@ -77,6 +85,13 @@ return NO; } +-(void)loInvokeKeyboard
[Libreoffice-commits] core.git: ios/MobileLibreOffice ios/shared
ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj |5 ios/shared/ios_sharedlo.xcodeproj/project.pbxproj | 17 + ios/shared/ios_sharedlo/objective_c/view_controllers/MLOMainViewController.m |1 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.h | 20 ++ ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m | 88 ++ ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleFactory.m |2 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleLoApp.m |4 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.h |4 ios/shared/ios_sharedlo/objective_c/view_controllers/role/MLOAppRoleTileTester.m | 32 ++- ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.h | 14 + ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m | 64 +++ ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h |2 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m | 76 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.h |2 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileRendererViewController.m | 29 ++- ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileSubviewControllerProtocol.h |2 16 files changed, 342 insertions(+), 20 deletions(-) New commits: commit 4219195dec664aa03395a52168fad356840e5402 Author: Ptyl Dragon p...@cloudon.com Date: Fri Oct 18 18:14:03 2013 +0200 ios tile testing app done Change-Id: I1c4a45c3f19d79b4da8cc96304e0e1802f92dff2 Reviewed-on: https://gerrit.libreoffice.org/6320 Reviewed-by: Tor Lillqvist t...@collabora.com Tested-by: Tor Lillqvist t...@collabora.com diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj index c1277b5..eebf831 100644 --- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj +++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj @@ -1542,6 +1542,7 @@ ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ; SDKROOT = iphoneos; + STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = 1,2; VALID_ARCHS = armv7; }; @@ -1582,6 +1583,7 @@ OTHER_CFLAGS = -DNS_BLOCK_ASSERTIONS=1; OTHER_LDFLAGS = ; SDKROOT = iphoneos; + STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = 1,2; VALIDATE_PRODUCT = YES; VALID_ARCHS = armv7; @@ -1591,6 +1593,7 @@ 689EBB0E18069FB8002F1CD7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEBUG_INFORMATION_FORMAT = dwarf; GCC_DYNAMIC_NO_PIC = NO; GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1669,6 +1672,7 @@ ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ; SDKROOT = iphoneos; + STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = 1,2; VALID_ARCHS = armv7; }; @@ -1677,6 +1681,7 @@ 88A13310181023A40091F25E /* Debug_tile_tester */ = { isa = XCBuildConfiguration; buildSettings = { + DEBUG_INFORMATION_FORMAT = dwarf; GCC_DYNAMIC_NO_PIC = NO; GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj index c2f093f..4a95af1 100644 --- a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
Re: matching VCL to touch screen coordinates
i just checked the zoom flow using debug. The zoom action goes through the ViewOptions class http://opengrok.libreoffice.org/xref/core/sw/inc/viewopt.hxx#163 it appears zoom is stored in nZoom, which is a sal_uInt16http://opengrok.libreoffice.org/s?defs=sal_uInt16project=core representing percentage. So according to what you say, threre should be a different accessible object or struct that holds the zoom with finer precision. If so, then what object or class holds the absolute source of truth for data regarding VCL elements? On Mon, Aug 12, 2013 at 11:34 PM, Thorsten Behrens t...@documentfoundation.org wrote: Ptyl Dragon wrote: We cannot express the difference between 1023 and 1024, in units of 1%, as 1% of 1024 is 10.24. So the scale is not sufficient, and even if we fixed it for iPad, tomorrow there might be a touch device with twice the resolution. Hi Ptyl, yes, sure. But vcl itself uses integer fractions to express scaling (check the MapMode class there), as such it should be able to convey the necessary information. Thus the question for code to look at - I seem to miss the point. ;) Cheers, -- Thorsten -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: matching VCL to touch screen coordinates
that is very interesting. What alternate methods are there to do the scroll, other than calling DoScroll on the scrollbar? is there a deeper level element in writer that the scrollbar mutates to cause the document to scroll, and which we could mutate directly (the same may apply to zoom as well) My assumption so far was that to do this i must use the scrollbars, as they distriubute the scrolling messages to the various vcl elements. can you give me code references to the place where i can hack into, so to skip over the scrollbars? i mean, this could tightly solve this issue once and for all On Wed, Aug 14, 2013 at 6:07 PM, Thorsten Behrens t...@documentfoundation.org wrote: Ptyl Dragon wrote: So according to what you say, threre should be a different accessible object or struct that holds the zoom with finer precision. Nah, what I say is, that this has nothing to do with vcl limitations. :) I'd go backwards from the Writer view MapMode setup, to find a suitable place to set your desired high-res scroll value. After all, the scrollbar is just one of several ways to reach a certain point in the document. Cheers, -- Thorsten -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: matching VCL to touch screen coordinates
Still, this is relevant mainly to zoom (the 2 nd part of my question) What about the scroll? What determines its granularity, and what would be the best way to increase its precision, from the current approx 4 - 8 pixels click, to a 1 pixel click? To clarify, currently, the scroller gets scroll commands on the pixel level, but it won't cause VCL to redraw, until approx 4 - 8 screen pixels have been crossed. What could be causing this scaling in rendering coordinates? Thanks again Ptyl On Monday, August 12, 2013, Ptyl Dragon wrote: Ah, integer fractions - i thought it meant percents, but it means a representation of rational numbers, through the use of two integers. Ok. This info may indeed solve this. Thanks! On Monday, August 12, 2013, Thorsten Behrens wrote: Ptyl Dragon wrote: We cannot express the difference between 1023 and 1024, in units of 1%, as 1% of 1024 is 10.24. So the scale is not sufficient, and even if we fixed it for iPad, tomorrow there might be a touch device with twice the resolution. Hi Ptyl, yes, sure. But vcl itself uses integer fractions to express scaling (check the MapMode class there), as such it should be able to convey the necessary information. Thus the question for code to look at - I seem to miss the point. ;) Cheers, -- Thorsten -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: matching VCL to touch screen coordinates
we're calling the scrollbar's DoScroll methods. ScrollBar* pScrl; pScrl-DoScroll( nNewPos ); On Tue, Aug 13, 2013 at 11:46 AM, Thorsten Behrens t...@documentfoundation.org wrote: Ptyl Dragon wrote: Still, this is relevant mainly to zoom (the 2 nd part of my question) What about the scroll? What determines its granularity, and what would be the best way to increase its precision, from the current approx 4 - 8 pixels click, to a 1 pixel click? Does that come from the scrollbar, or are you calling Writer methods directly? Again, being able to look at code would make this easier. ;) Cheers, -- Thorsten -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
matching VCL to touch screen coordinates
Hi, We are working on an iOS mobile LibreOffice app. We got the pan and zoom to follow the pinch and pan gestures, in screen coordinates, to which we will submit fixes to the lo core - once we solve this last piece of the puzzle. Apologies for the delay on this. It is mainly due to logistic issues on our part. :-| Well, anyway It appears, the granularity, or resolution, by which VCL elements are rendered (such as text for example) is somewhat scaled down from the screen resolution. for example, when scrolling, the scrolling appear jerky, as elements jump approx 5 - 10 pixels at a time. I have checked to see if perhaps the scroll command itself is limiting the resolution, but that is not the case: first, the scrolling is equally jerky regardless of the zoom level, so it cannot be dependent on the total length of the document or something like that, and also, when the scroll command was given a delta of 1 pixel, i saw it was transformed to 18 scroll-bar ticks. In short, it appears, the VCL rendering is the root cause for this jerking, and i wanted to know if you may have a clue why this is so, and how can we fix it - so to have the smooth scrolling associated with touch devices. additionally, we are trying to get the zoom to be continuous, so to follow a pinch gesture as native touch devices do. currently, i believe zooming is done in integers, representing percentages. we need to get it to work with float or double values, so to allow the continuous zooming behavior, common to touch devices, and we would very much appreciate any help on this: is this even possible, in terms of - can VCL objects such as text or images, scale to any size we wish, and if so, what would be the easiest way to do this. Also, if this in some way clashes with required behavior of the desktop version of libre office, we should know, so to add ifndef statements as required, to allow dual behavior - one for touch - one for desktop - if necessary. also, if there is something we need to know and we did not ask, please tell us (as we are sure there are) thank you very much in advance ptyl ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: matching VCL to touch screen coordinates
Thanks. We may implement this approach, or let the IOS scrollview handle this under the hood. We will know exactly after considering the options. Still, this does not solve the issue of precise scaling. We need to be able to scale the zoom, to any screen value, as that is standard touch behaviour. if not we will have to always scale the picture, either up or down. if we scale up, we will get bulky graphics. if we scale down, we will need to render a canvas larger than that we will show, which will result with both scaled (rather than sharp) graphics, and lesser performance (as the bigger the canvas, the bigger the rendering cost). The only way to solve this, is to be able to give scaling instructions, with a double/float granularity, rather than integer / long - or - multiply the zoom factor by say, a 1000, allowing us finer precision over the zoom. The only question is how to do it, and with the least risk to damage other components, relying on the zoom mechanisms. btw, this is why i prefer double/float over multiplying zoom by say, a 1000, as within the scale of a reasonable zoom (1% to 1000%), the conversion from floating point to integer is non reductive and automatic - meaning whoever is relying on the zoom to be as is, will be able to continue working, via a simple cast, which possibly will be added automatically by the compiler. ptyl On Mon, Aug 12, 2013 at 2:01 PM, Noel Grandin n...@peralex.com wrote: On 2013-08-11 19:47, Ptyl Dragon wrote: additionally, we are trying to get the zoom to be continuous, so to follow a pinch gesture as native touch devices do. currently, i believe zooming is done in integers, representing percentages. we need to get it to work with float or double values, so to allow the Zooming on mobile devices is tricky. To make it smooth, you will need to implement a mobile-specific strategy. Typically, the way that zooming on mobile devices works is this - when zooming, the UI enters a special ZOOMING state - when zooming in, the zoom code asks the underlying code to render a bitmap target about twice the size of the current screen. Then it uses the mobile device graphics framework, typically the on-board GPU , to rescale as need be. - it typically does the rendering to bitmap from outside the main thread - only when the zooming is over, does the zooming code tell the UI to resize properly to the new target size This is why when zooming in or out slowly everything looks fine. But when you zoom quickly, you sometimes see jagged lines for a while. This is because the background did not have enough time to render a new target bitmap, so the zooming code is stuck with rescaling the old bitmap. HTH, Noel. Disclaimer: http://www.peralex.com/**disclaimer.htmlhttp://www.peralex.com/disclaimer.html -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: matching VCL to touch screen coordinates
Hi We will submit the patches. We just need to tidy them up a bit. About the resolution An iPad has a resolution of 1024 x 768 If we wanted to do a smooth scale, we should be able to zoom in to 1023 x 767.9... We cannot express the difference between 1023 and 1024, in units of 1%, as 1% of 1024 is 10.24. So the scale is not sufficient, and even if we fixed it for iPad, tomorrow there might be a touch device with twice the resolution. Still, a floating point value can give us the granularity we require On Monday, August 12, 2013, Thorsten Behrens wrote: Ptyl Dragon wrote: It appears, the granularity, or resolution, by which VCL elements are rendered (such as text for example) is somewhat scaled down from the screen resolution. for example, when scrolling, the scrolling appear jerky, as elements jump approx 5 - 10 pixels at a time. Hi Ptyl, hmm - might help to see your patches to get a better idea of the problem. VCL rendering is integer-fraction based, but the resolution of that should be more than sufficient for a page of text... Cheers, -- Thorsten -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: matching VCL to touch screen coordinates
Ah, integer fractions - i thought it meant percents, but it means a representation of rational numbers, through the use of two integers. Ok. This info may indeed solve this. Thanks! On Monday, August 12, 2013, Thorsten Behrens wrote: Ptyl Dragon wrote: We cannot express the difference between 1023 and 1024, in units of 1%, as 1% of 1024 is 10.24. So the scale is not sufficient, and even if we fixed it for iPad, tomorrow there might be a touch device with twice the resolution. Hi Ptyl, yes, sure. But vcl itself uses integer fractions to express scaling (check the MapMode class there), as such it should be able to convey the necessary information. Thus the question for code to look at - I seem to miss the point. ;) Cheers, -- Thorsten -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: ios/experimental
ios/experimental/LibreOffice/LibreOffice/lo.mm | 36 ++--- 1 file changed, 33 insertions(+), 3 deletions(-) New commits: commit 70e247733e762ed7b20645c8c843e78294b38f0f Author: Ptyl Dragon p...@cloudon.com Date: Tue Jul 9 13:20:00 2013 +0300 Add more components Change-Id: I30daf067fe9a1804a55be75c040db49dfbb18d92 diff --git a/ios/experimental/LibreOffice/LibreOffice/lo.mm b/ios/experimental/LibreOffice/LibreOffice/lo.mm index 53c9921..167948c 100644 --- a/ios/experimental/LibreOffice/LibreOffice/lo.mm +++ b/ios/experimental/LibreOffice/LibreOffice/lo.mm @@ -19,11 +19,18 @@ extern C { extern void * analysis_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * animcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * avmedia_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); -extern void * dba_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * chartcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * cui_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * date_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * dba_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * dbaxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * embobj_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * emboleobj_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * evtatt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * expwrap_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * fastsax_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * fileacc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * filterconfig1_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * frm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * fsstorage_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * fwk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); @@ -42,17 +49,25 @@ extern C { extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * sot_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * spell_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * spl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * svt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * svx_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * svxcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * swd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); -extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * tk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); +extern void * ucppkg1_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey ); extern void
Re: How to know the current viewed page and line in writer
thanks! still, this gives the page of the cursor, not the page of the viewer, which when scrolling, can be different from what i could see XViewDataSupplier does not have this data we want this data to implement a location indicator similar to that on iOS browsers, on the iOS app, using iOS UI controls. Is it possible to extract this data from the libreoffice VCL scrollbar elements using UNO, instead of calculating it ourselves? On Wed, Jul 17, 2013 at 10:18 AM, Miklos Vajna vmik...@suse.cz wrote: Hi, On Tue, Jul 16, 2013 at 07:59:43PM +0300, Ptyl Dragon p...@cloudon.com wrote: 1. Which line the writer GUI is currently showing (which may be different from the line the caret / cursor is on - such as when scrolling, for example) The GUI is typically showing an area of the document, which is more a rectangle than a given set of lines. You can use document::XViewDataSupplier to read/write that data: http://api.libreoffice.org/docs/common/ref/com/sun/star/document/XViewDataSupplier.html 2. How many lines there are in total, in the writer document Isn't that available as part of the document stats? Additionally, as a fallback, we would like to simply to know which page writer is showing, and how many pages there are in total. See http://opengrok.libreoffice.org/xref/core/sw/qa/extras/inc/swmodeltestbase.hxx#getPages on how to get the number of pages using UNO. Miklos -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to know the current viewed page and line in writer
Hi I looked into fdo#40465, but could not find any code snippets or something similar i could integrate in my code. Moreover, using XRays, i saw that getViewData returns the location and size of the window, with respect to the desktop, and not the relative location of the viewer, with respect to the document. The view data remains as is, no matter which portion of the document i view. Moreover, the ZoomFactor shows incorrect values, a fact which may be related with fro#40465. Still, it is a fact, LibreOffice knows which portions of the document to show. So what component holds this data, and is it reachable via UNO? If it is not reachable through UNO, what is the closest component which is reachable through UNO, so that we could extend its UNO support, so to provide us this data? On Mon, Jul 22, 2013 at 2:33 PM, Winfried Donkers w.donk...@dci-electronics.nl wrote: Hi Ptyl, ** ** Bug fdo#40465 may give you (some) information you seek. There appears to be a problem in correctly calculating/getting the page in the viewer. ** ** HTH, ** ** ** ** Winfried ** ** -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
How to know the current viewed page and line in writer
Hello We would like to implement a new GUI element (for mobile), so to show the current viewed location in writer. For this, we need to know: 1. Which line the writer GUI is currently showing (which may be different from the line the caret / cursor is on - such as when scrolling, for example) 2. How many lines there are in total, in the writer document What is the simplest way to get this information? is it available through UNO, and if not, how can we attain it? Additionally, as a fallback, we would like to simply to know which page writer is showing, and how many pages there are in total. What is the simplest way to get this data? If there are no already existing accessors for this information, can you please direct me to methods and files to hack into or modify to get this data? Thank you in advance Ptyl ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Configuring the iOS app to open DOCX files
Hi We are working on enhancing the support for mobile, and iOS in particular, basing our work on the experimental iOS app, and enhancing it, and we noticed that the iOS app fails to open docx files (we have overriden the test1.odt file with our own test1.docx file for this). when the app loads, the screen remains black. We compiled the app using the autogen settings ./autogen.sh --build=i386-apple-darwin10.7.0 --host=arm-apple-darwin10 (as you can see, we disabled debug) Testing and seeing that the Android app successfully opens docx file, we tried to include the external libraries the Android app includes, which exist in the iOS app (i.e some of theses libs do not exist after compiling for iOS). It did not help. Docx files failed to open as before. So, what are we doing wrong? What should we do to make the iOS app open docx files? Thank you very much in advance Ptyl Note: here are the libs includes we added from the Android app compilation: { libcuilo.a, cui_component_getFactory }, { libchartcorelo.a, chartcore_component_getFactory }, { libembobj.a, embobj_component_getFactory }, { libemboleobj.a, emboleobj_component_getFactory }, { libexpwraplo.a, expwrap_component_getFactory }, { libfastsaxlo.a, fastsax_component_getFactory }, { libfilterconfiglo.a, filterconfig1_component_getFactory }, { libsotlo.a, sot_component_getFactory }, { libsvxcorelo.a, svxcore_component_getFactory }, { libspllo.a, spl_component_getFactory }, { libtklo.a, tk_component_getFactory }, { libucppkg1.a, ucppkg1_component_getFactory }, { libwpftdrawlo.a, wpftdraw_component_getFactory }, { libwpftwriterlo.a, wpftwriter_component_getFactory }, { libwriterfilterlo.a, writerfilter_component_getFactory }, here are the libs included in Android app compilation, and missing from iOS compilation: { libbasprovlo.a, basprov_component_getFactory }, { libvbaswobjlo.a, vbaswobj_component_getFactory }, { libvbaeventslo.a, vbaevents_component_getFactory }, { libstringresourcelo.a, stringresource_component_getFactory }, { libprotocolhandlerlo.a, protocolhandler_component_getFactory }, { libsblo.a, sb_component_getFactory }, { libscriptframe.a, scriptframe_component_getFactory }, { libdlgprovlo.a, dlgprov_component_getFactory }, -- ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: How to remove the main menu?
thanks! that worked perfectly. :-) ptyl On Mon, Jul 8, 2013 at 10:43 AM, Miklos Vajna vmik...@suse.cz wrote: Hi, On Sun, Jul 07, 2013 at 03:10:24PM +0300, Ptyl Dragon p...@cloudon.com wrote: For the mobile iOS app, we would like to remove the writer main menu (the File / Edit / View / Tools ... menu), so to be left with a pure canvas. What would be the simplest way to do that? One simple way is to just comment out the createElement() call in SfxDispatcher::SetMenu_Impl(). (Possibly that's possible to do from some configuration option.) You still need to disable toolbars if you want to get only the document area, though. Miklos -- [image: appicon.png] *Ptyl Dragon* Twitter http://www.twitter.com/cloudoninc | LinkedInhttp://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc | Bloghttp://site.cloudon.com/blog ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice