Kaydet (Commit) 328adfb5 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

Save some getLength calls

Change-Id: I4103a338e487ee29da6ac056215c4fa0a244fa65
üst 474c8b8b
...@@ -145,9 +145,9 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -145,9 +145,9 @@ throw( com::sun::star::uno::RuntimeException )
if (libcdr::CDRDocument::isSupported(&input)) if (libcdr::CDRDocument::isSupported(&input))
sTypeName = "draw_CorelDraw_Document"; sTypeName = "draw_CorelDraw_Document";
if (sTypeName.getLength()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
...@@ -144,9 +144,9 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -144,9 +144,9 @@ throw( com::sun::star::uno::RuntimeException )
if (libcdr::CMXDocument::isSupported(&input)) if (libcdr::CMXDocument::isSupported(&input))
sTypeName = "draw_Corel_Presentation_Exchange"; sTypeName = "draw_Corel_Presentation_Exchange";
if (sTypeName.getLength()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
...@@ -140,9 +140,9 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -140,9 +140,9 @@ throw( com::sun::star::uno::RuntimeException )
if (libmspub::MSPUBDocument::isSupported(&input)) if (libmspub::MSPUBDocument::isSupported(&input))
sTypeName = "draw_Publisher_Document"; sTypeName = "draw_Publisher_Document";
if (sTypeName.getLength()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
...@@ -142,7 +142,7 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -142,7 +142,7 @@ throw( com::sun::star::uno::RuntimeException )
if (!sTypeName.isEmpty()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength ) )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
...@@ -148,7 +148,7 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -148,7 +148,7 @@ throw( com::sun::star::uno::RuntimeException )
if (!sTypeName.isEmpty()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
...@@ -151,7 +151,7 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -151,7 +151,7 @@ throw( com::sun::star::uno::RuntimeException )
if (!sTypeName.isEmpty()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
...@@ -206,7 +206,7 @@ throw( RuntimeException ) ...@@ -206,7 +206,7 @@ throw( RuntimeException )
if (!sTypeName.isEmpty()) if (!sTypeName.isEmpty())
{ {
if ( location == Descriptor.getLength() ) if ( location == nLength )
{ {
Descriptor.realloc(nLength+1); Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName"; Descriptor[location].Name = "TypeName";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment