[Libreoffice-commits] .: Branch 'integration/dev300_m101' - 7 commits - canvas/source cppcanvas/inc cppcanvas/source svl/inc svtools/inc svtools/Package_inc.mk vcl/inc vcl/source

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Sat Mar 12 17:04:00 PST 2011


 canvas/source/cairo/cairo_textlayout.cxx      |   16 ++++-----
 cppcanvas/inc/cppcanvas/renderer.hxx          |    2 -
 cppcanvas/source/inc/implrenderer.hxx         |    4 +-
 cppcanvas/source/mtfrenderer/emfplus.cxx      |   30 ++++++++--------
 cppcanvas/source/mtfrenderer/implrenderer.cxx |    4 +-
 svl/inc/svl/svstdarr.hxx                      |    1 
 svtools/Package_inc.mk                        |    2 +
 svtools/inc/svtools/svtools.hrc               |    4 +-
 vcl/inc/vcl/svapp.hxx                         |   46 ++++++++++++++++++++++++++
 vcl/source/window/syschild.cxx                |    6 +++
 10 files changed, 85 insertions(+), 30 deletions(-)

New commits:
commit f18dc2000b38045c85177f0fa794c44f10124cd6
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:55:55 2011 -0600

    mis-merge: we do not want Ooo new about box do we ?

diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index d99315e..0bae840 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -32,8 +32,8 @@
 #define RID_SVTOOLS_BITMAP_START		(RID_SVTOOLS_START + 0)
 #define RID_SVTOOLS_IMAGELIST_START		(RID_SVTOOLS_START + 0)
 
-#define ABOUT_STR_COPYRIGHT             (RID_SVTOOLS_START + 1)
-#define ABOUT_STR_DEVELOPER_ARY         (RID_SVTOOLS_START + 2)
+//#define ABOUT_STR_COPYRIGHT             (RID_SVTOOLS_START + 1)
+//#define ABOUT_STR_DEVELOPER_ARY         (RID_SVTOOLS_START + 2)
 
 //.............................................................................
 // various unsorted stuff
commit d7efc31e31bc8dcc2ffa413640e7822b304a4645
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:55:30 2011 -0600

    mis-merge: lost typedef

diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 49a0251..4344617 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -179,5 +179,6 @@ SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1,
 #define _SVSTDARR_BYTESTRINGSISORTDTOR_DECL
 #endif
 
+typedef std::deque< xub_StrLen > SvXub_StrLens;
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit b88427c4a43aa2d6ac3f580b5e845af768397b3d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:55:19 2011 -0600

    missing headers in Package_inc.mk

diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index 4162e8f..a2ab53c 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovide
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/apearcfg.hxx,svtools/apearcfg.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/asynclink.hxx,svtools/asynclink.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/borderhelper.hxx,svtools/borderhelper.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwbox.hxx,svtools/brwbox.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwhead.hxx,svtools/brwhead.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/calendar.hxx,svtools/calendar.hxx))
@@ -103,6 +104,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/itemdel.hxx,svtools/it
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ivctrl.hxx,svtools/ivctrl.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javacontext.hxx,svtools/javacontext.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javainteractionhandler.hxx,svtools/javainteractionhandler.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/langhelp.hxx,svtools/langhelp.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/langtab.hxx,svtools/langtab.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/localresaccess.hxx,svtools/localresaccess.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/menuoptions.hxx,svtools/menuoptions.hxx))
commit d5f0af5d69bd3043147e301f9d752dd9367d1efa
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:54:40 2011 -0600

    add a SolarMutexResettableGuard... needed in sfx2

diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 515517d..d443149 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -557,6 +557,52 @@ protected:
     osl::SolarMutex& m_solarMutex;
 };
 
