Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 05/30/2013 10:32 PM, Christina Roßmanith (via Code Review) wrote:
@@ -810,8 +805,8 @@
                      {
                          const String& rTypeName = pFilter->GetRealTypeName();

-                        if( (rTypeName.CompareToAscii( 
RTL_CONSTASCII_STRINGPARAM("impress_StarImpress" ) ) == 0) ||
-                            (rTypeName.CompareToAscii( RTL_CONSTASCII_STRINGPARAM("draw_StarDraw" 
) ) == 0) )
+                        if( (rTypeName.CompareToAscii( "impress_StarImpress" ) == 0) ||
+                            (rTypeName.CompareToAscii( "draw_StarDraw" ) == 0) )
                          {
                              bTransform = true;
                          }

Careful with any string functions containing "compare" in their names---they don't necessarily do what one might expect. Fixed now with <http://cgit.freedesktop.org/libreoffice/core/commit/?id=018c22d37878f1fc349085143ee4241165a4802a> "UniString::CompareToAscii(RTL_CONSTASCII_STRINGPARAM("x"))==COMPARE_EQUAL ..."

Stephan


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.