[Libreoffice-commits] .: 5 commits - dbaccess/source oox/Library_oox.mk starmath/inc starmath/source vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jan 31 14:47:29 PST 2012


 dbaccess/source/ui/misc/TokenWriter.cxx |    5 ++---
 oox/Library_oox.mk                      |    5 ++++-
 starmath/inc/rect.hxx                   |   11 ++++++-----
 starmath/source/rect.cxx                |   27 ++++++++++++---------------
 vcl/source/gdi/print3.cxx               |    2 +-
 5 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit a20a1d8e0c6f0710a475ff1fef0b325a62f8237a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 31 22:46:41 2012 +0000

    maUIOptions is a Sequence not a string

diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index a51b039..32ae196 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1336,7 +1336,7 @@ void PrinterController::setValue( const beans::PropertyValue& i_rValue )
 
 void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_rOptions )
 {
-    DBG_ASSERT( mpImplData->maUIOptions.isEmpty(), "setUIOptions called twice !" );
+    DBG_ASSERT( mpImplData->maUIOptions.getLength() == 0, "setUIOptions called twice !" );
 
     mpImplData->maUIOptions = i_rOptions;
 
commit 970ccf4f69080e827008b5da8d8640c202b42306
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 31 22:42:22 2012 +0000

    drop unnecessary includes

diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 57cceba..80542df 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -31,6 +31,7 @@
 
 #include <new>
 
+#include <rtl/ustring.hxx>
 #include <tools/gen.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/metric.hxx>
@@ -39,9 +40,9 @@
 
 
 bool SmGetGlyphBoundRect(const OutputDevice &rDev,
-                         const XubString &rText, Rectangle &rRect);
+                         const rtl::OUString &rText, Rectangle &rRect);
 
-bool SmIsMathAlpha(const XubString &rText);
+bool SmIsMathAlpha(const rtl::OUString &rText);
 
 
 inline long SmFromTo(long nFrom, long nTo, double fRelDist)
@@ -109,9 +110,9 @@ class SmRect
 
 protected:
             void BuildRect (const OutputDevice &rDev, const SmFormat *pFormat,
-                            const XubString &rText, sal_uInt16 nBorderWidth);
+                            const rtl::OUString &rText, sal_uInt16 nBorderWidth);
             void Init(const OutputDevice &rDev, const SmFormat *pFormat,
-                      const XubString &rText, sal_uInt16 nBorderWidth);
+                      const rtl::OUString &rText, sal_uInt16 nBorderWidth);
 
             void ClearBaseline()    { bHasBaseline = false; };
     inline  void CopyMBL(const SmRect& rRect);
@@ -122,7 +123,7 @@ protected:
 public:
             SmRect();
             SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
-                   const XubString &rText, long nBorderWidth);
+                   const rtl::OUString &rText, long nBorderWidth);
             SmRect(long nWidth, long nHeight);
             SmRect(const SmRect &rRect);
 
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 52f367f..879988c 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -26,9 +26,6 @@
  *
  ************************************************************************/
 
-
-
-#include <tools/string.hxx>
 #include <osl/diagnose.h>
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
@@ -60,14 +57,14 @@ static xub_Unicode const aMathAlpha[] =
     xub_Unicode('\0')
 };
 
-bool SmIsMathAlpha(const XubString &rText)
+bool SmIsMathAlpha(const rtl::OUString &rText)
     // true iff symbol (from StarMath Font) should be treated as letter
 {
-    if (rText.Len() == 0)
+    if (rText.isEmpty())
         return false;
 
-    OSL_ENSURE(rText.Len() == 1, "Sm : string must be exactly one character long");
-    xub_Unicode cChar = rText.GetChar(0);
+    OSL_ENSURE(rText.getLength() == 1, "Sm : string must be exactly one character long");
+    xub_Unicode cChar = rText[0];
 
     // is it a greek symbol?
     if (xub_Unicode(0xE0AC) <= cChar  &&  cChar <= xub_Unicode(0xE0D4))
@@ -138,7 +135,7 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
 
 
 void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
-                       const XubString &rText, sal_uInt16 nBorder)
+                       const rtl::OUString &rText, sal_uInt16 nBorder)
 {
     OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: Ooops...");
 
@@ -227,13 +224,13 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
     if (nLoAttrFence > GetBottom())
         nLoAttrFence = GetBottom();
 
-    OSL_ENSURE(rText.Len() == 0  ||  !IsEmpty(),
+    OSL_ENSURE(rText.isEmpty() || !IsEmpty(),
                "Sm: empty rectangle created");
 }
 
 
 void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
-                  const XubString &rText, sal_uInt16 nEBorderWidth)
+                  const rtl::OUString &rText, sal_uInt16 nEBorderWidth)
     // get rectangle fitting for drawing 'rText' on OutputDevice 'rDev'
 {
     BuildRect(rDev, pFormat, rText, nEBorderWidth);
@@ -241,7 +238,7 @@ void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
 
 
 SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
-               const XubString &rText, long nEBorderWidth)
+               const rtl::OUString &rText, long nEBorderWidth)
 {
     OSL_ENSURE( nEBorderWidth >= 0, "BorderWidth is negative" );
     if (nEBorderWidth < 0)
@@ -613,14 +610,14 @@ SmRect SmRect::AsGlyphRect() const
 }
 
 bool SmGetGlyphBoundRect(const OutputDevice &rDev,
-                         const XubString &rText, Rectangle &rRect)
+                         const rtl::OUString &rText, Rectangle &rRect)
     // basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
     // but with a string as argument.
 {
     // handle special case first
-    xub_StrLen nLen = rText.Len();
-    if (nLen == 0)
-    {   rRect.SetEmpty();
+    if (rText.isEmpty())
+    {
+        rRect.SetEmpty();
         return true;
     }
 
commit 2762c6dcc1e4839b6e384238adb000024a4f0222
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 31 22:20:21 2012 +0000

    make dbaccess ByteString free

diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 58d3acd..1102787 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -412,8 +412,8 @@ sal_Bool ORTFImportExport::Write()
         m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= nColor;
     ::Color aColor(nColor);
 
-    ByteString aFonts(rtl::OUStringToOString(m_aFont.Name, eDestEnc));
-    if(!aFonts.Len())
+    rtl::OString aFonts(rtl::OUStringToOString(m_aFont.Name, eDestEnc));
+    if (aFonts.isEmpty())
     {
         rtl::OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName();
         aFonts = rtl::OUStringToOString(aName, eDestEnc);
commit ea44fbc87fbfee2849efb7eb43010c4fb52f5218
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 31 22:19:19 2012 +0000

    useless aFontNr

diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index c43da50..58d3acd 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -418,7 +418,6 @@ sal_Bool ORTFImportExport::Write()
         rtl::OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName();
         aFonts = rtl::OUStringToOString(aName, eDestEnc);
     }
-    ByteString aFontNr;
 
     (*m_pStream)    << "{\\fonttbl";
     xub_StrLen nTokenCount = comphelper::string::getTokenCount(aFonts, ';');
commit 5c0a389532ffd5e6ec82bb12178c7537b0481044
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 31 22:09:32 2012 +0000

    use a $(COM)-$(OS)-$(CPUNAME) pattern
    
    i.e. same pattern as sc/Library_vbaobj.mk and
    writerfilter/Library_resourcemodel.mk and document that its a compile time
    error which can be retested anytime with a new toolchain, not some weird scary
    runtime error so must never be touched.

diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 089605d..6e4b60e 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -40,7 +40,10 @@ $(eval $(call gb_Library_set_include,oox,\
     -I$(realpath $(SRCDIR)/oox/inc) \
 ))
 
-ifeq ($(CPUNAME),IA64)
+ifeq ($(COM)-$(OS)-$(CPUNAME),GCC-LINUX-IA64)
+#Debian Linux ia64 fails at compile time on
+#oox/source/drawingml/customshapepresets*.cxx which are apparently too large
+#for the toolchain to handle with default optimization
 $(eval $(call gb_Library_add_cxxflags,oox,\
     -Os \
 ))


More information about the Libreoffice-commits mailing list