+class VCL_DLLPUBLIC SolarMutexResettableGuard
+{
+    SolarMutexResettableGuard( const SolarMutexResettableGuard& );
+    const SolarMutexResettableGuard& operator = ( const SolarMutexResettableGuard& );
+    bool m_bCleared;
+public:
+    /** Acquires mutex
+        @param pMutex pointer to mutex which is to be acquired  */
+    SolarMutexResettableGuard()
+        : m_bCleared(false)
+        , m_solarMutex( Application::GetSolarMutex() )
+        {
+            m_solarMutex.acquire();
+        }
+
+    /** Releases mutex. */
+    virtual ~SolarMutexResettableGuard()
+        {
+            if( !m_bCleared )
+            {
+                m_solarMutex.release();
+            }
+        }
+
+    /** Releases mutex. */
+    void SAL_CALL clear()
+        {
+            if( !m_bCleared)
+            {
+                m_solarMutex.release();
+                m_bCleared = true;
+            }
+        }
+    /** Releases mutex. */
+    void SAL_CALL reset()
+        {
+            if( m_bCleared)
+            {
+                m_solarMutex.acquire();
+                m_bCleared = false;
+            }
+        }
+protected:
+    osl::SolarMutex& m_solarMutex;
+};
+
 
 /**
  A helper class that calls Application::ReleaseSolarMutex() in its constructor
commit 0f9c21f8f87c2b6cb3f3d21664912795395a814e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:54:01 2011 -0600

    mis-merge: lost function :-)

diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index e48ca32..4c75797 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -235,6 +235,12 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv )
 #endif // SOLAR_JAVA
 }
 
+void SystemChildWindow::SetForwardKey( sal_Bool bEnable )
+{
+    if ( mpWindowImpl->mpSysObj )
+        mpWindowImpl->mpSysObj->SetForwardKey( bEnable );
+}
+
 // -----------------------------------------------------------------------
 
 sal_IntPtr SystemChildWindow::GetParentWindowHandle( sal_Bool bUseJava )
commit ab38233c7629bdff2bdce7076a8ee6ffcf9d38f1
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:53:43 2011 -0600

    use boost rather then extstd

diff --git a/cppcanvas/inc/cppcanvas/renderer.hxx b/cppcanvas/inc/cppcanvas/renderer.hxx
index 7f74385..5fbaf68 100644
--- a/cppcanvas/inc/cppcanvas/renderer.hxx
+++ b/cppcanvas/inc/cppcanvas/renderer.hxx
@@ -138,7 +138,7 @@ namespace cppcanvas
             ::boost::optional< sal_Int8 >					maFontLetterForm;
 
             /// Optionally forces the given font proportion (condensed, monospaced etc.) for all text actions
-            ::comphelper::OptionalValue< sal_Int8 >					maFontProportion;
+            ::boost::optional< sal_Int8 >					maFontProportion;
 
             /// Optionally forces underlining for all text actions
             ::boost::optional< bool >						maFontUnderline;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 9d4b164..e168bb2 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -868,8 +868,8 @@ namespace cppcanvas
                 *rParms.mrParms.maFontLetterForm :
                 (rFont.GetItalic() == ITALIC_NONE) ? 0 : 9;
             aFontRequest.FontDescription.FontDescription.Proportion =
-                rParms.mrParms.maFontProportion.isValid() ?
-                rParms.mrParms.maFontProportion.getValue() :
+                rParms.mrParms.maFontProportion.is_initialized() ?
+                *rParms.mrParms.maFontProportion :
                 (rFont.GetPitch() == PITCH_FIXED)
                     ? rendering::PanoseProportion::MONO_SPACED
                     : rendering::PanoseProportion::ANYTHING;
commit 6ffb5a765aa539f9da84c4c45a055732ab0519a1
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 12 18:53:13 2011 -0600

    mis-merge: clean-up remaining tools types

diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 07b5b49..12f3490 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -214,8 +214,8 @@ namespace cairocanvas
             return geometry::RealRectangle2D( 0, nAboveBaseline,
                                               aVDev.GetTextWidth(
                                                   maText.Text,
-                                                  ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
-                                                  ::canvas::tools::numeric_cast<USHORT>(maText.Length) ),
+                                                  ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                                                  ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
                                               nBelowBaseline );
         }
     }
@@ -404,8 +404,8 @@ namespace cairocanvas
         }
 
         aSysLayoutData = rOutDev.GetSysTextLayoutData(rOutpos, maText.Text,
-                                                      ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
-                                                      ::canvas::tools::numeric_cast<USHORT>(maText.Length),
+                                                      ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                                                      ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
                                                       maLogicalAdvancements.getLength() ? aOffsets.get() : NULL);
 
         // Sort them so that all glyphs on the same glyph fallback level are consecutive
@@ -446,15 +446,15 @@ namespace cairocanvas
             if (maLogicalAdvancements.getLength())        // VCL FALLBACK - with glyph advances
             {
                 rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(),
-                                       ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
-                                       ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+                                       ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                                       ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
                 return true;
             }
             else                                               // VCL FALLBACK - without advances
             {
                 rOutDev.DrawText( rOutpos, maText.Text,
-                                  ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
-                                  ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+                                  ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                                  ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
                 return true;
             }
         }
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index cedad0f..0695e2f 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -266,7 +266,7 @@ static float GetSwapFloat( SvStream& rSt )
                                    ActionVector::const_iterator& o_rRangeBegin,
                                    ActionVector::const_iterator& o_rRangeEnd ) const;
 
-            void processObjectRecord(SvMemoryStream& rObjectStream, UINT16 flags);
+            void processObjectRecord(SvMemoryStream& rObjectStream, sal_uInt16 flags);
             void processEMFPlus( MetaCommentAction* pAct, const ActionFactoryParameters& rFactoryParms, OutDevState& rState, const CanvasSharedPtr& rCanvas );
             void EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon& polygon, const ActionFactoryParameters& rParms, OutDevState& rState, const CanvasSharedPtr& rCanvas, bool isColor, sal_uInt32 brushIndexOrColor);
 
@@ -293,7 +293,7 @@ static float GetSwapFloat( SvStream& rSt )
             sal_Int32       nMmY;
             /* multipart object data */
             bool            mbMultipart;
