diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/op_logical.cxx | 77 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 15 |
2 files changed, 43 insertions, 49 deletions
diff --git a/sc/source/core/opencl/op_logical.cxx b/sc/source/core/opencl/op_logical.cxx index 7f63af628cab..acb836a02c20 100644 --- a/sc/source/core/opencl/op_logical.cxx +++ b/sc/source/core/opencl/op_logical.cxx @@ -320,47 +320,44 @@ void OpIf::GenSlidingWindowFunction(std::stringstream &ss, { throw UnhandledToken("unknown operand for ocPush", __FILE__, __LINE__); } - else + if(vSubArguments.size()==3) { - if(vSubArguments.size()==3) - { - ss << " if(isnan("; - ss << vSubArguments[0]->GenSlidingWindowDeclRef(); - ss << ")|| "; - ss << vSubArguments[0]->GenSlidingWindowDeclRef(); - ss << " == 0)\n"; - ss << " return "; - ss << vSubArguments[2]->GenSlidingWindowDeclRef(); - ss << ";\n"; - ss << " else"; - ss <<" return "; - ss << vSubArguments[1]->GenSlidingWindowDeclRef(); - ss <<";\n"; - } - if(vSubArguments.size()==2) - { - ss << " if(isnan("; - ss << vSubArguments[0]->GenSlidingWindowDeclRef(); - ss << ")|| "; - ss << vSubArguments[0]->GenSlidingWindowDeclRef(); - ss << " == 0)\n"; - ss << " return 0;\n"; - ss << " else"; - ss <<" return "; - ss << vSubArguments[1]->GenSlidingWindowDeclRef(); - ss <<";\n"; - } - if(vSubArguments.size()==1) - { - ss << " if(isnan("; - ss << vSubArguments[0]->GenSlidingWindowDeclRef(); - ss << ")|| "; - ss << vSubArguments[0]->GenSlidingWindowDeclRef(); - ss << " == 0)\n"; - ss << " return 0;\n"; - ss << " else"; - ss <<" return 1;\n"; - } + ss << " if(isnan("; + ss << vSubArguments[0]->GenSlidingWindowDeclRef(); + ss << ")|| "; + ss << vSubArguments[0]->GenSlidingWindowDeclRef(); + ss << " == 0)\n"; + ss << " return "; + ss << vSubArguments[2]->GenSlidingWindowDeclRef(); + ss << ";\n"; + ss << " else"; + ss <<" return "; + ss << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<";\n"; + } + if(vSubArguments.size()==2) + { + ss << " if(isnan("; + ss << vSubArguments[0]->GenSlidingWindowDeclRef(); + ss << ")|| "; + ss << vSubArguments[0]->GenSlidingWindowDeclRef(); + ss << " == 0)\n"; + ss << " return 0;\n"; + ss << " else"; + ss <<" return "; + ss << vSubArguments[1]->GenSlidingWindowDeclRef(); + ss <<";\n"; + } + if(vSubArguments.size()==1) + { + ss << " if(isnan("; + ss << vSubArguments[0]->GenSlidingWindowDeclRef(); + ss << ")|| "; + ss << vSubArguments[0]->GenSlidingWindowDeclRef(); + ss << " == 0)\n"; + ss << " return 0;\n"; + ss << " else"; + ss <<" return 1;\n"; } ss << "}\n"; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 629b2c6816e3..265334a5eef8 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -3418,15 +3418,12 @@ void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno:: // name already exists throw container::ElementExistException(); } - else - { - SCTAB nPosition = rDoc.GetTableCount(); - bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aName, - true, true ); - if (bDone) - pSheetObj->InitInsertSheet( pDocShell, nPosition ); - // set document and new range in the object - } + SCTAB nPosition = rDoc.GetTableCount(); + bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aName, + true, true ); + if (bDone) + pSheetObj->InitInsertSheet( pDocShell, nPosition ); + // set document and new range in the object } else bIllArg = true; |