-            UINT16          mMFlags;
+            sal_uInt16          mMFlags;
             SvMemoryStream  mMStream;
         };
 
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index c890596..359878d 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -144,12 +144,12 @@ namespace cppcanvas
             }
 
             // TODO: remove rR argument when debug code is not longer needed
-            void Read (SvStream& s, UINT32 pathFlags, ImplRenderer& rR)
+            void Read (SvStream& s, sal_uInt32 pathFlags, ImplRenderer& rR)
             {
                 for (int i = 0; i < nPoints; i ++) {
                     if (pathFlags & 0x4000) {
                         // points are stored in short 16bit integer format
-                        UINT16 x, y;
+                        sal_uInt16 x, y;
 
                         s >> x >> y;
                         EMFP_DEBUG (printf ("EMF+\tpoint [x,y]: %hd,%hd\n", x, y));
@@ -341,12 +341,12 @@ namespace cppcanvas
                 }
             }
 
-            UINT32 GetType() const { return type; }
+            sal_uInt32 GetType() const { return type; }
             const ::Color& GetColor() const { return solidColor; }
 
             void Read (SvStream& s, ImplRenderer& rR)
             {
-                UINT32 header;
+                sal_uInt32 header;
 
                 s >> header >> type;
 
@@ -355,7 +355,7 @@ namespace cppcanvas
                 switch (type) {
                 case 0:
                     {
-                        UINT32 color;
+                        sal_uInt32 color;
 
                         s >> color;
                         solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
@@ -370,7 +370,7 @@ namespace cppcanvas
 
                         EMFP_DEBUG (printf ("EMF+\tpath gradient, additional flags: 0x%02x\n", additionalFlags));
 
-                        UINT32 color;
+                        sal_uInt32 color;
 
                         s >> color;
                         solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
@@ -483,7 +483,7 @@ namespace cppcanvas
 
                         EMFP_DEBUG (printf ("EMF+\tarea: %f,%f - %fx%f\n", areaX, areaY, areaWidth, areaHeight));
 
-                        UINT32 color;
+                        sal_uInt32 color;
 
                         s >> color;
                         solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
@@ -584,7 +584,7 @@ namespace cppcanvas
 
             void Read (SvStream& s, ImplRenderer& rR, sal_Int32, sal_Int32 )
             {
-                UINT32 header, unknown, penFlags, unknown2;
+                sal_uInt32 header, unknown, penFlags, unknown2;
                 int i;
 
                 s >> header >> unknown >> penFlags >> unknown2 >> width;
@@ -1086,9 +1086,9 @@ namespace cppcanvas
             }
         }
 
-        void ImplRenderer::processObjectRecord(SvMemoryStream& rObjectStream, UINT16 flags)
+        void ImplRenderer::processObjectRecord(SvMemoryStream& rObjectStream, sal_uInt16 flags)
         {
-            EMFP_DEBUG (UINT32 objectLen);
+            EMFP_DEBUG (sal_uInt32 objectLen);
             sal_uInt32 index;
 
             EMFP_DEBUG (printf ("EMF+ Object slot: %hd flags: %hx\n", flags & 0xff, flags & 0xff00));
@@ -1169,8 +1169,8 @@ namespace cppcanvas
             length -= 4;
 
             while (length > 0) {
-                UINT16 type, flags;
-                UINT32 size, dataSize;
+                sal_uInt16 type, flags;
+                sal_uInt32 size, dataSize;
                 sal_uInt32 next;
 
                 rMF >> type >> flags >> size >> dataSize;
@@ -1201,7 +1201,7 @@ namespace cppcanvas
                 if (type != EmfPlusRecordTypeObject || !(flags & 0x8000))
                 switch (type) {
                 case EmfPlusRecordTypeHeader:
-                    UINT32 header, version;
+                    sal_uInt32 header, version;
 
                     rMF >> header >> version >> nHDPI >> nVDPI;
 
@@ -1282,7 +1282,7 @@ namespace cppcanvas
                         sal_uInt32 brushIndexOrColor;
                         EMFP_DEBUG (sal_Int32 brushIndex);
                         sal_Int32 points;
-                        EMFP_DEBUG (UINT32 color);
+                        EMFP_DEBUG (sal_uInt32 color);
                         EMFP_DEBUG (USHORT transparency = 0);
 
                         rMF >> brushIndexOrColor;
@@ -1343,7 +1343,7 @@ namespace cppcanvas
                     }
                 case EmfPlusRecordTypeDrawPath:
                     {
-                        UINT32 penIndex;
+                        sal_uInt32 penIndex;
 
                         rMF >> penIndex;
 


More information about the Libreoffice-commits mailing list