update loplugin stylepolice to check local pointers vars
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
parent
e6adb3e8b4
commit
e8fd5a07ec
@ -42,8 +42,8 @@ BreakPointList::~BreakPointList()
|
||||
|
||||
void BreakPointList::reset()
|
||||
{
|
||||
for (BreakPoint* maBreakPoint : maBreakPoints)
|
||||
delete maBreakPoint;
|
||||
for (BreakPoint* pBreakPoint : maBreakPoints)
|
||||
delete pBreakPoint;
|
||||
maBreakPoints.clear();
|
||||
}
|
||||
|
||||
|
@ -105,9 +105,9 @@ public:
|
||||
|
||||
void setClosed(bool bNew)
|
||||
{
|
||||
for(basegfx::B2DPolygon & maPolygon : maPolygons)
|
||||
for(basegfx::B2DPolygon & rPolygon : maPolygons)
|
||||
{
|
||||
maPolygon.setClosed(bNew);
|
||||
rPolygon.setClosed(bNew);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1761,10 +1761,10 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache)
|
||||
if( (pSymDef->GetType() != SbxEMPTY) && (pSymDef->GetType() != SbxNULL) )
|
||||
aCache.InsertGlobalVar( pSymDef->GetName(), pParser->aGblStrings.Find(pSymDef->GetTypeId()) );
|
||||
|
||||
SbiSymPool& pChildPool = pSymDef->GetPool();
|
||||
for(sal_uInt16 j = 0; j < pChildPool.GetSize(); ++j )
|
||||
SbiSymPool& rChildPool = pSymDef->GetPool();
|
||||
for(sal_uInt16 j = 0; j < rChildPool.GetSize(); ++j )
|
||||
{
|
||||
SbiSymDef* pChildSymDef = pChildPool.Get(j);
|
||||
SbiSymDef* pChildSymDef = rChildPool.Get(j);
|
||||
//std::cerr << "j: " << j << ", type: " << pChildSymDef->GetType() << "; name:" << pChildSymDef->GetName() << std::endl;
|
||||
if( (pChildSymDef->GetType() != SbxEMPTY) && (pChildSymDef->GetType() != SbxNULL) )
|
||||
aCache.InsertLocalVar( pSymDef->GetName(), pChildSymDef->GetName(), pParser->aGblStrings.Find(pChildSymDef->GetTypeId()) );
|
||||
|
@ -184,8 +184,8 @@ BaseCoordinateSystem::~BaseCoordinateSystem()
|
||||
{
|
||||
try
|
||||
{
|
||||
for(tAxisVecVecType::value_type & m_aAllAxi : m_aAllAxis)
|
||||
ModifyListenerHelper::removeListenerFromAllElements( m_aAllAxi, m_xModifyEventForwarder );
|
||||
for(tAxisVecVecType::value_type & i : m_aAllAxis)
|
||||
ModifyListenerHelper::removeListenerFromAllElements( i, m_xModifyEventForwarder );
|
||||
ModifyListenerHelper::removeListenerFromAllElements( m_aChartTypes, m_xModifyEventForwarder );
|
||||
}
|
||||
catch( const uno::Exception & ex )
|
||||
|
@ -102,8 +102,8 @@ ThreadPool::ThreadPool( sal_Int32 nWorkers ) :
|
||||
maTasksComplete.set();
|
||||
|
||||
osl::MutexGuard aGuard( maGuard );
|
||||
for(rtl::Reference<ThreadWorker> & maWorker : maWorkers)
|
||||
maWorker->launch();
|
||||
for(rtl::Reference<ThreadWorker> & rpWorker : maWorkers)
|
||||
rpWorker->launch();
|
||||
}
|
||||
|
||||
ThreadPool::~ThreadPool()
|
||||
@ -154,8 +154,8 @@ void ThreadPool::pushTask( ThreadTask *pTask )
|
||||
maTasks.insert( maTasks.begin(), pTask );
|
||||
|
||||
// horrible beyond belief:
|
||||
for(rtl::Reference<ThreadWorker> & maWorker : maWorkers)
|
||||
maWorker->signalNewWork();
|
||||
for(rtl::Reference<ThreadWorker> & rpWorker : maWorkers)
|
||||
rpWorker->signalNewWork();
|
||||
maTasksComplete.reset();
|
||||
}
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include <regex>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
#include "compat.hxx"
|
||||
#include "plugin.hxx"
|
||||
|
||||
// Check for some basic naming mismatches which make the code harder to read
|
||||
|
||||
namespace {
|
||||
|
||||
static const std::regex aMemberRegex("^m([abnprsx]?[A-Z]|[_][a-zA-Z])");
|
||||
|
||||
class StylePolice :
|
||||
public RecursiveASTVisitor<StylePolice>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit StylePolice(InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
bool VisitVarDecl(const VarDecl *);
|
||||
private:
|
||||
StringRef getFilename(SourceLocation loc);
|
||||
};
|
||||
|
||||
StringRef StylePolice::getFilename(SourceLocation loc)
|
||||
{
|
||||
SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc);
|
||||
StringRef name { compiler.getSourceManager().getFilename(spellingLocation) };
|
||||
return name;
|
||||
}
|
||||
|
||||
bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
|
||||
{
|
||||
if (ignoreLocation(varDecl)) {
|
||||
return true;
|
||||
}
|
||||
StringRef aFileName = getFilename(varDecl->getLocStart());
|
||||
std::string name = varDecl->getName();
|
||||
|
||||
// these names appear to be taken from some scientific paper
|
||||
if (aFileName == SRCDIR "/scaddins/source/analysis/bessel.cxx" ) {
|
||||
return true;
|
||||
}
|
||||
// lots of places where we are storing a "method id" here
|
||||
if (aFileName.startswith(SRCDIR "/connectivity/source/drivers/jdbc") && name.compare(0,3,"mID") == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!varDecl->isLocalVarDecl()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (std::regex_search(name, aMemberRegex))
|
||||
{
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
"this local variable follows our member field naming convention, which is confusing",
|
||||
varDecl->getLocation())
|
||||
<< varDecl->getType() << varDecl->getSourceRange();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
loplugin::Plugin::Registration< StylePolice > X("stylepolice");
|
||||
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
142
compilerplugins/clang/stylepolice.cxx
Normal file
142
compilerplugins/clang/stylepolice.cxx
Normal file
@ -0,0 +1,142 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include <regex>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
#include "compat.hxx"
|
||||
#include "plugin.hxx"
|
||||
|
||||
// Check for some basic naming mismatches which make the code harder to read
|
||||
|
||||
namespace {
|
||||
|
||||
class StylePolice :
|
||||
public RecursiveASTVisitor<StylePolice>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit StylePolice(InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
bool VisitVarDecl(const VarDecl *);
|
||||
private:
|
||||
StringRef getFilename(SourceLocation loc);
|
||||
};
|
||||
|
||||
StringRef StylePolice::getFilename(SourceLocation loc)
|
||||
{
|
||||
SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc);
|
||||
StringRef name { compiler.getSourceManager().getFilename(spellingLocation) };
|
||||
return name;
|
||||
}
|
||||
|
||||
bool startswith(const std::string& rStr, const char* pSubStr) {
|
||||
return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
|
||||
}
|
||||
bool isUpperLetter(char c) {
|
||||
return c >= 'A' && c <= 'Z';
|
||||
}
|
||||
bool isLowerLetter(char c) {
|
||||
return c >= 'a' && c <= 'z';
|
||||
}
|
||||
bool isIdentifierLetter(char c) {
|
||||
return isUpperLetter(c) || isLowerLetter(c);
|
||||
}
|
||||
bool matchPointerVar(const std::string& s) {
|
||||
return s.size() > 2 && s[0] == 'p' && isUpperLetter(s[1]);
|
||||
}
|
||||
bool matchMember(const std::string& s) {
|
||||
return s.size() > 3 && s[0] == 'm'
|
||||
&& ( ( strchr("abnprsx", s[1]) && isUpperLetter(s[2]) )
|
||||
|| ( s[1] == '_' && isIdentifierLetter(s[2]) ) );
|
||||
}
|
||||
|
||||
bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
|
||||
{
|
||||
if (ignoreLocation(varDecl)) {
|
||||
return true;
|
||||
}
|
||||
StringRef aFileName = getFilename(varDecl->getLocStart());
|
||||
std::string name = varDecl->getName();
|
||||
|
||||
if (!varDecl->isLocalVarDecl()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (matchMember(name))
|
||||
{
|
||||
// these names appear to be taken from some scientific paper
|
||||
if (aFileName == SRCDIR "/scaddins/source/analysis/bessel.cxx" ) {
|
||||
}
|
||||
// lots of places where we are storing a "method id" here
|
||||
else if (aFileName.startswith(SRCDIR "/connectivity/source/drivers/jdbc") && name.compare(0,3,"mID") == 0) {
|
||||
}
|
||||
else {
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
"this local variable follows our member field naming convention, which is confusing",
|
||||
varDecl->getLocation())
|
||||
<< varDecl->getType() << varDecl->getSourceRange();
|
||||
}
|
||||
}
|
||||
|
||||
QualType qt = varDecl->getType().getDesugaredType(compiler.getASTContext()).getCanonicalType();
|
||||
qt = qt.getNonReferenceType();
|
||||
std::string typeName = qt.getAsString();
|
||||
if (startswith(typeName, "const "))
|
||||
typeName = typeName.substr(6);
|
||||
if (startswith(typeName, "class "))
|
||||
typeName = typeName.substr(6);
|
||||
std::string aOriginalTypeName = varDecl->getType().getAsString();
|
||||
if (!qt->isPointerType() && !qt->isArrayType() && !qt->isFunctionPointerType() && !qt->isMemberPointerType()
|
||||
&& matchPointerVar(name)
|
||||
&& !startswith(typeName, "boost::intrusive_ptr")
|
||||
&& !startswith(typeName, "boost::optional")
|
||||
&& !startswith(typeName, "boost::shared_ptr")
|
||||
&& !startswith(typeName, "com::sun::star::uno::Reference")
|
||||
&& !startswith(typeName, "cppu::OInterfaceIteratorHelper")
|
||||
&& !startswith(typeName, "formula::FormulaCompiler::CurrentFactor")
|
||||
&& aOriginalTypeName != "GLXPixmap"
|
||||
&& !startswith(typeName, "rtl::Reference")
|
||||
&& !startswith(typeName, "ScopedVclPtr")
|
||||
&& !startswith(typeName, "std::mem_fun")
|
||||
&& !startswith(typeName, "std::shared_ptr")
|
||||
&& !startswith(typeName, "shared_ptr") // weird issue in slideshow
|
||||
&& !startswith(typeName, "std::unique_ptr")
|
||||
&& !startswith(typeName, "unique_ptr") // weird issue in include/vcl/threadex.hxx
|
||||
&& !startswith(typeName, "std::weak_ptr")
|
||||
&& !startswith(typeName, "struct _LOKDocViewPrivate")
|
||||
&& !startswith(typeName, "sw::UnoCursorPointer")
|
||||
&& !startswith(typeName, "tools::SvRef")
|
||||
&& !startswith(typeName, "VclPtr")
|
||||
&& !startswith(typeName, "vcl::ScopedBitmapAccess")
|
||||
// lots of the code seems to regard iterator objects as being "pointer-like"
|
||||
&& typeName.find("iterator<") == std::string::npos
|
||||
&& aOriginalTypeName != "sal_IntPtr" )
|
||||
{
|
||||
if (aFileName.startswith(SRCDIR "/bridges/") ) {
|
||||
} else if (aFileName.startswith(SRCDIR "/vcl/source/fontsubset/sft.cxx") ) {
|
||||
} else {
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
"this local variable of type '%0' follows our pointer naming convention, but it is not a pointer, %1",
|
||||
varDecl->getLocation())
|
||||
<< typeName << aOriginalTypeName << varDecl->getSourceRange();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
loplugin::Plugin::Registration< StylePolice > X("stylepolice");
|
||||
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -131,11 +131,11 @@ IMPL_LINK_TYPED( SelectPersonaDialog, SearchPersonas, Button*, pButton, void )
|
||||
searchTerm = m_pEdit->GetText();
|
||||
else
|
||||
{
|
||||
for(VclPtr<PushButton> & m_vSearchSuggestion : m_vSearchSuggestions)
|
||||
for(VclPtr<PushButton> & i : m_vSearchSuggestions)
|
||||
{
|
||||
if( pButton == m_vSearchSuggestion )
|
||||
if( pButton == i )
|
||||
{
|
||||
searchTerm = m_vSearchSuggestion->GetDisplayText();
|
||||
searchTerm = i->GetDisplayText();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -288,8 +288,8 @@ void SvxPersonalizationTabPage::dispose()
|
||||
m_pDefaultPersona.clear();
|
||||
m_pOwnPersona.clear();
|
||||
m_pSelectPersona.clear();
|
||||
for (VclPtr<PushButton> & m_vDefaultPersonaImage : m_vDefaultPersonaImages)
|
||||
m_vDefaultPersonaImage.clear();
|
||||
for (VclPtr<PushButton> & i : m_vDefaultPersonaImages)
|
||||
i.clear();
|
||||
m_pExtensionPersonaPreview.clear();
|
||||
m_pPersonaList.clear();
|
||||
m_pExtensionLabel.clear();
|
||||
|
@ -1997,21 +1997,18 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
|
||||
bool bAlreadyOpened = false;
|
||||
if ( pNode->m_aGroupedLeaves.size() > 0 )
|
||||
{
|
||||
for (std::vector<OptionsLeaf*> & m_aGroupedLeave : pNode->m_aGroupedLeaves)
|
||||
for (std::vector<OptionsLeaf*> & rGroup : pNode->m_aGroupedLeaves)
|
||||
{
|
||||
if ( m_aGroupedLeave.size() > 0 &&
|
||||
m_aGroupedLeave[0]->m_sGroupId
|
||||
== sLeafGrpId )
|
||||
if ( rGroup.size() > 0 &&
|
||||
rGroup[0]->m_sGroupId == sLeafGrpId )
|
||||
{
|
||||
sal_uInt32 l = 0;
|
||||
for ( ; l < m_aGroupedLeave.size(); ++l )
|
||||
for ( ; l < rGroup.size(); ++l )
|
||||
{
|
||||
if ( m_aGroupedLeave[l]->
|
||||
m_nGroupIndex >= nLeafGrpIdx )
|
||||
if ( rGroup[l]->m_nGroupIndex >= nLeafGrpIdx )
|
||||
break;
|
||||
}
|
||||
m_aGroupedLeave.insert(
|
||||
m_aGroupedLeave.begin() + l, pLeaf );
|
||||
rGroup.insert( rGroup.begin() + l, pLeaf );
|
||||
bAlreadyOpened = true;
|
||||
break;
|
||||
}
|
||||
|
@ -498,9 +498,9 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin
|
||||
,XML_MAX_ROW_COUNT
|
||||
,XML_SUPPRESS_VERSION_COLUMNS
|
||||
};
|
||||
for (::xmloff::token::XMLTokenEnum pSetting : pSettings)
|
||||
for (::xmloff::token::XMLTokenEnum i : pSettings)
|
||||
{
|
||||
TSettingsMap::const_iterator aFind = _aSettings.find(pSetting);
|
||||
TSettingsMap::const_iterator aFind = _aSettings.find(i);
|
||||
if ( aFind != _aSettings.end() )
|
||||
AddAttribute(XML_NAMESPACE_DB, aFind->first,aFind->second);
|
||||
}
|
||||
@ -531,9 +531,9 @@ void ODBExport::exportDriverSettings(const TSettingsMap& _aSettings)
|
||||
,XML_IS_FIRST_ROW_HEADER_LINE
|
||||
,XML_PARAMETER_NAME_SUBSTITUTION
|
||||
};
|
||||
for (::xmloff::token::XMLTokenEnum pSetting : pSettings)
|
||||
for (::xmloff::token::XMLTokenEnum nSetting : pSettings)
|
||||
{
|
||||
TSettingsMap::const_iterator aFind = _aSettings.find(pSetting);
|
||||
TSettingsMap::const_iterator aFind = _aSettings.find(nSetting);
|
||||
if ( aFind != _aSettings.end() )
|
||||
AddAttribute(XML_NAMESPACE_DB, aFind->first,aFind->second);
|
||||
}
|
||||
|
@ -212,8 +212,8 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo
|
||||
m_xWindow = VCLUnoHelper::GetInterface( m_pTablePreview );
|
||||
|
||||
SetUniqueId(UID_APP_DETAILPAGE_HELPER);
|
||||
for (VclPtr<DBTreeListBox> & m_pList : m_pLists)
|
||||
m_pList = nullptr;
|
||||
for (VclPtr<DBTreeListBox> & rpBox : m_pLists)
|
||||
rpBox = nullptr;
|
||||
ImplInitSettings();
|
||||
}
|
||||
|
||||
@ -235,14 +235,14 @@ void OAppDetailPageHelper::dispose()
|
||||
OSL_FAIL("Exception thrown while disposing preview frame!");
|
||||
}
|
||||
|
||||
for (VclPtr<DBTreeListBox> & m_pList : m_pLists)
|
||||
for (VclPtr<DBTreeListBox> & rpBox : m_pLists)
|
||||
{
|
||||
if ( m_pList )
|
||||
if ( rpBox )
|
||||
{
|
||||
m_pList->clearCurrentSelection();
|
||||
m_pList->Hide();
|
||||
m_pList->clearCurrentSelection(); // why a second time?
|
||||
m_pList.disposeAndClear();
|
||||
rpBox->clearCurrentSelection();
|
||||
rpBox->Hide();
|
||||
rpBox->clearCurrentSelection(); // why a second time?
|
||||
rpBox.disposeAndClear();
|
||||
}
|
||||
}
|
||||
m_aMenu.reset();
|
||||
@ -764,10 +764,10 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
|
||||
void OAppDetailPageHelper::clearPages()
|
||||
{
|
||||
showPreview(nullptr);
|
||||
for (VclPtr<DBTreeListBox> & m_pList : m_pLists)
|
||||
for (VclPtr<DBTreeListBox> & rpBox : m_pLists)
|
||||
{
|
||||
if ( m_pList )
|
||||
m_pList->Clear();
|
||||
if ( rpBox )
|
||||
rpBox->Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1156,9 +1156,9 @@ IMPL_LINK_NOARG_TYPED(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, void)
|
||||
, SID_DB_APP_VIEW_DOCINFO_PREVIEW
|
||||
};
|
||||
|
||||
for(unsigned short pAction : pActions)
|
||||
for(unsigned short nAction : pActions)
|
||||
{
|
||||
aMenu->CheckItem(pAction,m_aMenu->IsItemChecked(pAction));
|
||||
aMenu->CheckItem(nAction,m_aMenu->IsItemChecked(nAction));
|
||||
}
|
||||
aMenu->EnableItem( SID_DB_APP_VIEW_DOCINFO_PREVIEW, getBorderWin().getView()->getAppController().isCommandEnabled(SID_DB_APP_VIEW_DOCINFO_PREVIEW) );
|
||||
|
||||
|
@ -194,9 +194,9 @@ namespace dbaui
|
||||
{ std::addressof(m_pRespectDriverResultSetType), "resulttype", DSID_RESPECTRESULTSETTYPE, false }
|
||||
};
|
||||
|
||||
for ( const BooleanSettingDesc& pCopy : aSettings )
|
||||
for ( const BooleanSettingDesc& rDesc : aSettings )
|
||||
{
|
||||
m_aBooleanSettings.push_back( pCopy );
|
||||
m_aBooleanSettings.push_back( rDesc );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -774,10 +774,10 @@ void DesktopLOKTest::testSheetOperations()
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(pDocument->pClass->getParts(pDocument), 6);
|
||||
|
||||
std::vector<OString> pExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" };
|
||||
std::vector<OString> aExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" };
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL(pExpected[i], OString(pDocument->pClass->getPartName(pDocument, i)));
|
||||
CPPUNIT_ASSERT_EQUAL(aExpected[i], OString(pDocument->pClass->getPartName(pDocument, i)));
|
||||
}
|
||||
|
||||
comphelper::LibreOfficeKit::setActive(false);
|
||||
@ -831,13 +831,13 @@ void DesktopLOKTest::testSheetSelections()
|
||||
{
|
||||
char* pUsedMimeType = nullptr;
|
||||
char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType);
|
||||
std::vector<int> pExpected = {5, 6, 7, 8, 9};
|
||||
std::vector<int> aExpected = {5, 6, 7, 8, 9};
|
||||
std::istringstream iss(pCopiedContent);
|
||||
for (size_t i = 0; i < pExpected.size(); i++)
|
||||
for (size_t i = 0; i < aExpected.size(); i++)
|
||||
{
|
||||
std::string token;
|
||||
iss >> token;
|
||||
CPPUNIT_ASSERT_EQUAL(pExpected[i], std::stoi(token));
|
||||
CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token));
|
||||
}
|
||||
|
||||
free(pUsedMimeType);
|
||||
@ -877,13 +877,13 @@ void DesktopLOKTest::testSheetSelections()
|
||||
{
|
||||
char* pUsedMimeType = nullptr;
|
||||
char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType);
|
||||
std::vector<int> pExpected = { 8 };
|
||||
std::vector<int> aExpected = { 8 };
|
||||
std::istringstream iss(pCopiedContent);
|
||||
for (size_t i = 0; i < pExpected.size(); i++)
|
||||
for (size_t i = 0; i < aExpected.size(); i++)
|
||||
{
|
||||
std::string token;
|
||||
iss >> token;
|
||||
CPPUNIT_ASSERT_EQUAL(pExpected[i], std::stoi(token));
|
||||
CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token));
|
||||
}
|
||||
|
||||
free(pUsedMimeType);
|
||||
|
@ -178,9 +178,9 @@ namespace drawinglayer
|
||||
|
||||
AnimationEntryList::~AnimationEntryList()
|
||||
{
|
||||
for(AnimationEntry* maEntrie : maEntries)
|
||||
for(AnimationEntry* i : maEntries)
|
||||
{
|
||||
delete maEntrie;
|
||||
delete i;
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,9 +188,9 @@ namespace drawinglayer
|
||||
{
|
||||
AnimationEntryList* pNew = new AnimationEntryList();
|
||||
|
||||
for(AnimationEntry* maEntrie : maEntries)
|
||||
for(AnimationEntry* i : maEntries)
|
||||
{
|
||||
pNew->append(*maEntrie);
|
||||
pNew->append(*i);
|
||||
}
|
||||
|
||||
return pNew;
|
||||
@ -281,9 +281,9 @@ namespace drawinglayer
|
||||
{
|
||||
AnimationEntryLoop* pNew = new AnimationEntryLoop(mnRepeat);
|
||||
|
||||
for(AnimationEntry* maEntrie : maEntries)
|
||||
for(AnimationEntry* i : maEntries)
|
||||
{
|
||||
pNew->append(*maEntrie);
|
||||
pNew->append(*i);
|
||||
}
|
||||
|
||||
return pNew;
|
||||
|
@ -803,9 +803,9 @@ void ParaPortionList::Reset()
|
||||
long ParaPortionList::GetYOffset(const ParaPortion* pPPortion) const
|
||||
{
|
||||
long nHeight = 0;
|
||||
for (const auto & maPortion : maPortions)
|
||||
for (const auto & rPortion : maPortions)
|
||||
{
|
||||
const ParaPortion* pTmpPortion = maPortion.get();
|
||||
const ParaPortion* pTmpPortion = rPortion.get();
|
||||
if ( pTmpPortion == pPPortion )
|
||||
return nHeight;
|
||||
nHeight += pTmpPortion->GetHeight();
|
||||
|
@ -1794,16 +1794,16 @@ static bool lcl_FindAbbreviation(const SvStringsISortDtor* pList, const OUString
|
||||
if( nPos < pList->size() )
|
||||
{
|
||||
OUString sLowerWord(sWord.toAsciiLowerCase());
|
||||
OUString pAbk;
|
||||
OUString sAbr;
|
||||
for( sal_uInt16 n = nPos;
|
||||
n < pList->size() &&
|
||||
'~' == ( pAbk = (*pList)[ n ])[ 0 ];
|
||||
'~' == ( sAbr = (*pList)[ n ])[ 0 ];
|
||||
++n )
|
||||
{
|
||||
// ~ and ~. are not allowed!
|
||||
if( 2 < pAbk.getLength() && pAbk.getLength() - 1 <= sWord.getLength() )
|
||||
if( 2 < sAbr.getLength() && sAbr.getLength() - 1 <= sWord.getLength() )
|
||||
{
|
||||
OUString sLowerAbk(pAbk.toAsciiLowerCase());
|
||||
OUString sLowerAbk(sAbr.toAsciiLowerCase());
|
||||
for (sal_Int32 i = sLowerAbk.getLength(), ii = sLowerWord.getLength(); i;)
|
||||
{
|
||||
if( !--i ) // agrees
|
||||
|
@ -519,9 +519,9 @@ void GridWindow::drawNew(vcl::RenderContext& rRenderContext)
|
||||
|
||||
void GridWindow::drawHandles(vcl::RenderContext& rRenderContext)
|
||||
{
|
||||
for(impHandle & m_aHandle : m_aHandles)
|
||||
for(impHandle & rHandle : m_aHandles)
|
||||
{
|
||||
m_aHandle.draw(rRenderContext, m_aMarkerBitmap);
|
||||
rHandle.draw(rRenderContext, m_aMarkerBitmap);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
|
||||
Reference< XStyleFamiliesSupplier > xstylefamiliessupplier(mxDoc, UNO_QUERY);
|
||||
Reference< XStyleLoader > xstyleLoader (xstylefamiliessupplier->getStyleFamilies(), UNO_QUERY);
|
||||
if(xstyleLoader.is()){
|
||||
Sequence<css::beans::PropertyValue> pValue=xstyleLoader->getStyleLoaderOptions();
|
||||
Sequence<css::beans::PropertyValue> aValue = xstyleLoader->getStyleLoaderOptions();
|
||||
|
||||
//Load the Styles from the Template URL Supplied in the TypeDetection file
|
||||
if(!comphelper::isFileUrl(msTemplateName))
|
||||
@ -148,7 +148,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
|
||||
msTemplateName=PathString.concat(msTemplateName);
|
||||
}
|
||||
|
||||
xstyleLoader->loadStylesFromURL(msTemplateName,pValue);
|
||||
xstyleLoader->loadStylesFromURL(msTemplateName,aValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,17 +108,17 @@ namespace XSLT
|
||||
return "Not Found:";// + streamName;
|
||||
}
|
||||
//The first four byte are the length of the uncompressed data
|
||||
Sequence<sal_Int8> pLength(4);
|
||||
Sequence<sal_Int8> aLength(4);
|
||||
Reference<XSeekable> xSeek(subStream, UNO_QUERY);
|
||||
xSeek->seek(0);
|
||||
//Get the uncompressed length
|
||||
int readbytes = subStream->readBytes(pLength, 4);
|
||||
int readbytes = subStream->readBytes(aLength, 4);
|
||||
if (4 != readbytes)
|
||||
{
|
||||
return "Can not read the length.";
|
||||
}
|
||||
int oleLength = (pLength[0] << 0) + (pLength[1] << 8)
|
||||
+ (pLength[2] << 16) + (pLength[3] << 24);
|
||||
int oleLength = (aLength[0] << 0) + (aLength[1] << 8)
|
||||
+ (aLength[2] << 16) + (aLength[3] << 24);
|
||||
Sequence<sal_Int8> content(oleLength);
|
||||
//Read all bytes. The compressed length should less then the uncompressed length
|
||||
readbytes = subStream->readBytes(content, oleLength);
|
||||
|
@ -1615,10 +1615,10 @@ const FormulaToken* FormulaTokenIterator::PeekNextOperator()
|
||||
}
|
||||
if (!t && maStack.size() > 1)
|
||||
{
|
||||
FormulaTokenIterator::Item pHere = maStack.back();
|
||||
FormulaTokenIterator::Item aHere = maStack.back();
|
||||
maStack.pop_back();
|
||||
t = PeekNextOperator();
|
||||
maStack.push_back(pHere);
|
||||
maStack.push_back(aHere);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ int main(int argc, char **argv)
|
||||
{
|
||||
try
|
||||
{
|
||||
const std::string pLang("-lang");
|
||||
const std::string pModule("-mod");
|
||||
const std::string pDir("-dir");
|
||||
const std::string aLang("-lang");
|
||||
const std::string aModule("-mod");
|
||||
const std::string aDir("-dir");
|
||||
|
||||
std::string lang;
|
||||
std::string module;
|
||||
@ -30,19 +30,19 @@ int main(int argc, char **argv)
|
||||
|
||||
bool error = false;
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (pLang.compare(argv[i]) == 0) {
|
||||
if (aLang.compare(argv[i]) == 0) {
|
||||
if (i + 1 < argc) {
|
||||
lang = argv[++i];
|
||||
} else {
|
||||
error = true;
|
||||
}
|
||||
} else if (pModule.compare(argv[i]) == 0) {
|
||||
} else if (aModule.compare(argv[i]) == 0) {
|
||||
if (i + 1 < argc) {
|
||||
module = argv[++i];
|
||||
} else {
|
||||
error = true;
|
||||
}
|
||||
} else if (pDir.compare(argv[i]) == 0) {
|
||||
} else if (aDir.compare(argv[i]) == 0) {
|
||||
if (i + 1 < argc) {
|
||||
dir = argv[++i];
|
||||
} else {
|
||||
|
@ -954,43 +954,43 @@ void HwpReader::makeMasterStyles()
|
||||
|
||||
int i;
|
||||
int nMax = hwpfile.getMaxSettedPage();
|
||||
std::deque<PageSetting> pSet(nMax + 1);
|
||||
std::deque<PageSetting> aSet(nMax + 1);
|
||||
|
||||
for( i = 0 ; i < hwpfile.getPageNumberCount() ; i++ )
|
||||
{
|
||||
ShowPageNum *pn = hwpfile.getPageNumber(i);
|
||||
pSet[pn->m_nPageNumber].pagenumber = pn;
|
||||
pSet[pn->m_nPageNumber].bIsSet = true;
|
||||
aSet[pn->m_nPageNumber].pagenumber = pn;
|
||||
aSet[pn->m_nPageNumber].bIsSet = true;
|
||||
}
|
||||
for( i = 0 ; i < hwpfile.getHeaderFooterCount() ; i++ )
|
||||
{
|
||||
HeaderFooter* hf = hwpfile.getHeaderFooter(i);
|
||||
pSet[hf->m_nPageNumber].bIsSet = true;
|
||||
aSet[hf->m_nPageNumber].bIsSet = true;
|
||||
if( hf->type == 0 ) // header
|
||||
{
|
||||
switch( hf->where )
|
||||
{
|
||||
case 0 :
|
||||
pSet[hf->m_nPageNumber].header = hf;
|
||||
pSet[hf->m_nPageNumber].header_even = nullptr;
|
||||
pSet[hf->m_nPageNumber].header_odd = nullptr;
|
||||
aSet[hf->m_nPageNumber].header = hf;
|
||||
aSet[hf->m_nPageNumber].header_even = nullptr;
|
||||
aSet[hf->m_nPageNumber].header_odd = nullptr;
|
||||
break;
|
||||
case 1:
|
||||
pSet[hf->m_nPageNumber].header_even = hf;
|
||||
if( pSet[hf->m_nPageNumber].header )
|
||||
aSet[hf->m_nPageNumber].header_even = hf;
|
||||
if( aSet[hf->m_nPageNumber].header )
|
||||
{
|
||||
pSet[hf->m_nPageNumber].header_odd =
|
||||
pSet[hf->m_nPageNumber].header;
|
||||
pSet[hf->m_nPageNumber].header = nullptr;
|
||||
aSet[hf->m_nPageNumber].header_odd =
|
||||
aSet[hf->m_nPageNumber].header;
|
||||
aSet[hf->m_nPageNumber].header = nullptr;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
pSet[hf->m_nPageNumber].header_odd = hf;
|
||||
if( pSet[hf->m_nPageNumber].header )
|
||||
aSet[hf->m_nPageNumber].header_odd = hf;
|
||||
if( aSet[hf->m_nPageNumber].header )
|
||||
{
|
||||
pSet[hf->m_nPageNumber].header_even =
|
||||
pSet[hf->m_nPageNumber].header;
|
||||
pSet[hf->m_nPageNumber].header = nullptr;
|
||||
aSet[hf->m_nPageNumber].header_even =
|
||||
aSet[hf->m_nPageNumber].header;
|
||||
aSet[hf->m_nPageNumber].header = nullptr;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1000,26 +1000,26 @@ void HwpReader::makeMasterStyles()
|
||||
switch( hf->where )
|
||||
{
|
||||
case 0 :
|
||||
pSet[hf->m_nPageNumber].footer = hf;
|
||||
pSet[hf->m_nPageNumber].footer_even = nullptr;
|
||||
pSet[hf->m_nPageNumber].footer_odd = nullptr;
|
||||
aSet[hf->m_nPageNumber].footer = hf;
|
||||
aSet[hf->m_nPageNumber].footer_even = nullptr;
|
||||
aSet[hf->m_nPageNumber].footer_odd = nullptr;
|
||||
break;
|
||||
case 1:
|
||||
pSet[hf->m_nPageNumber].footer_even = hf;
|
||||
if( pSet[hf->m_nPageNumber].footer )
|
||||
aSet[hf->m_nPageNumber].footer_even = hf;
|
||||
if( aSet[hf->m_nPageNumber].footer )
|
||||
{
|
||||
pSet[hf->m_nPageNumber].footer_odd =
|
||||
pSet[hf->m_nPageNumber].footer;
|
||||
pSet[hf->m_nPageNumber].footer = nullptr;
|
||||
aSet[hf->m_nPageNumber].footer_odd =
|
||||
aSet[hf->m_nPageNumber].footer;
|
||||
aSet[hf->m_nPageNumber].footer = nullptr;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
pSet[hf->m_nPageNumber].footer_odd = hf;
|
||||
if( pSet[hf->m_nPageNumber].footer )
|
||||
aSet[hf->m_nPageNumber].footer_odd = hf;
|
||||
if( aSet[hf->m_nPageNumber].footer )
|
||||
{
|
||||
pSet[hf->m_nPageNumber].footer_even =
|
||||
pSet[hf->m_nPageNumber].footer;
|
||||
pSet[hf->m_nPageNumber].footer = nullptr;
|
||||
aSet[hf->m_nPageNumber].footer_even =
|
||||
aSet[hf->m_nPageNumber].footer;
|
||||
aSet[hf->m_nPageNumber].footer = nullptr;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1046,47 +1046,47 @@ void HwpReader::makeMasterStyles()
|
||||
rstartEl("style:master-page", rList);
|
||||
pList->clear();
|
||||
|
||||
if( pSet[i].bIsSet ) /* If you've changed the current setting */
|
||||
if( aSet[i].bIsSet ) /* If you've changed the current setting */
|
||||
{
|
||||
if( !pSet[i].pagenumber ){
|
||||
if( !aSet[i].pagenumber ){
|
||||
if( pPrevSet && pPrevSet->pagenumber )
|
||||
pSet[i].pagenumber = pPrevSet->pagenumber;
|
||||
aSet[i].pagenumber = pPrevSet->pagenumber;
|
||||
}
|
||||
if( pSet[i].pagenumber )
|
||||
if( aSet[i].pagenumber )
|
||||
{
|
||||
if( pSet[i].pagenumber->where == 7 && pSet[i].header )
|
||||
if( aSet[i].pagenumber->where == 7 && aSet[i].header )
|
||||
{
|
||||
pSet[i].header_even = pSet[i].header;
|
||||
pSet[i].header_odd = pSet[i].header;
|
||||
pSet[i].header = nullptr;
|
||||
aSet[i].header_even = aSet[i].header;
|
||||
aSet[i].header_odd = aSet[i].header;
|
||||
aSet[i].header = nullptr;
|
||||
}
|
||||
if( pSet[i].pagenumber->where == 8 && pSet[i].footer )
|
||||
if( aSet[i].pagenumber->where == 8 && aSet[i].footer )
|
||||
{
|
||||
pSet[i].footer_even = pSet[i].footer;
|
||||
pSet[i].footer_odd = pSet[i].footer;
|
||||
pSet[i].footer = nullptr;
|
||||
aSet[i].footer_even = aSet[i].footer;
|
||||
aSet[i].footer_odd = aSet[i].footer;
|
||||
aSet[i].footer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if( !pSet[i].header_even && pPrevSet && pPrevSet->header_even )
|
||||
if( !aSet[i].header_even && pPrevSet && pPrevSet->header_even )
|
||||
{
|
||||
pSet[i].header_even = pPrevSet->header_even;
|
||||
aSet[i].header_even = pPrevSet->header_even;
|
||||
}
|
||||
if( !pSet[i].header_odd && pPrevSet && pPrevSet->header_odd )
|
||||
if( !aSet[i].header_odd && pPrevSet && pPrevSet->header_odd )
|
||||
{
|
||||
pSet[i].header_odd = pPrevSet->header_odd;
|
||||
aSet[i].header_odd = pPrevSet->header_odd;
|
||||
}
|
||||
if( !pSet[i].footer_even && pPrevSet && pPrevSet->footer_even )
|
||||
if( !aSet[i].footer_even && pPrevSet && pPrevSet->footer_even )
|
||||
{
|
||||
pSet[i].footer_even = pPrevSet->footer_even;
|
||||
aSet[i].footer_even = pPrevSet->footer_even;
|
||||
}
|
||||
if( !pSet[i].footer_odd && pPrevSet && pPrevSet->footer_odd )
|
||||
if( !aSet[i].footer_odd && pPrevSet && pPrevSet->footer_odd )
|
||||
{
|
||||
pSet[i].footer_odd = pPrevSet->footer_odd;
|
||||
aSet[i].footer_odd = pPrevSet->footer_odd;
|
||||
}
|
||||
|
||||
pPage = &pSet[i];
|
||||
pPrevSet = &pSet[i];
|
||||
pPage = &aSet[i];
|
||||
pPrevSet = &aSet[i];
|
||||
}
|
||||
else if( pPrevSet ) /* If the previous setting exists */
|
||||
{
|
||||
|
@ -64,8 +64,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
jfw::JavaInfoGuard pInfo;
|
||||
errcode = jfw_getSelectedJRE(&pInfo.info);
|
||||
jfw::JavaInfoGuard aInfo;
|
||||
errcode = jfw_getSelectedJRE(&aInfo.info);
|
||||
|
||||
if (errcode != JFW_E_NONE && errcode != JFW_E_INVALID_SETTINGS)
|
||||
{
|
||||
@ -73,19 +73,19 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pInfo.info == nullptr)
|
||||
if (aInfo.info == nullptr)
|
||||
{
|
||||
if (!findAndSelect(&pInfo.info))
|
||||
if (!findAndSelect(&aInfo.info))
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//check if the JRE was not uninstalled
|
||||
sal_Bool bExist = false;
|
||||
errcode = jfw_existJRE(pInfo.info, &bExist);
|
||||
errcode = jfw_existJRE(aInfo.info, &bExist);
|
||||
if (errcode == JFW_E_NONE)
|
||||
{
|
||||
if (!bExist && !findAndSelect(&pInfo.info))
|
||||
if (!bExist && !findAndSelect(&aInfo.info))
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
@ -95,7 +95,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
}
|
||||
}
|
||||
|
||||
OString sPaths = getLD_LIBRARY_PATH(pInfo.info->arVendorData);
|
||||
OString sPaths = getLD_LIBRARY_PATH(aInfo.info->arVendorData);
|
||||
fprintf(stdout, "%s\n", sPaths.getStr());
|
||||
}
|
||||
catch (const std::exception&)
|
||||
|
@ -169,8 +169,8 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile
|
||||
file->Extract();
|
||||
|
||||
XMLHashMap* aXMLStrHM = file->GetStrings();
|
||||
static ResData pResData("","");
|
||||
pResData.sResTyp = "help";
|
||||
static ResData s_ResData("","");
|
||||
s_ResData.sResTyp = "help";
|
||||
|
||||
std::vector<OString> order = file->getOrder();
|
||||
std::vector<OString>::iterator pos;
|
||||
@ -186,10 +186,10 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile
|
||||
printf("DBG: sHelpFile = %s\n",sHelpFile.getStr() );
|
||||
#endif
|
||||
|
||||
pResData.sGId = posm->first;
|
||||
pResData.sFilename = sHelpFile;
|
||||
s_ResData.sGId = posm->first;
|
||||
s_ResData.sFilename = sHelpFile;
|
||||
|
||||
ProcessHelp( aLangHM , sLanguage, &pResData , pMergeDataFile );
|
||||
ProcessHelp( aLangHM , sLanguage, &s_ResData , pMergeDataFile );
|
||||
}
|
||||
|
||||
file->Write(sPath);
|
||||
|
@ -283,15 +283,15 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
|
||||
uno::Reference< XLinguServiceManager2 > xLngSvcMgr( GetLngSvcMgr_Impl() );
|
||||
uno::Reference< XSpellChecker1 > xSpell;
|
||||
|
||||
OUString rTerm(qTerm);
|
||||
OUString pTerm(qTerm);
|
||||
OUString aRTerm(qTerm);
|
||||
OUString aPTerm(qTerm);
|
||||
CapType ct = CapType::UNKNOWN;
|
||||
sal_Int32 stem = 0;
|
||||
sal_Int32 stem2 = 0;
|
||||
|
||||
sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale );
|
||||
|
||||
if (LinguIsUnspecified( nLanguage) || rTerm.isEmpty())
|
||||
if (LinguIsUnspecified( nLanguage) || aRTerm.isEmpty())
|
||||
return noMeanings;
|
||||
|
||||
if (!hasLocale( rLocale ))
|
||||
@ -363,8 +363,8 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
|
||||
{
|
||||
// convert word to all lower case for searching
|
||||
if (!stem)
|
||||
ct = capitalType(rTerm, pCC);
|
||||
OUString nTerm(makeLowerCase(rTerm, pCC));
|
||||
ct = capitalType(aRTerm, pCC);
|
||||
OUString nTerm(makeLowerCase(aRTerm, pCC));
|
||||
OString aTmp( OU2ENC(nTerm, eEnc) );
|
||||
nmean = pTH->Lookup(aTmp.getStr(),aTmp.getLength(),&pmean);
|
||||
|
||||
@ -378,7 +378,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
|
||||
if (stem)
|
||||
{
|
||||
xTmpRes2 = xSpell->spell( "<?xml?><query type='analyze'><word>" +
|
||||
pTerm + "</word></query>", nLanguage, rProperties );
|
||||
aPTerm + "</word></query>", nLanguage, rProperties );
|
||||
if (xTmpRes2.is())
|
||||
{
|
||||
Sequence<OUString>seq = xTmpRes2->getAlternatives();
|
||||
@ -443,7 +443,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
|
||||
OUString aAlt( cTerm + catst);
|
||||
pStr[i] = aAlt;
|
||||
}
|
||||
Meaning * pMn = new Meaning(rTerm);
|
||||
Meaning * pMn = new Meaning(aRTerm);
|
||||
OUString dTerm(pe->defn,strlen(pe->defn),eEnc );
|
||||
pMn->SetMeaning(dTerm);
|
||||
pMn->SetSynonyms(aStr);
|
||||
@ -471,31 +471,31 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
|
||||
return noMeanings;
|
||||
Reference< XSpellAlternatives > xTmpRes;
|
||||
xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" +
|
||||
rTerm + "</word></query>", nLanguage, rProperties );
|
||||
aRTerm + "</word></query>", nLanguage, rProperties );
|
||||
if (xTmpRes.is())
|
||||
{
|
||||
Sequence<OUString>seq = xTmpRes->getAlternatives();
|
||||
if (seq.getLength() > 0)
|
||||
{
|
||||
rTerm = seq[0]; // XXX Use only the first stem
|
||||
aRTerm = seq[0]; // XXX Use only the first stem
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// stem the last word of the synonym (for categories after affixation)
|
||||
rTerm = rTerm.trim();
|
||||
sal_Int32 pos = rTerm.lastIndexOf(' ');
|
||||
aRTerm = aRTerm.trim();
|
||||
sal_Int32 pos = aRTerm.lastIndexOf(' ');
|
||||
if (!pos)
|
||||
return noMeanings;
|
||||
xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" +
|
||||
rTerm.copy(pos + 1) + "</word></query>", nLanguage, rProperties );
|
||||
aRTerm.copy(pos + 1) + "</word></query>", nLanguage, rProperties );
|
||||
if (xTmpRes.is())
|
||||
{
|
||||
Sequence<OUString>seq = xTmpRes->getAlternatives();
|
||||
if (seq.getLength() > 0)
|
||||
{
|
||||
pTerm = rTerm.copy(pos + 1);
|
||||
rTerm = rTerm.copy(0, pos + 1) + seq[0];
|
||||
aPTerm = aRTerm.copy(pos + 1);
|
||||
aRTerm = aRTerm.copy(0, pos + 1) + seq[0];
|
||||
#if 0
|
||||
for (int i = 0; i < seq.getLength(); i++)
|
||||
{
|
||||
|
@ -1656,12 +1656,12 @@ XFColumnSep* LwpLayout::GetColumnSep()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LwpBorderStuff& pBorderStuff = pLayoutGutters->GetBorderStuff();
|
||||
LwpBorderStuff& rBorderStuff = pLayoutGutters->GetBorderStuff();
|
||||
|
||||
LwpBorderStuff::BorderType eType = LwpBorderStuff::LEFT;
|
||||
LwpColor aColor = pBorderStuff.GetSideColor(eType);
|
||||
double fWidth = pBorderStuff.GetSideWidth(eType);
|
||||
//sal_uInt16 nType = pBorderStuff->GetSideType(eType);
|
||||
LwpColor aColor = rBorderStuff.GetSideColor(eType);
|
||||
double fWidth = rBorderStuff.GetSideWidth(eType);
|
||||
//sal_uInt16 nType = rBorderStuff->GetSideType(eType);
|
||||
|
||||
XFColumnSep* pColumnSep = new XFColumnSep();
|
||||
XFColor aXFColor(aColor.To24Color());
|
||||
|
@ -1333,13 +1333,13 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
|
||||
|
||||
std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""),
|
||||
sPattern(rtl::OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()),
|
||||
pNamePattern(rtl::OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr());
|
||||
procNamePattern(rtl::OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr());
|
||||
|
||||
|
||||
try {
|
||||
boost::scoped_ptr< sql::ResultSet> rset( meta->getProcedures(cat,
|
||||
sPattern.compare("")? sPattern:wild,
|
||||
pNamePattern.compare("")? pNamePattern:wild));
|
||||
procNamePattern.compare("")? procNamePattern:wild));
|
||||
|
||||
rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
|
||||
sql::ResultSetMetaData * rs_meta = rset->getMetaData();
|
||||
@ -1631,8 +1631,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
|
||||
|
||||
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
|
||||
const Any& primaryCatalog,
|
||||
const rtl::OUString& primarySchema,
|
||||
const rtl::OUString& primaryTable,
|
||||
const rtl::OUString& primarySchema_,
|
||||
const rtl::OUString& primaryTable_,
|
||||
const Any& foreignCatalog,
|
||||
const rtl::OUString& foreignSchema,
|
||||
const rtl::OUString& foreignTable)
|
||||
@ -1644,14 +1644,14 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
|
||||
|
||||
std::string primaryCat(primaryCatalog.hasValue()? rtl::OUStringToOString(getStringFromAny(primaryCatalog), m_rConnection.getConnectionEncoding()).getStr():""),
|
||||
foreignCat(foreignCatalog.hasValue()? rtl::OUStringToOString(getStringFromAny(foreignCatalog), m_rConnection.getConnectionEncoding()).getStr():""),
|
||||
pSchema(rtl::OUStringToOString(primarySchema, m_rConnection.getConnectionEncoding()).getStr()),
|
||||
pTable(rtl::OUStringToOString(primaryTable, m_rConnection.getConnectionEncoding()).getStr()),
|
||||
primarySchema(rtl::OUStringToOString(primarySchema_, m_rConnection.getConnectionEncoding()).getStr()),
|
||||
primaryTable(rtl::OUStringToOString(primaryTable_, m_rConnection.getConnectionEncoding()).getStr()),
|
||||
fSchema(rtl::OUStringToOString(foreignSchema, m_rConnection.getConnectionEncoding()).getStr()),
|
||||
fTable(rtl::OUStringToOString(foreignTable, m_rConnection.getConnectionEncoding()).getStr());
|
||||
|
||||
try {
|
||||
rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding();
|
||||
boost::scoped_ptr< sql::ResultSet> rset( meta->getCrossReference(primaryCat, pSchema, pTable, foreignCat, fSchema, fTable));
|
||||
boost::scoped_ptr< sql::ResultSet> rset( meta->getCrossReference(primaryCat, primarySchema, primaryTable, foreignCat, fSchema, fTable));
|
||||
sql::ResultSetMetaData * rs_meta = rset->getMetaData();
|
||||
sal_uInt32 columns = rs_meta->getColumnCount();
|
||||
while (rset->next()) {
|
||||
|
@ -785,8 +785,8 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie
|
||||
{
|
||||
OUStringBuffer buf;
|
||||
::sax::Converter::convertDuration( buf, aDuration );
|
||||
OUString pDuration = buf.makeStringAndClear();
|
||||
writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), pDuration );
|
||||
OUString aDurationStr = buf.makeStringAndClear();
|
||||
writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), aDurationStr );
|
||||
}
|
||||
else if ( ( aprop[n].Value ) >>= aDateTime )
|
||||
writeElement( pAppProps, FSNS( XML_vt, XML_filetime ), aDateTime );
|
||||
|
@ -83,8 +83,8 @@ void LayoutAtom::dump(int level)
|
||||
OSL_TRACE( "level = %d - %s of type %s", level,
|
||||
OUSTRING_TO_CSTR( msName ),
|
||||
typeid(*this).name() );
|
||||
const std::vector<LayoutAtomPtr>& pChildren=getChildren();
|
||||
std::for_each( pChildren.begin(), pChildren.end(),
|
||||
const std::vector<LayoutAtomPtr>& rChildren=getChildren();
|
||||
std::for_each( rChildren.begin(), rChildren.end(),
|
||||
[level] (LayoutAtomPtr const& pAtom) { pAtom->dump(level + 1); } );
|
||||
}
|
||||
|
||||
@ -581,8 +581,8 @@ public:
|
||||
|
||||
void ShapeCreationVisitor::defaultVisit(LayoutAtom& rAtom)
|
||||
{
|
||||
const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren();
|
||||
std::for_each( pChildren.begin(), pChildren.end(),
|
||||
const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren();
|
||||
std::for_each( rChildren.begin(), rChildren.end(),
|
||||
[this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } );
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ void ShapeCreationVisitor::visit(AlgAtom& rAtom)
|
||||
|
||||
void ShapeCreationVisitor::visit(ForEachAtom& rAtom)
|
||||
{
|
||||
const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren();
|
||||
const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren();
|
||||
|
||||
sal_Int32 nChildren=1;
|
||||
if( rAtom.iterator().mnPtType == XML_node )
|
||||
@ -607,7 +607,7 @@ void ShapeCreationVisitor::visit(ForEachAtom& rAtom)
|
||||
// attribute that is contained in diagram's
|
||||
// getPointsPresNameMap()
|
||||
ShallowPresNameVisitor aVisitor(mrDgm);
|
||||
std::for_each( pChildren.begin(), pChildren.end(),
|
||||
std::for_each( rChildren.begin(), rChildren.end(),
|
||||
[&] (LayoutAtomPtr const& pAtom) { pAtom->accept(aVisitor); } );
|
||||
nChildren = aVisitor.getCount();
|
||||
}
|
||||
@ -621,7 +621,7 @@ void ShapeCreationVisitor::visit(ForEachAtom& rAtom)
|
||||
for( mnCurrIdx=0; mnCurrIdx<nCnt && nStep>0; mnCurrIdx+=nStep )
|
||||
{
|
||||
// TODO there is likely some conditions
|
||||
std::for_each( pChildren.begin(), pChildren.end(),
|
||||
std::for_each( rChildren.begin(), rChildren.end(),
|
||||
[this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } );
|
||||
}
|
||||
|
||||
@ -688,8 +688,8 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
|
||||
void ShapeLayoutingVisitor::defaultVisit(LayoutAtom& rAtom)
|
||||
{
|
||||
// visit all children, one of them needs to be the layout algorithm
|
||||
const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren();
|
||||
std::for_each( pChildren.begin(), pChildren.end(),
|
||||
const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren();
|
||||
std::for_each( rChildren.begin(), rChildren.end(),
|
||||
[this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } );
|
||||
}
|
||||
|
||||
@ -727,8 +727,8 @@ void ShallowPresNameVisitor::defaultVisit(LayoutAtom& rAtom)
|
||||
{
|
||||
// visit all children, at least one of them needs to have proper
|
||||
// name set
|
||||
const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren();
|
||||
std::for_each( pChildren.begin(), pChildren.end(),
|
||||
const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren();
|
||||
std::for_each( rChildren.begin(), rChildren.end(),
|
||||
[this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } );
|
||||
}
|
||||
|
||||
|
@ -73,9 +73,9 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
|
||||
|
||||
css::beans::PropertyValue Effect::getEffect()
|
||||
{
|
||||
css::beans::PropertyValue pRet;
|
||||
css::beans::PropertyValue aRet;
|
||||
if( msName.isEmpty() )
|
||||
return pRet;
|
||||
return aRet;
|
||||
|
||||
css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() );
|
||||
sal_uInt32 i = 0;
|
||||
@ -86,10 +86,10 @@ css::beans::PropertyValue Effect::getEffect()
|
||||
i++;
|
||||
}
|
||||
|
||||
pRet.Name = msName;
|
||||
pRet.Value = css::uno::Any( aSeq );
|
||||
aRet.Name = msName;
|
||||
aRet.Value = css::uno::Any( aSeq );
|
||||
|
||||
return pRet;
|
||||
return aRet;
|
||||
}
|
||||
|
||||
} // namespace drawingml
|
||||
|
@ -772,9 +772,9 @@ bool ArtisticEffectProperties::isEmpty() const
|
||||
|
||||
css::beans::PropertyValue ArtisticEffectProperties::getEffect()
|
||||
{
|
||||
css::beans::PropertyValue pRet;
|
||||
css::beans::PropertyValue aRet;
|
||||
if( msName.isEmpty() )
|
||||
return pRet;
|
||||
return aRet;
|
||||
|
||||
css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() + 1 );
|
||||
sal_uInt32 i = 0;
|
||||
@ -797,10 +797,10 @@ css::beans::PropertyValue ArtisticEffectProperties::getEffect()
|
||||
aSeq[i].Value = uno::makeAny( aGraphicSeq );
|
||||
}
|
||||
|
||||
pRet.Name = msName;
|
||||
pRet.Value = css::uno::Any( aSeq );
|
||||
aRet.Name = msName;
|
||||
aRet.Value = css::uno::Any( aSeq );
|
||||
|
||||
return pRet;
|
||||
return aRet;
|
||||
}
|
||||
|
||||
void ArtisticEffectProperties::assignUsed( const ArtisticEffectProperties& rSourceProps )
|
||||
|
@ -1221,8 +1221,8 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
|
||||
return xShape;
|
||||
|
||||
// Stream in which to place the rendered shape
|
||||
SvMemoryStream pTempStream;
|
||||
Reference < io::XStream > xStream( new utl::OStreamWrapper( pTempStream ) );
|
||||
SvMemoryStream aTempStream;
|
||||
Reference < io::XStream > xStream( new utl::OStreamWrapper( aTempStream ) );
|
||||
Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() );
|
||||
|
||||
// Rendering format
|
||||
@ -1258,11 +1258,11 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
|
||||
xGraphicExporter->setSourceDocument( xSourceDoc );
|
||||
xGraphicExporter->filter( aDescriptor );
|
||||
|
||||
pTempStream.Seek( STREAM_SEEK_TO_BEGIN );
|
||||
aTempStream.Seek( STREAM_SEEK_TO_BEGIN );
|
||||
|
||||
Graphic aGraphic;
|
||||
GraphicFilter aFilter( false );
|
||||
if ( aFilter.ImportGraphic( aGraphic, "", pTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK )
|
||||
if ( aFilter.ImportGraphic( aGraphic, "", aTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK )
|
||||
{
|
||||
SAL_WARN( "oox.drawingml", OSL_THIS_FUNC
|
||||
<< "Unable to import rendered stream into graphic object" );
|
||||
@ -1409,10 +1409,10 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >&
|
||||
|
||||
void Shape::putPropertyToGrabBag( const OUString& sPropertyName, const Any& aPropertyValue )
|
||||
{
|
||||
PropertyValue pNewProperty;
|
||||
pNewProperty.Name = sPropertyName;
|
||||
pNewProperty.Value = aPropertyValue;
|
||||
putPropertyToGrabBag( pNewProperty );
|
||||
PropertyValue aNewProperty;
|
||||
aNewProperty.Name = sPropertyName;
|
||||
aNewProperty.Value = aPropertyValue;
|
||||
putPropertyToGrabBag( aNewProperty );
|
||||
}
|
||||
|
||||
void Shape::putPropertyToGrabBag( const PropertyValue& pProperty )
|
||||
|
@ -519,8 +519,8 @@ void TextParagraphProperties::dump() const
|
||||
xStart->gotoEnd( true );
|
||||
Reference< XPropertySet > xPropSet( xRange, UNO_QUERY );
|
||||
pushToPropSet( nullptr, xPropSet, emptyMap, nullptr, false, 0 );
|
||||
PropertySet pSet( xPropSet );
|
||||
pSet.dump();
|
||||
PropertySet aPropSet( xPropSet );
|
||||
aPropSet.dump();
|
||||
}
|
||||
#endif
|
||||
} }
|
||||
|
@ -1824,12 +1824,12 @@ void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXProp
|
||||
FSEND );
|
||||
}
|
||||
|
||||
OUString pAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth );
|
||||
OUString aAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth );
|
||||
|
||||
if (!pAutoNumType.isEmpty())
|
||||
if (!aAutoNumType.isEmpty())
|
||||
{
|
||||
mpFS->singleElementNS(XML_a, XML_buAutoNum,
|
||||
XML_type, OUStringToOString(pAutoNumType, RTL_TEXTENCODING_UTF8).getStr(),
|
||||
XML_type, OUStringToOString(aAutoNumType, RTL_TEXTENCODING_UTF8).getStr(),
|
||||
XML_startAt, nStartWith > 1 ? IS(nStartWith) : nullptr,
|
||||
FSEND);
|
||||
}
|
||||
|
@ -433,9 +433,9 @@ namespace oox { namespace ppt {
|
||||
//xParentNode
|
||||
if( isCurrentElement( mnElement ) )
|
||||
{
|
||||
NodePropertyMap & pProps(mpNode->getNodeProperties());
|
||||
pProps[ NP_DIRECTION ] = makeAny( mnDir == XML_cw );
|
||||
pProps[ NP_COLORINTERPOLATION ] = makeAny( mnColorSpace == XML_hsl ? AnimationColorSpace::HSL : AnimationColorSpace::RGB );
|
||||
NodePropertyMap & rProps(mpNode->getNodeProperties());
|
||||
rProps[ NP_DIRECTION ] = makeAny( mnDir == XML_cw );
|
||||
rProps[ NP_COLORINTERPOLATION ] = makeAny( mnColorSpace == XML_hsl ? AnimationColorSpace::HSL : AnimationColorSpace::RGB );
|
||||
const GraphicHelper& rGraphicHelper = getFilter().getGraphicHelper();
|
||||
if( maToClr.isUsed() )
|
||||
mpNode->setTo( Any( maToClr.getColor( rGraphicHelper ) ) );
|
||||
|
@ -703,8 +703,8 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
|
||||
rtl::Bootstrap::expandMacros(url);
|
||||
OUString path;
|
||||
osl::FileBase::getSystemPathFromFileURL(url,path);
|
||||
ds_device pSelectedDevice = getDeviceSelection(path, bForceEvaluation);
|
||||
pDeviceId = pSelectedDevice.aDeviceID;
|
||||
ds_device aSelectedDevice = getDeviceSelection(path, bForceEvaluation);
|
||||
pDeviceId = aSelectedDevice.aDeviceID;
|
||||
|
||||
}
|
||||
|
||||
|
@ -170,11 +170,11 @@ void fillStruct(
|
||||
for( int i = 0 ; i < remainingPosInitialisers && i < nMembers ; i ++ )
|
||||
{
|
||||
const int tupleIndex = state.getCntConsumed();
|
||||
const OUString pMemberName (pCompType->ppMemberNames[i]);
|
||||
state.setInitialised(pMemberName, tupleIndex);
|
||||
const OUString& rMemberName (pCompType->ppMemberNames[i]);
|
||||
state.setInitialised(rMemberName, tupleIndex);
|
||||
PyObject *element = PyTuple_GetItem( initializer, tupleIndex );
|
||||
Any a = runtime.pyObject2Any( element, ACCEPT_UNO_ANY );
|
||||
inv->setValue( pMemberName, a );
|
||||
inv->setValue( rMemberName, a );
|
||||
}
|
||||
}
|
||||
if ( PyTuple_Size( initializer ) > 0 )
|
||||
|
@ -1257,20 +1257,12 @@ namespace osl_FileStatus
|
||||
createTestDirectory( aTmpName3 );
|
||||
createTestFile( aTmpName4 );
|
||||
|
||||
Directory pDir( aTmpName3 );
|
||||
nError1 = pDir.open();
|
||||
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
|
||||
nError1 = pDir.getNextItem( rItem );
|
||||
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
|
||||
pDir.close();
|
||||
/*
|
||||
Directory aDir( aTmpName3 );
|
||||
nError1 = aDir.open();
|
||||
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
|
||||
nError1 = aDir.getNextItem( rItem, 0 );
|
||||
nError1 = aDir.getNextItem( rItem );
|
||||
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
|
||||
aDir.close();
|
||||
*/
|
||||
}
|
||||
|
||||
void tearDown() override
|
||||
|
@ -6086,18 +6086,18 @@ void Test::testFormulaWizardSubformula()
|
||||
m_pDoc->SetString(ScAddress(1,1,0), "=1/0"); // B2
|
||||
m_pDoc->SetString(ScAddress(1,2,0), "=gibberish"); // B3
|
||||
|
||||
ScSimpleFormulaCalculator pFCell1( m_pDoc, ScAddress(0,0,0), "=B1:B3", true );
|
||||
sal_uInt16 nErrCode = pFCell1.GetErrCode();
|
||||
CPPUNIT_ASSERT( nErrCode == 0 || pFCell1.IsMatrix() );
|
||||
CPPUNIT_ASSERT_EQUAL( OUString("{1;#DIV/0!;#NAME?}"), pFCell1.GetString().getString() );
|
||||
ScSimpleFormulaCalculator aFCell1( m_pDoc, ScAddress(0,0,0), "=B1:B3", true );
|
||||
sal_uInt16 nErrCode = aFCell1.GetErrCode();
|
||||
CPPUNIT_ASSERT( nErrCode == 0 || aFCell1.IsMatrix() );
|
||||
CPPUNIT_ASSERT_EQUAL( OUString("{1;#DIV/0!;#NAME?}"), aFCell1.GetString().getString() );
|
||||
|
||||
m_pDoc->SetString(ScAddress(1,0,0), "=NA()"); // B1
|
||||
m_pDoc->SetString(ScAddress(1,1,0), "2"); // B2
|
||||
m_pDoc->SetString(ScAddress(1,2,0), "=1+2"); // B3
|
||||
ScSimpleFormulaCalculator pFCell2( m_pDoc, ScAddress(0,0,0), "=B1:B3", true );
|
||||
nErrCode = pFCell2.GetErrCode();
|
||||
CPPUNIT_ASSERT( nErrCode == 0 || pFCell2.IsMatrix() );
|
||||
CPPUNIT_ASSERT_EQUAL( OUString("{#N/A;2;3}"), pFCell2.GetString().getString() );
|
||||
ScSimpleFormulaCalculator aFCell2( m_pDoc, ScAddress(0,0,0), "=B1:B3", true );
|
||||
nErrCode = aFCell2.GetErrCode();
|
||||
CPPUNIT_ASSERT( nErrCode == 0 || aFCell2.IsMatrix() );
|
||||
CPPUNIT_ASSERT_EQUAL( OUString("{#N/A;2;3}"), aFCell2.GetString().getString() );
|
||||
|
||||
m_pDoc->DeleteTab(0);
|
||||
}
|
||||
|
@ -1110,9 +1110,9 @@ public:
|
||||
WalkElementBlocksMultipleValues(bool bTextAsZero, const std::vector<std::unique_ptr<Op>>& aOp) :
|
||||
maOp(aOp), mbFirst(true), mbTextAsZero(bTextAsZero)
|
||||
{
|
||||
for (const auto& pOp : maOp)
|
||||
for (const auto& rpOp : maOp)
|
||||
{
|
||||
maRes.emplace_back(pOp->mInitVal, pOp->mInitVal, 0);
|
||||
maRes.emplace_back(rpOp->mInitVal, rpOp->mInitVal, 0);
|
||||
}
|
||||
maRes.emplace_back(0.0, 0.0, 0); // count
|
||||
}
|
||||
|
@ -661,12 +661,12 @@ sal_uInt32 XclExpPaletteImpl::GetLeastUsedListColor() const
|
||||
|
||||
for( sal_uInt32 nIdx = 0, nCount = mxColorList->size(); nIdx < nCount; ++nIdx )
|
||||
{
|
||||
XclListColor& pEntry = *mxColorList->at( nIdx ).get();
|
||||
XclListColor& rEntry = *mxColorList->at( nIdx ).get();
|
||||
// ignore the base colors
|
||||
if( !pEntry.IsBaseColor() && (pEntry.GetWeighting() < nMinW) )
|
||||
if( !rEntry.IsBaseColor() && (rEntry.GetWeighting() < nMinW) )
|
||||
{
|
||||
nFound = nIdx;
|
||||
nMinW = pEntry.GetWeighting();
|
||||
nMinW = rEntry.GetWeighting();
|
||||
}
|
||||
}
|
||||
return nFound;
|
||||
|
@ -2146,20 +2146,20 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
|
||||
else
|
||||
{
|
||||
comphelper::ThreadPool &rPool = comphelper::ThreadPool::getSharedOptimalPool();
|
||||
std::vector<RowFinalizeTask*> pTasks(nThreads, nullptr);
|
||||
std::vector<RowFinalizeTask*> aTasks(nThreads, nullptr);
|
||||
for ( size_t i = 0; i < nThreads; i++ )
|
||||
pTasks[ i ] = new RowFinalizeTask( rColXFIndexes, i == 0 );
|
||||
aTasks[ i ] = new RowFinalizeTask( rColXFIndexes, i == 0 );
|
||||
|
||||
RowMap::iterator itr, itrBeg = maRowMap.begin(), itrEnd = maRowMap.end();
|
||||
size_t nIdx = 0;
|
||||
for ( itr = itrBeg; itr != itrEnd; ++itr, ++nIdx )
|
||||
pTasks[ nIdx % nThreads ]->push_back( itr->second.get() );
|
||||
aTasks[ nIdx % nThreads ]->push_back( itr->second.get() );
|
||||
|
||||
for ( size_t i = 1; i < nThreads; i++ )
|
||||
rPool.pushTask( pTasks[ i ] );
|
||||
rPool.pushTask( aTasks[ i ] );
|
||||
|
||||
// Progress bar updates must be synchronous to avoid deadlock
|
||||
pTasks[0]->doWork();
|
||||
aTasks[0]->doWork();
|
||||
|
||||
rPool.waitUntilEmpty();
|
||||
}
|
||||
|
@ -579,25 +579,25 @@ void ScPivotLayoutDialog::ApplyLabelData(ScDPSaveData& rSaveData)
|
||||
|
||||
for (it = rLabelDataVector.begin(); it != rLabelDataVector.end(); ++it)
|
||||
{
|
||||
const ScDPLabelData& pLabelData = *it->get();
|
||||
const ScDPLabelData& rLabelData = *it->get();
|
||||
|
||||
OUString aUnoName = ScDPUtil::createDuplicateDimensionName(pLabelData.maName, pLabelData.mnDupCount);
|
||||
OUString aUnoName = ScDPUtil::createDuplicateDimensionName(rLabelData.maName, rLabelData.mnDupCount);
|
||||
ScDPSaveDimension* pSaveDimensions = rSaveData.GetExistingDimensionByName(aUnoName);
|
||||
|
||||
if (pSaveDimensions == nullptr)
|
||||
continue;
|
||||
|
||||
pSaveDimensions->SetUsedHierarchy(pLabelData.mnUsedHier);
|
||||
pSaveDimensions->SetShowEmpty(pLabelData.mbShowAll);
|
||||
pSaveDimensions->SetRepeatItemLabels(pLabelData.mbRepeatItemLabels);
|
||||
pSaveDimensions->SetSortInfo(&pLabelData.maSortInfo);
|
||||
pSaveDimensions->SetLayoutInfo(&pLabelData.maLayoutInfo);
|
||||
pSaveDimensions->SetAutoShowInfo(&pLabelData.maShowInfo);
|
||||
pSaveDimensions->SetUsedHierarchy(rLabelData.mnUsedHier);
|
||||
pSaveDimensions->SetShowEmpty(rLabelData.mbShowAll);
|
||||
pSaveDimensions->SetRepeatItemLabels(rLabelData.mbRepeatItemLabels);
|
||||
pSaveDimensions->SetSortInfo(&rLabelData.maSortInfo);
|
||||
pSaveDimensions->SetLayoutInfo(&rLabelData.maLayoutInfo);
|
||||
pSaveDimensions->SetAutoShowInfo(&rLabelData.maShowInfo);
|
||||
|
||||
bool bManualSort = (pLabelData.maSortInfo.Mode == DataPilotFieldSortMode::MANUAL);
|
||||
bool bManualSort = (rLabelData.maSortInfo.Mode == DataPilotFieldSortMode::MANUAL);
|
||||
|
||||
std::vector<ScDPLabelData::Member>::const_iterator itMember;
|
||||
for (itMember = pLabelData.maMembers.begin(); itMember != pLabelData.maMembers.end(); ++itMember)
|
||||
for (itMember = rLabelData.maMembers.begin(); itMember != rLabelData.maMembers.end(); ++itMember)
|
||||
{
|
||||
const ScDPLabelData::Member& rLabelMember = *itMember;
|
||||
ScDPSaveMember* pMember = pSaveDimensions->GetMemberByName(rLabelMember.maName);
|
||||
|
@ -318,9 +318,9 @@ struct OpenCLTester
|
||||
mbOldAutoCalc = mpDoc->GetAutoCalc();
|
||||
mpDoc->SetAutoCalc(false);
|
||||
mpOldCalcConfig = ScInterpreter::GetGlobalConfig();
|
||||
ScCalcConfig pConfig(mpOldCalcConfig);
|
||||
pConfig.mnOpenCLMinimumFormulaGroupSize = 20;
|
||||
ScInterpreter::SetGlobalConfig(pConfig);
|
||||
ScCalcConfig aConfig(mpOldCalcConfig);
|
||||
aConfig.mnOpenCLMinimumFormulaGroupSize = 20;
|
||||
ScInterpreter::SetGlobalConfig(aConfig);
|
||||
|
||||
mpDoc->SetString(ScAddress(0,0,0), "Result:");
|
||||
}
|
||||
|
@ -1186,8 +1186,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
const SfxPoolItem* pItem = nullptr;
|
||||
if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET )
|
||||
{
|
||||
const SfxItemSet& pHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
|
||||
Size aHeaderSize = static_cast<const SvxSizeItem&>(pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize();
|
||||
const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
|
||||
Size aHeaderSize = static_cast<const SvxSizeItem&>(rHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize();
|
||||
aHeaderSize.Height() = (long)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS - aULItem.GetUpper());
|
||||
aHeaderSize.Height() = aHeaderSize.Height() * 100 / mnScale;
|
||||
SvxSetItem aNewHeader( static_cast<const SvxSetItem&>(rStyleSet.Get(ATTR_PAGE_HEADERSET)) );
|
||||
@ -1201,8 +1201,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
const SfxPoolItem* pItem = nullptr;
|
||||
if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET )
|
||||
{
|
||||
const SfxItemSet& pFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
|
||||
Size aFooterSize = static_cast<const SvxSizeItem&>(pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize();
|
||||
const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
|
||||
Size aFooterSize = static_cast<const SvxSizeItem&>(rFooterSet.Get(ATTR_PAGE_SIZE)).GetSize();
|
||||
aFooterSize.Height() = (long)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS - aULItem.GetLower() );
|
||||
aFooterSize.Height() = aFooterSize.Height() * 100 / mnScale;
|
||||
SvxSetItem aNewFooter( static_cast<const SvxSetItem&>(rStyleSet.Get(ATTR_PAGE_FOOTERSET)) );
|
||||
|
@ -251,11 +251,11 @@ void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, const OUSt
|
||||
if (rNewName.isEmpty())
|
||||
return;
|
||||
|
||||
SfxItemPool& pPool(GetPool());
|
||||
sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
|
||||
SfxItemPool& rPool(GetPool());
|
||||
sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD);
|
||||
for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
|
||||
{
|
||||
const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
|
||||
const SfxPoolItem *pItem = rPool.GetItem2(EE_FEATURE_FIELD, nOff);
|
||||
const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem);
|
||||
|
||||
if(pFldItem)
|
||||
@ -295,11 +295,11 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_
|
||||
{
|
||||
bool bNotes = (pPage->GetPageKind() == PK_NOTES);
|
||||
|
||||
SfxItemPool& pPool(GetPool());
|
||||
sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
|
||||
SfxItemPool& rPool(GetPool());
|
||||
sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD);
|
||||
for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
|
||||
{
|
||||
const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
|
||||
const SfxPoolItem *pItem = rPool.GetItem2(EE_FEATURE_FIELD, nOff);
|
||||
const SvxFieldItem* pFldItem;
|
||||
|
||||
if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != nullptr)
|
||||
|
@ -45,9 +45,9 @@ MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObjec
|
||||
|
||||
LoadSettings();
|
||||
|
||||
SfxItemPool & pPool = pObj1->GetObjectItemPool();
|
||||
SfxItemSet aSet1( pPool );
|
||||
SfxItemSet aSet2( pPool );
|
||||
SfxItemPool & rPool = pObj1->GetObjectItemPool();
|
||||
SfxItemSet aSet1( rPool );
|
||||
SfxItemSet aSet2( rPool );
|
||||
|
||||
aSet1.Put(pObj1->GetMergedItemSet());
|
||||
aSet2.Put(pObj2->GetMergedItemSet());
|
||||
|
@ -109,19 +109,19 @@ void FuChar::DoExecute( SfxRequest& rReq )
|
||||
if( nResult == RET_OK )
|
||||
{
|
||||
const SfxItemSet* pOutputSet = pDlg->GetOutputItemSet();
|
||||
SfxItemSet pOtherSet( *pOutputSet );
|
||||
SfxItemSet aOtherSet( *pOutputSet );
|
||||
|
||||
// and now the reverse process
|
||||
const SvxBrushItem* pBrushItem= static_cast<const SvxBrushItem*>(pOtherSet.GetItem( SID_ATTR_BRUSH_CHAR ));
|
||||
const SvxBrushItem* pBrushItem= static_cast<const SvxBrushItem*>(aOtherSet.GetItem( SID_ATTR_BRUSH_CHAR ));
|
||||
|
||||
if ( pBrushItem )
|
||||
{
|
||||
SvxBackgroundColorItem aBackColorItem( pBrushItem->GetColor(), EE_CHAR_BKGCOLOR );
|
||||
pOtherSet.ClearItem( SID_ATTR_BRUSH_CHAR );
|
||||
pOtherSet.Put( aBackColorItem );
|
||||
aOtherSet.ClearItem( SID_ATTR_BRUSH_CHAR );
|
||||
aOtherSet.Put( aBackColorItem );
|
||||
}
|
||||
|
||||
rReq.Done( pOtherSet );
|
||||
rReq.Done( aOtherSet );
|
||||
pArgs = rReq.GetArgs();
|
||||
}
|
||||
}
|
||||
|
@ -342,14 +342,14 @@ void FuMorph::ImpInsertPolygons(
|
||||
long nStartLineWidth = 0;
|
||||
long nEndLineWidth = 0;
|
||||
SdrPageView* pPageView = mpView->GetSdrPageView();
|
||||
SfxItemPool & pPool = pObj1->GetObjectItemPool();
|
||||
SfxItemSet aSet1( pPool,SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END,0 );
|
||||
SfxItemPool & rPool = pObj1->GetObjectItemPool();
|
||||
SfxItemSet aSet1( rPool,SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END,0 );
|
||||
SfxItemSet aSet2( aSet1 );
|
||||
bool bLineColor = false;
|
||||
bool bFillColor = false;
|
||||
bool bLineWidth = false;
|
||||
bool bIgnoreLine = false;
|
||||
bool bIgnoreFill = false;
|
||||
bool bLineColor = false;
|
||||
bool bFillColor = false;
|
||||
bool bLineWidth = false;
|
||||
bool bIgnoreLine = false;
|
||||
bool bIgnoreFill = false;
|
||||
|
||||
aSet1.Put(pObj1->GetMergedItemSet());
|
||||
aSet2.Put(pObj2->GetMergedItemSet());
|
||||
|
@ -86,34 +86,34 @@ namespace
|
||||
std::vector<char> lcl_escapeLineFeeds(const char* const i_pStr)
|
||||
{
|
||||
size_t nLength(strlen(i_pStr));
|
||||
std::vector<char> pBuffer;
|
||||
pBuffer.reserve(2*nLength+1);
|
||||
std::vector<char> aBuffer;
|
||||
aBuffer.reserve(2*nLength+1);
|
||||
|
||||
const char* pRead = i_pStr;
|
||||
while( nLength-- )
|
||||
{
|
||||
if( *pRead == '\r' )
|
||||
{
|
||||
pBuffer.push_back('\\');
|
||||
pBuffer.push_back('r');
|
||||
aBuffer.push_back('\\');
|
||||
aBuffer.push_back('r');
|
||||
}
|
||||
else if( *pRead == '\n' )
|
||||
{
|
||||
pBuffer.push_back('\\');
|
||||
pBuffer.push_back('n');
|
||||
aBuffer.push_back('\\');
|
||||
aBuffer.push_back('n');
|
||||
}
|
||||
else if( *pRead == '\\' )
|
||||
{
|
||||
pBuffer.push_back('\\');
|
||||
pBuffer.push_back('\\');
|
||||
aBuffer.push_back('\\');
|
||||
aBuffer.push_back('\\');
|
||||
}
|
||||
else
|
||||
pBuffer.push_back(*pRead);
|
||||
aBuffer.push_back(*pRead);
|
||||
pRead++;
|
||||
}
|
||||
pBuffer.push_back(0);
|
||||
aBuffer.push_back(0);
|
||||
|
||||
return pBuffer;
|
||||
return aBuffer;
|
||||
}
|
||||
|
||||
}
|
||||
@ -572,14 +572,14 @@ void PDFOutDev::processLink(Link* link, Catalog*)
|
||||
{
|
||||
const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString();
|
||||
|
||||
std::vector<char> pEsc( lcl_escapeLineFeeds(pURI) );
|
||||
std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) );
|
||||
|
||||
printf( "drawLink %f %f %f %f %s\n",
|
||||
normalize(x1),
|
||||
normalize(y1),
|
||||
normalize(x2),
|
||||
normalize(y2),
|
||||
pEsc.data() );
|
||||
aEsc.data() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -765,7 +765,7 @@ void PDFOutDev::updateFont(GfxState *state)
|
||||
|
||||
aFont = it->second;
|
||||
|
||||
std::vector<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) );
|
||||
std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) );
|
||||
printf( " %d %d %d %d %f %d %s",
|
||||
aFont.isEmbedded,
|
||||
aFont.isBold,
|
||||
@ -773,7 +773,7 @@ void PDFOutDev::updateFont(GfxState *state)
|
||||
aFont.isUnderline,
|
||||
normalize(state->getTransformedFontSize()),
|
||||
nEmbedSize,
|
||||
pEsc.data() );
|
||||
aEsc.data() );
|
||||
}
|
||||
printf( "\n" );
|
||||
|
||||
@ -918,8 +918,8 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
|
||||
for( int i=0; i<uLen; ++i )
|
||||
{
|
||||
buf[ m_pUtf8Map->mapUnicode(u[i], buf, sizeof(buf)-1) ] = 0;
|
||||
std::vector<char> pEsc( lcl_escapeLineFeeds(buf) );
|
||||
printf( "%s", pEsc.data() );
|
||||
std::vector<char> aEsc( lcl_escapeLineFeeds(buf) );
|
||||
printf( "%s", aEsc.data() );
|
||||
}
|
||||
|
||||
printf( "\n" );
|
||||
|
@ -592,7 +592,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
|
||||
if ( !pFileNameItem )
|
||||
{
|
||||
// get FileName from dialog
|
||||
std::vector<OUString> pURLList;
|
||||
std::vector<OUString> aURLList;
|
||||
OUString aFilter;
|
||||
SfxItemSet* pSet = nullptr;
|
||||
OUString aPath;
|
||||
@ -630,12 +630,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
|
||||
|
||||
sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl(
|
||||
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
|
||||
SFXWB_MULTISELECTION, OUString(), pURLList,
|
||||
SFXWB_MULTISELECTION, OUString(), aURLList,
|
||||
aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList );
|
||||
|
||||
if ( nErr == ERRCODE_ABORT )
|
||||
{
|
||||
pURLList.clear();
|
||||
aURLList.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -646,7 +646,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
|
||||
rReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) );
|
||||
delete pSet;
|
||||
|
||||
if(!pURLList.empty())
|
||||
if(!aURLList.empty())
|
||||
{
|
||||
if ( nSID == SID_OPENTEMPLATE )
|
||||
rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, false ) );
|
||||
@ -683,7 +683,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
|
||||
rReq.AppendItem(SfxStringItem(SID_DOC_SERVICE, aDocService));
|
||||
}
|
||||
|
||||
for(std::vector<OUString>::const_iterator i = pURLList.begin(); i != pURLList.end(); ++i)
|
||||
for(std::vector<OUString>::const_iterator i = aURLList.begin(); i != aURLList.end(); ++i)
|
||||
{
|
||||
rReq.RemoveItem( SID_FILE_NAME );
|
||||
rReq.AppendItem( SfxStringItem( SID_FILE_NAME, *i ) );
|
||||
@ -715,10 +715,10 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
|
||||
}
|
||||
}
|
||||
|
||||
pURLList.clear();
|
||||
aURLList.clear();
|
||||
return;
|
||||
}
|
||||
pURLList.clear();
|
||||
aURLList.clear();
|
||||
}
|
||||
|
||||
bool bHyperlinkUsed = false;
|
||||
|
@ -1889,27 +1889,27 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
|
||||
else
|
||||
{
|
||||
css::uno::Any aAny = pBind->GetStatus().State;
|
||||
css::uno::Type pType = aAny.getValueType();
|
||||
css::uno::Type aType = aAny.getValueType();
|
||||
|
||||
if ( pType == cppu::UnoType<bool>::get() )
|
||||
if ( aType == cppu::UnoType<bool>::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
aAny >>= bTemp ;
|
||||
rpState.reset(new SfxBoolItem( nSlot, bTemp ));
|
||||
}
|
||||
else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
aAny >>= nTemp ;
|
||||
rpState.reset(new SfxUInt16Item( nSlot, nTemp ));
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
aAny >>= nTemp ;
|
||||
rpState.reset(new SfxUInt32Item( nSlot, nTemp ));
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
aAny >>= sTemp ;
|
||||
|
@ -109,40 +109,40 @@ throw( RuntimeException, std::exception )
|
||||
if ( rEvent.IsEnabled )
|
||||
{
|
||||
m_eState = SfxItemState::DEFAULT;
|
||||
css::uno::Type pType = rEvent.State.getValueType();
|
||||
css::uno::Type aType = rEvent.State.getValueType();
|
||||
|
||||
if ( pType == cppu::UnoType<bool>::get() )
|
||||
if ( aType == cppu::UnoType<bool>::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
rEvent.State >>= bTemp ;
|
||||
m_pItem = new SfxBoolItem( m_nSlotID, bTemp );
|
||||
}
|
||||
else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
m_pItem = new SfxUInt16Item( m_nSlotID, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
m_pItem = new SfxUInt32Item( m_nSlotID, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
rEvent.State >>= sTemp ;
|
||||
m_pItem = new SfxStringItem( m_nSlotID, sTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
{
|
||||
ItemStatus aItemStatus;
|
||||
rEvent.State >>= aItemStatus;
|
||||
m_eState = (SfxItemState) aItemStatus.State;
|
||||
m_pItem = new SfxVoidItem( m_nSlotID );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() )
|
||||
{
|
||||
Visibility aVisibilityStatus;
|
||||
rEvent.State >>= aVisibilityStatus;
|
||||
|
@ -168,45 +168,45 @@ throw( RuntimeException, std::exception )
|
||||
if ( rEvent.IsEnabled )
|
||||
{
|
||||
eState = SfxItemState::DEFAULT;
|
||||
css::uno::Type pType = rEvent.State.getValueType();
|
||||
css::uno::Type aType = rEvent.State.getValueType();
|
||||
|
||||
if ( pType == ::cppu::UnoType<void>::get() )
|
||||
if ( aType == ::cppu::UnoType<void>::get() )
|
||||
{
|
||||
pItem = new SfxVoidItem( m_nSlotID );
|
||||
eState = SfxItemState::UNKNOWN;
|
||||
}
|
||||
else if ( pType == cppu::UnoType< bool >::get() )
|
||||
else if ( aType == cppu::UnoType< bool >::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
rEvent.State >>= bTemp ;
|
||||
pItem = new SfxBoolItem( m_nSlotID, bTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
else if ( aType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt16Item( m_nSlotID, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt32Item( m_nSlotID, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
rEvent.State >>= sTemp ;
|
||||
pItem = new SfxStringItem( m_nSlotID, sTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::ItemStatus >::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::ItemStatus >::get() )
|
||||
{
|
||||
ItemStatus aItemStatus;
|
||||
rEvent.State >>= aItemStatus;
|
||||
eState = (SfxItemState) aItemStatus.State;
|
||||
pItem = new SfxVoidItem( m_nSlotID );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::Visibility >::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::Visibility >::get() )
|
||||
{
|
||||
Visibility aVisibilityStatus;
|
||||
rEvent.State >>= aVisibilityStatus;
|
||||
|
@ -95,26 +95,26 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const css::frame::FeatureStateE
|
||||
eState = SfxItemState::DEFAULT;
|
||||
css::uno::Any aAny = aStatus.State;
|
||||
|
||||
css::uno::Type pType = aAny.getValueType();
|
||||
if ( pType == cppu::UnoType< bool >::get() )
|
||||
css::uno::Type aType = aAny.getValueType();
|
||||
if ( aType == cppu::UnoType< bool >::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
aAny >>= bTemp ;
|
||||
pItem = new SfxBoolItem( nId, bTemp );
|
||||
}
|
||||
else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
aAny >>= nTemp ;
|
||||
pItem = new SfxUInt16Item( nId, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
aAny >>= nTemp ;
|
||||
pItem = new SfxUInt32Item( nId, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
aAny >>= sTemp ;
|
||||
|
@ -156,27 +156,27 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const css::frame::FeatureState
|
||||
if ( rEvent.IsEnabled )
|
||||
{
|
||||
eState = SfxItemState::DEFAULT;
|
||||
css::uno::Type pType = rEvent.State.getValueType();
|
||||
css::uno::Type aType = rEvent.State.getValueType();
|
||||
|
||||
if ( pType == cppu::UnoType< bool >::get() )
|
||||
if ( aType == cppu::UnoType< bool >::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
rEvent.State >>= bTemp ;
|
||||
pItem = new SfxBoolItem( pCtrlItem->GetId(), bTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
else if ( aType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt16Item( pCtrlItem->GetId(), nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt32Item( pCtrlItem->GetId(), nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
rEvent.State >>= sTemp ;
|
||||
|
@ -162,14 +162,14 @@ OUString ConvertDateTime_Impl( const OUString& rName,
|
||||
{
|
||||
Date aD(uDT);
|
||||
tools::Time aT(uDT);
|
||||
const OUString pDelim ( ", " );
|
||||
const OUString aDelim( ", " );
|
||||
OUString aStr( rWrapper.getDate( aD ) );
|
||||
aStr += pDelim;
|
||||
aStr += aDelim;
|
||||
aStr += rWrapper.getTime( aT );
|
||||
OUString aAuthor = comphelper::string::stripStart(rName, ' ');
|
||||
if (!aAuthor.isEmpty())
|
||||
{
|
||||
aStr += pDelim;
|
||||
aStr += aDelim;
|
||||
aStr += aAuthor;
|
||||
}
|
||||
return aStr;
|
||||
|
@ -777,10 +777,10 @@ bool ModelData_Impl::CheckFilterOptionsDialogExistence()
|
||||
|
||||
while ( xFilterEnum->hasMoreElements() )
|
||||
{
|
||||
uno::Sequence< beans::PropertyValue > pProps;
|
||||
if ( xFilterEnum->nextElement() >>= pProps )
|
||||
uno::Sequence< beans::PropertyValue > aProps;
|
||||
if ( xFilterEnum->nextElement() >>= aProps )
|
||||
{
|
||||
::comphelper::SequenceAsHashMap aPropsHM( pProps );
|
||||
::comphelper::SequenceAsHashMap aPropsHM( aProps );
|
||||
OUString aUIServName = aPropsHM.getUnpackedValueOrDefault(
|
||||
"UIComponent",
|
||||
OUString() );
|
||||
|
@ -252,38 +252,38 @@ throw ( css::uno::RuntimeException, std::exception )
|
||||
if ( rEvent.IsEnabled )
|
||||
{
|
||||
eState = SfxItemState::DEFAULT;
|
||||
uno::Type pType = rEvent.State.getValueType();
|
||||
uno::Type aType = rEvent.State.getValueType();
|
||||
|
||||
if ( pType == cppu::UnoType<void>::get() )
|
||||
if ( aType == cppu::UnoType<void>::get() )
|
||||
{
|
||||
pItem = new SfxVoidItem( nSlotID );
|
||||
eState = SfxItemState::UNKNOWN;
|
||||
}
|
||||
else if ( pType == cppu::UnoType<bool>::get() )
|
||||
else if ( aType == cppu::UnoType<bool>::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
rEvent.State >>= bTemp ;
|
||||
pItem = new SfxBoolItem( nSlotID, bTemp );
|
||||
}
|
||||
else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt16Item( nSlotID, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt32Item( nSlotID, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
rEvent.State >>= sTemp ;
|
||||
pItem = new SfxStringItem( nSlotID, sTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
{
|
||||
frame::status::ItemStatus aItemStatus;
|
||||
rEvent.State >>= aItemStatus;
|
||||
|
@ -477,38 +477,38 @@ throw ( css::uno::RuntimeException, std::exception )
|
||||
if ( rEvent.IsEnabled )
|
||||
{
|
||||
eState = SfxItemState::DEFAULT;
|
||||
css::uno::Type pType = rEvent.State.getValueType();
|
||||
css::uno::Type aType = rEvent.State.getValueType();
|
||||
|
||||
if ( pType == cppu::UnoType<void>::get() )
|
||||
if ( aType == cppu::UnoType<void>::get() )
|
||||
{
|
||||
pItem = new SfxVoidItem( nSlotId );
|
||||
eState = SfxItemState::UNKNOWN;
|
||||
}
|
||||
else if ( pType == cppu::UnoType<bool>::get() )
|
||||
else if ( aType == cppu::UnoType<bool>::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
rEvent.State >>= bTemp ;
|
||||
pItem = new SfxBoolItem( nSlotId, bTemp );
|
||||
}
|
||||
else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
|
||||
else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt16Item( nSlotId, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt32Item( nSlotId, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
rEvent.State >>= sTemp ;
|
||||
pItem = new SfxStringItem( nSlotId, sTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
{
|
||||
ItemStatus aItemStatus;
|
||||
rEvent.State >>= aItemStatus;
|
||||
@ -521,7 +521,7 @@ throw ( css::uno::RuntimeException, std::exception )
|
||||
eState = tmpState;
|
||||
pItem = new SfxVoidItem( nSlotId );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() )
|
||||
{
|
||||
Visibility aVisibilityStatus;
|
||||
rEvent.State >>= aVisibilityStatus;
|
||||
@ -811,38 +811,38 @@ throw ( css::uno::RuntimeException, std::exception )
|
||||
if ( rEvent.IsEnabled )
|
||||
{
|
||||
eState = SfxItemState::DEFAULT;
|
||||
css::uno::Type pType = rEvent.State.getValueType();
|
||||
css::uno::Type aType = rEvent.State.getValueType();
|
||||
|
||||
if ( pType == cppu::UnoType<void>::get() )
|
||||
if ( aType == cppu::UnoType<void>::get() )
|
||||
{
|
||||
pItem = new SfxVoidItem( nSlotId );
|
||||
eState = SfxItemState::UNKNOWN;
|
||||
}
|
||||
else if ( pType == cppu::UnoType<bool>::get() )
|
||||
else if ( aType == cppu::UnoType<bool>::get() )
|
||||
{
|
||||
bool bTemp = false;
|
||||
rEvent.State >>= bTemp ;
|
||||
pItem = new SfxBoolItem( nSlotId, bTemp );
|
||||
}
|
||||
else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
|
||||
else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
|
||||
{
|
||||
sal_uInt16 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt16Item( nSlotId, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<sal_uInt32>::get() )
|
||||
else if ( aType == cppu::UnoType<sal_uInt32>::get() )
|
||||
{
|
||||
sal_uInt32 nTemp = 0;
|
||||
rEvent.State >>= nTemp ;
|
||||
pItem = new SfxUInt32Item( nSlotId, nTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType<OUString>::get() )
|
||||
else if ( aType == cppu::UnoType<OUString>::get() )
|
||||
{
|
||||
OUString sTemp ;
|
||||
rEvent.State >>= sTemp ;
|
||||
pItem = new SfxStringItem( nSlotId, sTemp );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
|
||||
{
|
||||
ItemStatus aItemStatus;
|
||||
rEvent.State >>= aItemStatus;
|
||||
@ -855,7 +855,7 @@ throw ( css::uno::RuntimeException, std::exception )
|
||||
eState = tmpState;
|
||||
pItem = new SfxVoidItem( nSlotId );
|
||||
}
|
||||
else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() )
|
||||
else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() )
|
||||
{
|
||||
Visibility aVisibilityStatus;
|
||||
rEvent.State >>= aVisibilityStatus;
|
||||
|
@ -394,8 +394,8 @@ namespace slideshow
|
||||
// the whole shape set
|
||||
|
||||
// determine new subset range
|
||||
for( const auto& pShape : maSubsetShapes )
|
||||
updateSubsetBounds( pShape );
|
||||
for( const auto& rSubsetShape : maSubsetShapes )
|
||||
updateSubsetBounds( rSubsetShape );
|
||||
|
||||
updateSubsets();
|
||||
|
||||
|
@ -446,12 +446,12 @@ void SlideChangeBase::viewsChanged()
|
||||
if( mbFinished )
|
||||
return;
|
||||
|
||||
for( auto& pView : maViewData )
|
||||
for( auto& rView : maViewData )
|
||||
{
|
||||
// clear stale info (both bitmaps and sprites prolly need a
|
||||
// resize)
|
||||
clearViewEntry( pView );
|
||||
addSprites( pView );
|
||||
clearViewEntry( rView );
|
||||
addSprites( rView );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -837,9 +837,9 @@ sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength)
|
||||
|
||||
sal_uLong aReaded = 32000;
|
||||
|
||||
for (sal_uInt64 pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000)
|
||||
for (sal_uInt64 nInd = 0; nInd < aLength && aReaded == 32000 ; nInd += 32000)
|
||||
{
|
||||
sal_uLong aToCopy = min( aLength - pInd, 32000 );
|
||||
sal_uLong aToCopy = min( aLength - nInd, 32000 );
|
||||
aReaded = m_rSource->readBytes( aData, aToCopy );
|
||||
aResult += m_pStream->Write( aData.getArray(), aReaded );
|
||||
}
|
||||
|
@ -706,9 +706,9 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
|
||||
//Insert into line
|
||||
pLineList->insert(it, pBrace);
|
||||
//Patch line (I think this is good enough)
|
||||
SmCaretPos pAfter = PatchLineList(pLineList, it);
|
||||
SmCaretPos aAfter = PatchLineList(pLineList, it);
|
||||
if( !PosAfterInsert.IsValid() )
|
||||
PosAfterInsert = pAfter;
|
||||
PosAfterInsert = aAfter;
|
||||
|
||||
//Finish editing
|
||||
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
|
||||
|
@ -211,9 +211,9 @@ void SmCaretDrawingVisitor::Visit( SmTextNode* pNode )
|
||||
}
|
||||
|
||||
//Underline the line
|
||||
Point pLeft( left_line, top + height );
|
||||
Point pRight( right_line, top + height );
|
||||
mrDev.DrawLine( pLeft, pRight );
|
||||
Point aLeft( left_line, top + height );
|
||||
Point aRight( right_line, top + height );
|
||||
mrDev.DrawLine( aLeft, aRight );
|
||||
}
|
||||
|
||||
void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
|
||||
@ -241,9 +241,9 @@ void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
|
||||
}
|
||||
|
||||
//Underline the line
|
||||
Point pLeft( left_line, top + height );
|
||||
Point pRight( right_line, top + height );
|
||||
mrDev.DrawLine( pLeft, pRight );
|
||||
Point aLeft( left_line, top + height );
|
||||
Point aRight( right_line, top + height );
|
||||
mrDev.DrawLine( aLeft, aRight );
|
||||
}
|
||||
|
||||
// SmCaretPos2LineVisitor
|
||||
|
@ -788,14 +788,14 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
//we search another one. As long as there is a javaldx, we should
|
||||
//never come into this situation. javaldx checks always if the JRE
|
||||
//still exist.
|
||||
jfw::JavaInfoGuard pJavaInfo;
|
||||
if (JFW_E_NONE == jfw_getSelectedJRE(&pJavaInfo.info))
|
||||
jfw::JavaInfoGuard aJavaInfo;
|
||||
if (JFW_E_NONE == jfw_getSelectedJRE(&aJavaInfo.info))
|
||||
{
|
||||
sal_Bool bExist = false;
|
||||
if (JFW_E_NONE == jfw_existJRE(pJavaInfo.info, &bExist))
|
||||
if (JFW_E_NONE == jfw_existJRE(aJavaInfo.info, &bExist))
|
||||
{
|
||||
if (!bExist
|
||||
&& ! (pJavaInfo.info->nRequirements & JFW_REQUIRE_NEEDRESTART))
|
||||
&& ! (aJavaInfo.info->nRequirements & JFW_REQUIRE_NEEDRESTART))
|
||||
{
|
||||
info.clear();
|
||||
javaFrameworkError errFind = jfw_findAndSelectJRE(
|
||||
|
@ -121,15 +121,15 @@ void SvtFontSubstConfig::ImplCommit()
|
||||
{
|
||||
OUString sPrefix = sNode + "/_" + OUString::number(i) + "/";
|
||||
|
||||
SubstitutionStruct& pSubst = pImpl->aSubstArr[i];
|
||||
SubstitutionStruct& rSubst = pImpl->aSubstArr[i];
|
||||
pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sReplaceFont;
|
||||
pSetValues[nSetValue++].Value <<= pSubst.sFont;
|
||||
pSetValues[nSetValue++].Value <<= rSubst.sFont;
|
||||
pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sSubstituteFont;
|
||||
pSetValues[nSetValue++].Value <<= pSubst.sReplaceBy;
|
||||
pSetValues[nSetValue++].Value <<= rSubst.sReplaceBy;
|
||||
pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sAlways;
|
||||
pSetValues[nSetValue++].Value.setValue(&pSubst.bReplaceAlways, rBoolType);
|
||||
pSetValues[nSetValue++].Value.setValue(&rSubst.bReplaceAlways, rBoolType);
|
||||
pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sOnScreenOnly;
|
||||
pSetValues[nSetValue++].Value.setValue(&pSubst.bReplaceOnScreenOnly, rBoolType);
|
||||
pSetValues[nSetValue++].Value.setValue(&rSubst.bReplaceOnScreenOnly, rBoolType);
|
||||
}
|
||||
ReplaceSetProperties(sNode, aSetValues);
|
||||
}
|
||||
|
@ -422,11 +422,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
|
||||
css::uno::Reference<XAccessibleStateSet> rState =
|
||||
xTempAccContext->getAccessibleStateSet();
|
||||
if( rState.is() ) {
|
||||
css::uno::Sequence<short> pStates = rState->getStates();
|
||||
int count = pStates.getLength();
|
||||
css::uno::Sequence<short> aStates = rState->getStates();
|
||||
int count = aStates.getLength();
|
||||
for( int iIndex = 0;iIndex < count;iIndex++ )
|
||||
{
|
||||
if( pStates[iIndex] == AccessibleStateType::EDITABLE )
|
||||
if( aStates[iIndex] == AccessibleStateType::EDITABLE )
|
||||
{
|
||||
pStateSet->AddState (AccessibleStateType::EDITABLE);
|
||||
pStateSet->AddState (AccessibleStateType::RESIZABLE);
|
||||
@ -465,11 +465,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
|
||||
css::uno::Reference<XAccessibleStateSet> rState =
|
||||
xTempAccContext->getAccessibleStateSet();
|
||||
if( rState.is() ) {
|
||||
css::uno::Sequence<short> pStates = rState->getStates();
|
||||
int count = pStates.getLength();
|
||||
css::uno::Sequence<short> aStates = rState->getStates();
|
||||
int count = aStates.getLength();
|
||||
for( int iIndex = 0;iIndex < count;iIndex++ )
|
||||
{
|
||||
if( pStates[iIndex] == AccessibleStateType::EDITABLE )
|
||||
if( aStates[iIndex] == AccessibleStateType::EDITABLE )
|
||||
{
|
||||
pStateSet->AddState (AccessibleStateType::EDITABLE);
|
||||
pStateSet->AddState (AccessibleStateType::RESIZABLE);
|
||||
@ -847,11 +847,11 @@ throw ( IndexOutOfBoundsException,
|
||||
if( !pRState.is() )
|
||||
return false;
|
||||
|
||||
uno::Sequence<short> pStates = pRState->getStates();
|
||||
int nCount = pStates.getLength();
|
||||
uno::Sequence<short> aStates = pRState->getStates();
|
||||
int nCount = aStates.getLength();
|
||||
for( int i = 0; i < nCount; i++ )
|
||||
{
|
||||
if(pStates[i] == AccessibleStateType::SELECTED)
|
||||
if(aStates[i] == AccessibleStateType::SELECTED)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -964,11 +964,11 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
|
||||
|
||||
if( !bIsMod )
|
||||
{
|
||||
Point pRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1,
|
||||
Point aRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1,
|
||||
aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1
|
||||
);
|
||||
Size aRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2);
|
||||
Rectangle aRepaintRect( pRepaintPoint, aRepaintSize );
|
||||
Rectangle aRepaintRect( aRepaintPoint, aRepaintSize );
|
||||
bool bFocusPosChanged=false;
|
||||
switch(nCode)
|
||||
{
|
||||
|
@ -652,11 +652,11 @@ SaveDialog::SaveDialog(vcl::Window* pParent, RecoveryCore* pCore)
|
||||
// fill listbox with current open documents
|
||||
m_pFileListLB->Clear();
|
||||
|
||||
TURLList& pURLs = m_pCore->getURLListAccess();
|
||||
TURLList& rURLs = m_pCore->getURLListAccess();
|
||||
TURLList::const_iterator pIt;
|
||||
|
||||
for ( pIt = pURLs.begin();
|
||||
pIt != pURLs.end() ;
|
||||
for ( pIt = rURLs.begin();
|
||||
pIt != rURLs.end() ;
|
||||
++pIt )
|
||||
{
|
||||
const TURLInfo& rInfo = *pIt;
|
||||
@ -898,10 +898,10 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore)
|
||||
m_pCancelBtn->SetClickHdl( LINK( this, RecoveryDialog, CancelButtonHdl ) );
|
||||
|
||||
// fill list box first time
|
||||
TURLList& pURLList = m_pCore->getURLListAccess();
|
||||
TURLList& rURLList = m_pCore->getURLListAccess();
|
||||
TURLList::const_iterator pIt;
|
||||
for ( pIt = pURLList.begin();
|
||||
pIt != pURLList.end() ;
|
||||
for ( pIt = rURLList.begin();
|
||||
pIt != rURLList.end() ;
|
||||
++pIt )
|
||||
{
|
||||
const TURLInfo& rInfo = *pIt;
|
||||
@ -1275,10 +1275,10 @@ void BrokenRecoveryDialog::dispose()
|
||||
void BrokenRecoveryDialog::impl_refresh()
|
||||
{
|
||||
m_bExecutionNeeded = false;
|
||||
TURLList& pURLList = m_pCore->getURLListAccess();
|
||||
TURLList& rURLList = m_pCore->getURLListAccess();
|
||||
TURLList::const_iterator pIt;
|
||||
for ( pIt = pURLList.begin();
|
||||
pIt != pURLList.end() ;
|
||||
for ( pIt = rURLList.begin();
|
||||
pIt != rURLList.end() ;
|
||||
++pIt )
|
||||
{
|
||||
const TURLInfo& rInfo = *pIt;
|
||||
|
@ -1025,24 +1025,24 @@ void AreaPropertyPanelBase::Update()
|
||||
{
|
||||
const OUString aString(mpFillGradientItem->GetName());
|
||||
mpLbFillAttr->SelectEntry(aString);
|
||||
const XGradient pGradient = mpFillGradientItem->GetGradientValue();
|
||||
mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor());
|
||||
const XGradient aGradient = mpFillGradientItem->GetGradientValue();
|
||||
mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor());
|
||||
if(mpLbFillGradFrom->GetSelectEntryCount() == 0)
|
||||
{
|
||||
mpLbFillGradFrom->InsertEntry(pGradient.GetStartColor(), OUString());
|
||||
mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor());
|
||||
mpLbFillGradFrom->InsertEntry(aGradient.GetStartColor(), OUString());
|
||||
mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor());
|
||||
}
|
||||
mpLbFillGradTo->SelectEntry(pGradient.GetEndColor());
|
||||
mpLbFillGradTo->SelectEntry(aGradient.GetEndColor());
|
||||
if(mpLbFillGradTo->GetSelectEntryCount() == 0)
|
||||
{
|
||||
mpLbFillGradTo->InsertEntry(pGradient.GetEndColor(), OUString());
|
||||
mpLbFillGradTo->SelectEntry(pGradient.GetEndColor());
|
||||
mpLbFillGradTo->InsertEntry(aGradient.GetEndColor(), OUString());
|
||||
mpLbFillGradTo->SelectEntry(aGradient.GetEndColor());
|
||||
}
|
||||
mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( pGradient.GetGradientStyle() ));
|
||||
mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( aGradient.GetGradientStyle() ));
|
||||
if(mpGradientStyle->GetSelectEntryPos() == GradientStyle_RADIAL)
|
||||
mpMTRAngle->Disable();
|
||||
else
|
||||
mpMTRAngle->SetValue( pGradient.GetAngle() /10 );
|
||||
mpMTRAngle->SetValue( aGradient.GetAngle() /10 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -228,11 +228,11 @@ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet()
|
||||
css::uno::Reference<XAccessibleStateSet> rState =
|
||||
xTempAccContext->getAccessibleStateSet();
|
||||
if( rState.is() ) {
|
||||
css::uno::Sequence<short> pStates = rState->getStates();
|
||||
int count = pStates.getLength();
|
||||
css::uno::Sequence<short> aStates = rState->getStates();
|
||||
int count = aStates.getLength();
|
||||
for( int iIndex = 0;iIndex < count;iIndex++ )
|
||||
{
|
||||
if( pStates[iIndex] == AccessibleStateType::EDITABLE )
|
||||
if( aStates[iIndex] == AccessibleStateType::EDITABLE )
|
||||
{
|
||||
pStateSet->AddState (AccessibleStateType::EDITABLE);
|
||||
pStateSet->AddState (AccessibleStateType::RESIZABLE);
|
||||
|
@ -149,7 +149,7 @@ void TableRow::removeColumns( sal_Int32 nIndex, sal_Int32 nCount )
|
||||
}
|
||||
}
|
||||
|
||||
TableModelRef const & TableRow::getModel() const
|
||||
const TableModelRef& TableRow::getModel() const
|
||||
{
|
||||
return mxTableModel;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
void insertColumns( sal_Int32 nIndex, sal_Int32 nCount, CellVector::iterator* pIter = nullptr );
|
||||
void removeColumns( sal_Int32 nIndex, sal_Int32 nCount );
|
||||
/// Reference to the table model containing this row.
|
||||
TableModelRef const & getModel() const;
|
||||
const TableModelRef& getModel() const;
|
||||
|
||||
// XCellRange
|
||||
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
|
||||
|
@ -1905,9 +1905,9 @@ SvxCurrencyList_Impl::SvxCurrencyList_Impl(
|
||||
bIsSymbol = true;
|
||||
|
||||
sal_uInt16 nDefaultFormat = aFormatter.GetCurrencyFormatStrings( aStringsDtor, aCurrencyEntry, bIsSymbol );
|
||||
OUString& pFormatStr = aStringsDtor[ nDefaultFormat ];
|
||||
m_aFormatEntries.push_back( pFormatStr );
|
||||
if( pFormatStr == m_rSelectedFormat )
|
||||
const OUString& rFormatStr = aStringsDtor[ nDefaultFormat ];
|
||||
m_aFormatEntries.push_back( rFormatStr );
|
||||
if( rFormatStr == m_rSelectedFormat )
|
||||
nSelectedPos = nPos;
|
||||
++nPos;
|
||||
}
|
||||
|
@ -283,10 +283,10 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
|
||||
|
||||
mpOStm->Seek( 0 );
|
||||
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
|
||||
sal_uInt16 pDeterminedFormat = GRFILTER_FORMAT_DONTKNOW;
|
||||
GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&pDeterminedFormat );
|
||||
sal_uInt16 nDeterminedFormat = GRFILTER_FORMAT_DONTKNOW;
|
||||
GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&nDeterminedFormat );
|
||||
|
||||
if (pDeterminedFormat == GRFILTER_FORMAT_DONTKNOW)
|
||||
if (nDeterminedFormat == GRFILTER_FORMAT_DONTKNOW)
|
||||
{
|
||||
//Read the first two byte to check whether it is a gzipped stream, is so it may be in wmz or emz format
|
||||
//unzip them and try again
|
||||
@ -327,7 +327,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
|
||||
if (nStreamLen_)
|
||||
{
|
||||
pDest->Seek(0L);
|
||||
GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pDest ,nFormat,&pDeterminedFormat );
|
||||
GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pDest ,nFormat,&nDeterminedFormat );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -309,11 +309,11 @@ bool SwAccessibleFrameBase::GetSelectedState( )
|
||||
// SELETED.
|
||||
SwFlyFrame* pFlyFrame = getFlyFrame();
|
||||
const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat();
|
||||
const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor();
|
||||
const SwPosition *pPos = pAnchor.GetContentAnchor();
|
||||
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
|
||||
const SwPosition *pPos = rAnchor.GetContentAnchor();
|
||||
if( !pPos )
|
||||
return false;
|
||||
int pIndex = pPos->nContent.GetIndex();
|
||||
int nIndex = pPos->nContent.GetIndex();
|
||||
if( pPos->nNode.GetNode().GetTextNode() )
|
||||
{
|
||||
SwPaM* pCursor = GetCursor();
|
||||
@ -336,13 +336,13 @@ bool SwAccessibleFrameBase::GetSelectedState( )
|
||||
sal_uLong nEndIndex = pEnd->nNode.GetIndex();
|
||||
if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
|
||||
{
|
||||
if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
{
|
||||
if( ((nHere == nStartIndex) && (pIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
|
||||
if( ((nHere == nEndIndex) && (pIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) )
|
||||
if( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
|
||||
if( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) )
|
||||
return true;
|
||||
}
|
||||
else if( pAnchor.GetAnchorId() == FLY_AT_PARA )
|
||||
else if( rAnchor.GetAnchorId() == FLY_AT_PARA )
|
||||
{
|
||||
if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 )
|
||||
&& (nHere < nEndIndex ) )
|
||||
|
@ -1156,7 +1156,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
|
||||
{
|
||||
while( aIter != aEndIter )
|
||||
{
|
||||
SwAccessibleChild pFrame( (*aIter).first );
|
||||
SwAccessibleChild aFrame( (*aIter).first );
|
||||
|
||||
const SwFrameFormat *pFrameFormat = (*aIter).first ? ::FindFrameFormat( (*aIter).first ) : nullptr;
|
||||
if( !pFrameFormat )
|
||||
@ -1164,10 +1164,10 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
|
||||
++aIter;
|
||||
continue;
|
||||
}
|
||||
const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor();
|
||||
const SwPosition *pPos = pAnchor.GetContentAnchor();
|
||||
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
|
||||
const SwPosition *pPos = rAnchor.GetContentAnchor();
|
||||
|
||||
if(pAnchor.GetAnchorId() == FLY_AT_PAGE)
|
||||
if(rAnchor.GetAnchorId() == FLY_AT_PAGE)
|
||||
{
|
||||
uno::Reference < XAccessible > xAcc( (*aIter).second );
|
||||
if(xAcc.is())
|
||||
@ -1184,7 +1184,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
|
||||
}
|
||||
if( pPos->nNode.GetNode().GetTextNode() )
|
||||
{
|
||||
int pIndex = pPos->nContent.GetIndex();
|
||||
int nIndex = pPos->nContent.GetIndex();
|
||||
bool bMarked = false;
|
||||
if( pCursor != nullptr )
|
||||
{
|
||||
@ -1204,10 +1204,10 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
|
||||
sal_uLong nEndIndex = pEnd->nNode.GetIndex();
|
||||
if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
|
||||
{
|
||||
if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
{
|
||||
if( ( ((nHere == nStartIndex) && (pIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
|
||||
&&( ((nHere == nEndIndex) && (pIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) )
|
||||
if( ( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
|
||||
&&( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) )
|
||||
{
|
||||
uno::Reference < XAccessible > xAcc( (*aIter).second );
|
||||
if( xAcc.is() )
|
||||
@ -1220,7 +1220,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
|
||||
static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->ResetState( AccessibleStateType::SELECTED );
|
||||
}
|
||||
}
|
||||
else if( pAnchor.GetAnchorId() == FLY_AT_PARA )
|
||||
else if( rAnchor.GetAnchorId() == FLY_AT_PARA )
|
||||
{
|
||||
if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 )
|
||||
&& (nHere < nEndIndex ) )
|
||||
@ -1286,8 +1286,8 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
|
||||
const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat();
|
||||
if (pFrameFormat)
|
||||
{
|
||||
const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor();
|
||||
if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
|
||||
if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
{
|
||||
uno::Reference< XAccessible > xAccParent = pAccFrame->getAccessibleParent();
|
||||
if (xAccParent.is())
|
||||
@ -1557,8 +1557,8 @@ void SwAccessibleMap::DoInvalidateShapeSelection(bool bInvalidateFocusMode /*=fa
|
||||
SwFrameFormat *pFrameFormat = pObj ? FindFrameFormat( pObj ) : nullptr;
|
||||
if (pFrameFormat)
|
||||
{
|
||||
const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor();
|
||||
if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
|
||||
if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
{
|
||||
uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent();
|
||||
if (xPara.is())
|
||||
|
@ -3817,8 +3817,7 @@ sal_Int16 SAL_CALL SwAccessibleParagraph::getAccessibleRole() throw (css::uno::R
|
||||
sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
|
||||
{
|
||||
uno::Reference< css::beans::XPropertySet > xPortion = CreateUnoPortion( 0, 0 );
|
||||
OUString pString = "ParaStyleName";
|
||||
uno::Any styleAny = xPortion->getPropertyValue( pString );
|
||||
uno::Any styleAny = xPortion->getPropertyValue( "ParaStyleName" );
|
||||
OUString sValue;
|
||||
if (styleAny >>= sValue)
|
||||
{
|
||||
|
@ -125,11 +125,11 @@ static bool lcl_getSelectedState(const SwAccessibleChild& aChild,
|
||||
Reference<XAccessibleStateSet> pRStateSet = pRContext->getAccessibleStateSet();
|
||||
if( pRStateSet.is() )
|
||||
{
|
||||
Sequence<short> pStates = pRStateSet->getStates();
|
||||
sal_Int32 count = pStates.getLength();
|
||||
Sequence<short> aStates = pRStateSet->getStates();
|
||||
sal_Int32 count = aStates.getLength();
|
||||
for( sal_Int32 i = 0; i < count; i++ )
|
||||
{
|
||||
if( pStates[i] == AccessibleStateType::SELECTED)
|
||||
if( aStates[i] == AccessibleStateType::SELECTED)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -300,11 +300,11 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
|
||||
const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat();
|
||||
if (pFrameFormat)
|
||||
{
|
||||
const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor();
|
||||
if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
|
||||
if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
|
||||
{
|
||||
const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() );
|
||||
aChild = pParaFrame;
|
||||
const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() );
|
||||
aChild = pParaFrame;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell& rShell)
|
||||
{
|
||||
if (pContent->GetType() == SwFrameType::Tab)
|
||||
{
|
||||
SwFormatFrameSize pSize = pLine->GetFrameFormat()->GetFrameSize();
|
||||
pRow->ModifyNotification(nullptr, &pSize);
|
||||
SwFormatFrameSize aSize = pLine->GetFrameFormat()->GetFrameSize();
|
||||
pRow->ModifyNotification(nullptr, &aSize);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -264,9 +264,9 @@ void ContentIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, updater_t& rUpdater)
|
||||
|
||||
void ContentIdxStoreImpl::SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent)
|
||||
{
|
||||
SwRedlineTable const & pRedlineTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
|
||||
SwRedlineTable const & rRedlineTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
|
||||
long int nIdx = 0;
|
||||
for (const SwRangeRedline* pRdl : pRedlineTable)
|
||||
for (const SwRangeRedline* pRdl : rRedlineTable)
|
||||
{
|
||||
int nPointPos = lcl_RelativePosition( *pRdl->GetPoint(), nNode, nContent );
|
||||
int nMarkPos = pRdl->HasMark() ? lcl_RelativePosition( *pRdl->GetMark(), nNode, nContent ) :
|
||||
|
@ -485,10 +485,10 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
|
||||
const ::std::vector<OUString>& (*pStringsFetchFunc)() = std::get<2>( *entry );
|
||||
if ( pStringsFetchFunc )
|
||||
{
|
||||
const ::std::vector<OUString>& pStrings = pStringsFetchFunc();
|
||||
const ::std::vector<OUString>& rStrings = pStringsFetchFunc();
|
||||
sal_uInt16 nIndex, nId;
|
||||
for ( nIndex = 0, nId = std::get<0>( *entry ) ; nId < std::get<1>( *entry ) ; nId++, nIndex++ )
|
||||
(*pHash)[pStrings[nIndex]] = nId;
|
||||
(*pHash)[rStrings[nIndex]] = nId;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1123,8 +1123,8 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector<OUString>* pNames ) const
|
||||
{
|
||||
if( pNames )
|
||||
{
|
||||
OUString pTmp(static_cast<const SwFormatRefMark*>(pItem)->GetRefName());
|
||||
pNames->insert(pNames->begin() + nCount, pTmp);
|
||||
OUString aTmp(static_cast<const SwFormatRefMark*>(pItem)->GetRefName());
|
||||
pNames->insert(pNames->begin() + nCount, aTmp);
|
||||
}
|
||||
++nCount;
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
|
||||
if (pTableCellRedline)
|
||||
{
|
||||
const SwTableBox *pRedTabBox = &pTableCellRedline->GetTableBox();
|
||||
const SwTable& pRedTable = pRedTabBox->GetSttNd()->FindTableNode()->GetTable();
|
||||
if ( &pRedTable == &rTable )
|
||||
const SwTable& rRedTable = pRedTabBox->GetSttNd()->FindTableNode()->GetTable();
|
||||
if ( &rRedTable == &rTable )
|
||||
{
|
||||
// Redline for this table
|
||||
const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData();
|
||||
@ -169,9 +169,9 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
|
||||
if (pTableRowRedline)
|
||||
{
|
||||
const SwTableLine *pRedTabLine = &pTableRowRedline->GetTableLine();
|
||||
const SwTableBoxes &pRedTabBoxes = pRedTabLine->GetTabBoxes();
|
||||
const SwTable& pRedTable = pRedTabBoxes[0]->GetSttNd()->FindTableNode()->GetTable();
|
||||
if ( &pRedTable == &rTable )
|
||||
const SwTableBoxes &rRedTabBoxes = pRedTabLine->GetTabBoxes();
|
||||
const SwTable& rRedTable = rRedTabBoxes[0]->GetSttNd()->FindTableNode()->GetTable();
|
||||
if ( &rRedTable == &rTable )
|
||||
{
|
||||
// Redline for this table
|
||||
const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
|
||||
|
@ -2157,13 +2157,13 @@ void DrawGraphic(
|
||||
GraphicObject *pGrf = const_cast<GraphicObject*>(pBrush->GetGraphicObject());
|
||||
if ( bConsiderBackgroundTransparency )
|
||||
{
|
||||
GraphicAttr pGrfAttr = pGrf->GetAttr();
|
||||
if ( (pGrfAttr.GetTransparency() != 0) &&
|
||||
GraphicAttr aGrfAttr = pGrf->GetAttr();
|
||||
if ( (aGrfAttr.GetTransparency() != 0) &&
|
||||
(pBrush->GetColor() == COL_TRANSPARENT)
|
||||
)
|
||||
{
|
||||
bTransparentGrfWithNoFillBackgrd = true;
|
||||
nGrfTransparency = pGrfAttr.GetTransparency();
|
||||
nGrfTransparency = aGrfAttr.GetTransparency();
|
||||
}
|
||||
}
|
||||
if ( pGrf->IsTransparent() )
|
||||
|
@ -52,7 +52,7 @@ sal_uInt32 SwXMLBlockListExport::exportDoc(enum XMLTokenEnum )
|
||||
XML_LIST_NAME,
|
||||
OUString (rBlockList.GetName()));
|
||||
{
|
||||
SvXMLElementExport pRoot (*this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK_LIST, true, true);
|
||||
SvXMLElementExport aRoot (*this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK_LIST, true, true);
|
||||
sal_uInt16 nBlocks= rBlockList.GetCount();
|
||||
for ( sal_uInt16 i = 0; i < nBlocks; i++)
|
||||
{
|
||||
|
@ -4223,9 +4223,9 @@ namespace {
|
||||
{
|
||||
mrTextNode.RemoveFromList();
|
||||
|
||||
const SwNumRuleItem& pNumRuleItem =
|
||||
const SwNumRuleItem& rNumRuleItem =
|
||||
dynamic_cast<const SwNumRuleItem&>(pItem);
|
||||
if ( !pNumRuleItem.GetValue().isEmpty() )
|
||||
if ( !rNumRuleItem.GetValue().isEmpty() )
|
||||
{
|
||||
mbAddTextNodeToList = true;
|
||||
// #i105562#
|
||||
@ -4238,12 +4238,12 @@ namespace {
|
||||
// handle RES_PARATR_LIST_ID
|
||||
case RES_PARATR_LIST_ID:
|
||||
{
|
||||
const SfxStringItem& pListIdItem =
|
||||
const SfxStringItem& rListIdItem =
|
||||
dynamic_cast<const SfxStringItem&>(pItem);
|
||||
OSL_ENSURE( pListIdItem.GetValue().getLength() > 0,
|
||||
OSL_ENSURE( rListIdItem.GetValue().getLength() > 0,
|
||||
"<HandleSetAttrAtTextNode(..)> - empty list id attribute not excepted. Serious defect." );
|
||||
const OUString sListIdOfTextNode = rTextNode.GetListId();
|
||||
if ( pListIdItem.GetValue() != sListIdOfTextNode )
|
||||
if ( rListIdItem.GetValue() != sListIdOfTextNode )
|
||||
{
|
||||
mbAddTextNodeToList = true;
|
||||
if ( mrTextNode.IsInList() )
|
||||
|
@ -1018,10 +1018,10 @@ public:
|
||||
{ m_vPropertyValues.clear(); }
|
||||
void Apply(SwXStyle& rStyle)
|
||||
{
|
||||
for(auto& pPropertyPair : m_vPropertyValues)
|
||||
for(const auto& rPropertyPair : m_vPropertyValues)
|
||||
{
|
||||
if(pPropertyPair.second.hasValue())
|
||||
rStyle.setPropertyValue(pPropertyPair.first, pPropertyPair.second);
|
||||
if(rPropertyPair.second.hasValue())
|
||||
rStyle.setPropertyValue(rPropertyPair.first, rPropertyPair.second);
|
||||
}
|
||||
}
|
||||
static void GetProperty(const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any& rAny )
|
||||
@ -1588,34 +1588,34 @@ void SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>(const SfxItemPropertySimpleEnt
|
||||
if(!pFormat)
|
||||
continue;
|
||||
SwNumFormat aFormat(*pFormat);
|
||||
const auto pCharName(pSwXRules->GetNewCharStyleNames()[i]);
|
||||
if(!pCharName.isEmpty()
|
||||
&& !SwXNumberingRules::isInvalidStyle(pCharName)
|
||||
&& (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != pCharName))
|
||||
const auto& rCharName(pSwXRules->GetNewCharStyleNames()[i]);
|
||||
if(!rCharName.isEmpty()
|
||||
&& !SwXNumberingRules::isInvalidStyle(rCharName)
|
||||
&& (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != rCharName))
|
||||
{
|
||||
auto pCharFormatIt(std::find_if(m_pDoc->GetCharFormats()->begin(), m_pDoc->GetCharFormats()->end(),
|
||||
[&pCharName] (SwCharFormat* pF) { return pF->GetName() == pCharName; }));
|
||||
[&rCharName] (SwCharFormat* pF) { return pF->GetName() == rCharName; }));
|
||||
if(pCharFormatIt != m_pDoc->GetCharFormats()->end())
|
||||
aFormat.SetCharFormat(*pCharFormatIt);
|
||||
else if(m_pBasePool)
|
||||
{
|
||||
auto pBase(static_cast<SfxStyleSheetBasePool*>(m_pBasePool)->Find(pCharName, SFX_STYLE_FAMILY_CHAR));
|
||||
auto pBase(static_cast<SfxStyleSheetBasePool*>(m_pBasePool)->Find(rCharName, SFX_STYLE_FAMILY_CHAR));
|
||||
if(!pBase)
|
||||
pBase = &m_pBasePool->Make(pCharName, SFX_STYLE_FAMILY_CHAR);
|
||||
pBase = &m_pBasePool->Make(rCharName, SFX_STYLE_FAMILY_CHAR);
|
||||
aFormat.SetCharFormat(static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat());
|
||||
}
|
||||
else
|
||||
aFormat.SetCharFormat(nullptr);
|
||||
}
|
||||
// same for fonts:
|
||||
const auto pBulletName(pSwXRules->GetBulletFontNames()[i]);
|
||||
if(!pBulletName.isEmpty()
|
||||
&& !SwXNumberingRules::isInvalidStyle(pBulletName)
|
||||
&& (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetFamilyName() != pBulletName))
|
||||
const auto& rBulletName(pSwXRules->GetBulletFontNames()[i]);
|
||||
if(!rBulletName.isEmpty()
|
||||
&& !SwXNumberingRules::isInvalidStyle(rBulletName)
|
||||
&& (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetFamilyName() != rBulletName))
|
||||
{
|
||||
const auto pFontListItem(static_cast<const SvxFontListItem*>(m_pDoc->GetDocShell()->GetItem(SID_ATTR_CHAR_FONTLIST)));
|
||||
const auto pList(pFontListItem->GetFontList());
|
||||
FontMetric aFontInfo(pList->Get(pBulletName, WEIGHT_NORMAL, ITALIC_NONE));
|
||||
FontMetric aFontInfo(pList->Get(rBulletName, WEIGHT_NORMAL, ITALIC_NONE));
|
||||
vcl::Font aFont(aFontInfo);
|
||||
aFormat.SetBulletFont(&aFont);
|
||||
}
|
||||
|
@ -4742,9 +4742,8 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
|
||||
{
|
||||
// get interoperability information about embedded objects
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_rExport.m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
uno::Sequence< beans::PropertyValue > aGrabBag, aObjectsInteropList,aObjectInteropAttributes;
|
||||
xPropSet->getPropertyValue( pName ) >>= aGrabBag;
|
||||
xPropSet->getPropertyValue( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ) >>= aGrabBag;
|
||||
for( sal_Int32 i=0; i < aGrabBag.getLength(); ++i )
|
||||
if ( aGrabBag[i].Name == "EmbeddedObjects" )
|
||||
{
|
||||
@ -5038,12 +5037,12 @@ bool DocxAttributeOutput::IsDiagram( const SdrObject* sdrObject )
|
||||
|
||||
// if the shape doesn't have the InteropGrabBag property, it's not a diagram
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( aName ) )
|
||||
return false;
|
||||
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aName ) >>= propList;
|
||||
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
|
||||
{
|
||||
// if we find any of the diagram components, it's a diagram
|
||||
|
@ -882,11 +882,11 @@ void DocxExport::WriteSettings()
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aGrabBagName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( xPropSetInfo->hasPropertyByName( aGrabBagName ) )
|
||||
{
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aGrabBagName ) >>= propList;
|
||||
for( sal_Int32 i=0; i < propList.getLength(); ++i )
|
||||
{
|
||||
if ( propList[i].Name == "ThemeFontLangProps" )
|
||||
@ -961,13 +961,13 @@ void DocxExport::WriteTheme()
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( aName ) )
|
||||
return;
|
||||
|
||||
uno::Reference<xml::dom::XDocument> themeDom;
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aName ) >>= propList;
|
||||
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
|
||||
{
|
||||
OUString propName = propList[nProp].Name;
|
||||
@ -999,14 +999,14 @@ void DocxExport::WriteGlossary()
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( aName ) )
|
||||
return;
|
||||
|
||||
uno::Reference<xml::dom::XDocument> glossaryDocDom;
|
||||
uno::Sequence< uno::Sequence< uno::Any> > glossaryDomList;
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aName ) >>= propList;
|
||||
sal_Int32 collectedProperties = 0;
|
||||
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
|
||||
{
|
||||
@ -1070,14 +1070,14 @@ void DocxExport::WriteCustomXml()
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( aName ) )
|
||||
return;
|
||||
|
||||
uno::Sequence<uno::Reference<xml::dom::XDocument> > customXmlDomlist;
|
||||
uno::Sequence<uno::Reference<xml::dom::XDocument> > customXmlDomPropslist;
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aName ) >>= propList;
|
||||
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
|
||||
{
|
||||
OUString propName = propList[nProp].Name;
|
||||
@ -1141,14 +1141,14 @@ void DocxExport::WriteActiveX()
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( aName ) )
|
||||
return;
|
||||
|
||||
uno::Sequence<uno::Reference<xml::dom::XDocument> > activeXDomlist;
|
||||
uno::Sequence<uno::Reference<io::XInputStream> > activeXBinList;
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aName ) >>= propList;
|
||||
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
|
||||
{
|
||||
OUString propName = propList[nProp].Name;
|
||||
@ -1235,13 +1235,13 @@ void DocxExport::WriteEmbeddings()
|
||||
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( pName ) )
|
||||
OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
if ( !xPropSetInfo->hasPropertyByName( aName ) )
|
||||
return;
|
||||
|
||||
uno::Sequence< beans::PropertyValue > embeddingsList;
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue( pName ) >>= propList;
|
||||
xPropSet->getPropertyValue( aName ) >>= propList;
|
||||
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
|
||||
{
|
||||
OUString propName = propList[nProp].Name;
|
||||
|
@ -287,8 +287,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
|
||||
m_pImpl->m_bParagraphHasDrawing = true;
|
||||
m_pImpl->m_pSerializer->startElementNS(XML_w, XML_drawing, FSEND);
|
||||
|
||||
const SvxLRSpaceItem pLRSpaceItem = pFrameFormat->GetLRSpace(false);
|
||||
const SvxULSpaceItem pULSpaceItem = pFrameFormat->GetULSpace(false);
|
||||
const SvxLRSpaceItem aLRSpaceItem = pFrameFormat->GetLRSpace(false);
|
||||
const SvxULSpaceItem aULSpaceItem = pFrameFormat->GetULSpace(false);
|
||||
|
||||
bool isAnchor;
|
||||
|
||||
@ -364,10 +364,10 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
|
||||
lclMovePositionWithRotation(aPos, rSize, pObj->GetRotateAngle());
|
||||
}
|
||||
attrList->add(XML_behindDoc, bOpaque ? "0" : "1");
|
||||
attrList->add(XML_distT, OString::number(TwipsToEMU(pULSpaceItem.GetUpper()) - nTopExt).getStr());
|
||||
attrList->add(XML_distB, OString::number(TwipsToEMU(pULSpaceItem.GetLower()) - nBottomExt).getStr());
|
||||
attrList->add(XML_distL, OString::number(TwipsToEMU(pLRSpaceItem.GetLeft()) - nLeftExt).getStr());
|
||||
attrList->add(XML_distR, OString::number(TwipsToEMU(pLRSpaceItem.GetRight()) - nRightExt).getStr());
|
||||
attrList->add(XML_distT, OString::number(TwipsToEMU(aULSpaceItem.GetUpper()) - nTopExt).getStr());
|
||||
attrList->add(XML_distB, OString::number(TwipsToEMU(aULSpaceItem.GetLower()) - nBottomExt).getStr());
|
||||
attrList->add(XML_distL, OString::number(TwipsToEMU(aLRSpaceItem.GetLeft()) - nLeftExt).getStr());
|
||||
attrList->add(XML_distR, OString::number(TwipsToEMU(aLRSpaceItem.GetRight()) - nRightExt).getStr());
|
||||
attrList->add(XML_simplePos, "0");
|
||||
attrList->add(XML_locked, "0");
|
||||
attrList->add(XML_layoutInCell, "1");
|
||||
@ -556,10 +556,10 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
|
||||
else
|
||||
{
|
||||
sax_fastparser::FastAttributeList* aAttrList = sax_fastparser::FastSerializerHelper::createAttrList();
|
||||
aAttrList->add(XML_distT, OString::number(TwipsToEMU(pULSpaceItem.GetUpper())).getStr());
|
||||
aAttrList->add(XML_distB, OString::number(TwipsToEMU(pULSpaceItem.GetLower())).getStr());
|
||||
aAttrList->add(XML_distL, OString::number(TwipsToEMU(pLRSpaceItem.GetLeft())).getStr());
|
||||
aAttrList->add(XML_distR, OString::number(TwipsToEMU(pLRSpaceItem.GetRight())).getStr());
|
||||
aAttrList->add(XML_distT, OString::number(TwipsToEMU(aULSpaceItem.GetUpper())).getStr());
|
||||
aAttrList->add(XML_distB, OString::number(TwipsToEMU(aULSpaceItem.GetLower())).getStr());
|
||||
aAttrList->add(XML_distL, OString::number(TwipsToEMU(aLRSpaceItem.GetLeft())).getStr());
|
||||
aAttrList->add(XML_distR, OString::number(TwipsToEMU(aLRSpaceItem.GetRight())).getStr());
|
||||
const SdrObject* pObj = pFrameFormat->FindRealSdrObject();
|
||||
if (pObj != nullptr)
|
||||
{
|
||||
@ -1120,9 +1120,8 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat
|
||||
uno::Sequence< uno::Any > diagramDrawing;
|
||||
|
||||
// retrieve the doms from the GrabBag
|
||||
OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
|
||||
uno::Sequence< beans::PropertyValue > propList;
|
||||
xPropSet->getPropertyValue(pName) >>= propList;
|
||||
xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList;
|
||||
for (sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp)
|
||||
{
|
||||
OUString propName = propList[nProp].Name;
|
||||
|
@ -3843,7 +3843,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
|
||||
if (rGraphic.GetType()==GRAPHIC_NONE)
|
||||
return;
|
||||
|
||||
ConvertDataFormat pConvertDestinationFormat = ConvertDataFormat::WMF;
|
||||
ConvertDataFormat aConvertDestinationFormat = ConvertDataFormat::WMF;
|
||||
const sal_Char* pConvertDestinationBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE;
|
||||
|
||||
GfxLink aGraphicLink;
|
||||
@ -3880,7 +3880,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
|
||||
break;
|
||||
case GFX_LINK_TYPE_NATIVE_GIF:
|
||||
// GIF is not supported by RTF, but we override default conversion to WMF, PNG seems fits better here.
|
||||
pConvertDestinationFormat = ConvertDataFormat::PNG;
|
||||
aConvertDestinationFormat = ConvertDataFormat::PNG;
|
||||
pConvertDestinationBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP;
|
||||
break;
|
||||
default:
|
||||
@ -3991,7 +3991,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
|
||||
else
|
||||
{
|
||||
aStream.Seek(0);
|
||||
if (GraphicConverter::Export(aStream, rGraphic, pConvertDestinationFormat) != ERRCODE_NONE)
|
||||
if (GraphicConverter::Export(aStream, rGraphic, aConvertDestinationFormat) != ERRCODE_NONE)
|
||||
SAL_WARN("sw.rtf", "failed to export the graphic");
|
||||
pBLIPType = pConvertDestinationBLIPType;
|
||||
aStream.Seek(STREAM_SEEK_TO_END);
|
||||
|
@ -1566,14 +1566,14 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
|
||||
|
||||
// #i25545#
|
||||
// #i100132# - a number format does not have to exist on given list level
|
||||
SwNumFormat pFormat(rLFOInfo.pNumRule->Get(nLevel));
|
||||
SwNumFormat aFormat(rLFOInfo.pNumRule->Get(nLevel));
|
||||
|
||||
if (rReader.IsRightToLeft() && nLastLFOPosition != nLFOPosition) {
|
||||
if ( pFormat.GetNumAdjust() == SVX_ADJUST_RIGHT)
|
||||
pFormat.SetNumAdjust(SVX_ADJUST_LEFT);
|
||||
else if ( pFormat.GetNumAdjust() == SVX_ADJUST_LEFT)
|
||||
pFormat.SetNumAdjust(SVX_ADJUST_RIGHT);
|
||||
rLFOInfo.pNumRule->Set(nLevel, pFormat);
|
||||
if ( aFormat.GetNumAdjust() == SVX_ADJUST_RIGHT)
|
||||
aFormat.SetNumAdjust(SVX_ADJUST_LEFT);
|
||||
else if ( aFormat.GetNumAdjust() == SVX_ADJUST_LEFT)
|
||||
aFormat.SetNumAdjust(SVX_ADJUST_RIGHT);
|
||||
rLFOInfo.pNumRule->Set(nLevel, aFormat);
|
||||
}
|
||||
nLastLFOPosition = nLFOPosition;
|
||||
/*
|
||||
@ -2316,11 +2316,11 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
|
||||
{
|
||||
case RES_CHRATR_COLOR:
|
||||
{
|
||||
OUString pNm;
|
||||
if (xPropSetInfo->hasPropertyByName(pNm = "TextColor"))
|
||||
OUString aNm;
|
||||
if (xPropSetInfo->hasPropertyByName(aNm = "TextColor"))
|
||||
{
|
||||
aTmp <<= (sal_Int32)static_cast<const SvxColorItem*>(pItem)->GetValue().GetColor();
|
||||
rPropSet->setPropertyValue(pNm, aTmp);
|
||||
rPropSet->setPropertyValue(aNm, aTmp);
|
||||
}
|
||||
}
|
||||
aFont.SetColor(static_cast<const SvxColorItem*>(pItem)->GetValue());
|
||||
@ -2328,26 +2328,26 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
|
||||
case RES_CHRATR_FONT:
|
||||
{
|
||||
const SvxFontItem *pFontItem = static_cast<const SvxFontItem *>(pItem);
|
||||
OUString pNm;
|
||||
if (xPropSetInfo->hasPropertyByName(pNm = "FontStyleName"))
|
||||
OUString aNm;
|
||||
if (xPropSetInfo->hasPropertyByName(aNm = "FontStyleName"))
|
||||
{
|
||||
aTmp <<= OUString( pFontItem->GetStyleName());
|
||||
rPropSet->setPropertyValue( pNm, aTmp );
|
||||
rPropSet->setPropertyValue( aNm, aTmp );
|
||||
}
|
||||
if (xPropSetInfo->hasPropertyByName(pNm = "FontFamily"))
|
||||
if (xPropSetInfo->hasPropertyByName(aNm = "FontFamily"))
|
||||
{
|
||||
aTmp <<= (sal_Int16)pFontItem->GetFamily();
|
||||
rPropSet->setPropertyValue( pNm, aTmp );
|
||||
rPropSet->setPropertyValue( aNm, aTmp );
|
||||
}
|
||||
if (xPropSetInfo->hasPropertyByName(pNm = "FontCharset"))
|
||||
if (xPropSetInfo->hasPropertyByName(aNm = "FontCharset"))
|
||||
{
|
||||
aTmp <<= (sal_Int16)pFontItem->GetCharSet();
|
||||
rPropSet->setPropertyValue( pNm, aTmp );
|
||||
rPropSet->setPropertyValue( aNm, aTmp );
|
||||
}
|
||||
if (xPropSetInfo->hasPropertyByName(pNm = "FontPitch"))
|
||||
if (xPropSetInfo->hasPropertyByName(aNm = "FontPitch"))
|
||||
{
|
||||
aTmp <<= (sal_Int16)pFontItem->GetPitch();
|
||||
rPropSet->setPropertyValue( pNm, aTmp );
|
||||
rPropSet->setPropertyValue( aNm, aTmp );
|
||||
}
|
||||
|
||||
aTmp <<= OUString( pFontItem->GetFamilyName());
|
||||
|
@ -534,8 +534,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
|
||||
aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT ) );
|
||||
OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?");
|
||||
if (pFieldmark!=nullptr) {
|
||||
const IFieldmark::parameter_map_t& pParametersToAdd = m_aFieldStack.back().getParameters();
|
||||
pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end());
|
||||
const IFieldmark::parameter_map_t& rParametersToAdd = m_aFieldStack.back().getParameters();
|
||||
pFieldmark->GetParameters()->insert(rParametersToAdd.begin(), rParametersToAdd.end());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -607,8 +607,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
|
||||
ODF_UNHANDLED );
|
||||
if ( pFieldmark )
|
||||
{
|
||||
const IFieldmark::parameter_map_t& pParametersToAdd = m_aFieldStack.back().getParameters();
|
||||
pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end());
|
||||
const IFieldmark::parameter_map_t& rParametersToAdd = m_aFieldStack.back().getParameters();
|
||||
pFieldmark->GetParameters()->insert(rParametersToAdd.begin(), rParametersToAdd.end());
|
||||
OUString sFieldId = OUString::number( m_aFieldStack.back().mnFieldId );
|
||||
pFieldmark->GetParameters()->insert(
|
||||
std::pair< OUString, uno::Any > (
|
||||
|
@ -370,10 +370,10 @@ SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl* pColl, bool bSende
|
||||
};
|
||||
|
||||
// BruteForce merge because MergeRange in SvTools is buggy:
|
||||
std::vector<sal_uInt16> pVec = ::lcl_convertRangesToList(pRanges);
|
||||
std::vector<sal_uInt16> aVec2 = ::lcl_convertRangesToList(pRanges);
|
||||
std::vector<sal_uInt16> aVec = ::lcl_convertRangesToList(aRanges);
|
||||
pVec.insert(pVec.end(), aVec.begin(), aVec.end());
|
||||
std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(pVec));
|
||||
aVec2.insert(aVec2.end(), aVec.begin(), aVec.end());
|
||||
std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(aVec2));
|
||||
|
||||
pAddrSet = new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(),
|
||||
pNewRanges.get());
|
||||
|
@ -1156,7 +1156,7 @@ void SwSidebarWin::SetReadonly(bool bSet)
|
||||
|
||||
void SwSidebarWin::SetLanguage(const SvxLanguageItem& rNewItem)
|
||||
{
|
||||
Link<LinkParamNone*,void> pLink = Engine()->GetModifyHdl();
|
||||
Link<LinkParamNone*,void> aLink = Engine()->GetModifyHdl();
|
||||
Engine()->SetModifyHdl( Link<LinkParamNone*,void>() );
|
||||
ESelection aOld = GetOutlinerView()->GetSelection();
|
||||
|
||||
@ -1167,7 +1167,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem& rNewItem)
|
||||
GetOutlinerView()->SetAttribs( aEditAttr );
|
||||
|
||||
GetOutlinerView()->SetSelection(aOld);
|
||||
Engine()->SetModifyHdl( pLink );
|
||||
Engine()->SetModifyHdl( aLink );
|
||||
|
||||
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
|
||||
EEControlBits nCntrl = Engine()->GetControlWord();
|
||||
|
@ -635,15 +635,15 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
|
||||
{
|
||||
std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >>
|
||||
vFontHeight = rSh.GetItemWithPaM( RES_CHRATR_FONTSIZE );
|
||||
for ( std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM>>& pIt : vFontHeight )
|
||||
for ( const std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM>>& aIt : vFontHeight )
|
||||
{
|
||||
if (!pIt.first)
|
||||
if (!aIt.first)
|
||||
{
|
||||
rSet.DisableItem(FN_GROW_FONT_SIZE);
|
||||
rSet.DisableItem(FN_SHRINK_FONT_SIZE);
|
||||
break;
|
||||
}
|
||||
pSize = static_cast<const SvxFontHeightItem*>( pIt.first );
|
||||
pSize = static_cast<const SvxFontHeightItem*>( aIt.first );
|
||||
sal_uInt32 nSize = pSize->GetHeight();
|
||||
if( nSize == nFontMaxSz )
|
||||
rSet.DisableItem( FN_GROW_FONT_SIZE );
|
||||
|
@ -420,7 +420,7 @@ public:
|
||||
}
|
||||
~MailMergeExecuteFinalizer()
|
||||
{
|
||||
osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
|
||||
osl::MutexGuard aMgrGuard( GetMailMergeMutex() );
|
||||
m_pMailMerge->m_pMgr = nullptr;
|
||||
}
|
||||
|
||||
@ -838,7 +838,7 @@ void SAL_CALL SwXMailMerge::cancel() throw (css::uno::RuntimeException, std::exc
|
||||
{
|
||||
// Cancel may be called from a second thread, so this protects from m_pMgr
|
||||
/// cleanup in the execute function.
|
||||
osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
|
||||
osl::MutexGuard aMgrGuard( GetMailMergeMutex() );
|
||||
if (m_pMgr)
|
||||
m_pMgr->MergeCancel();
|
||||
}
|
||||
|
@ -2711,10 +2711,10 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
|
||||
}
|
||||
if ( !hasObjectMarked )
|
||||
{
|
||||
SwEditWin& pEditWindow = m_pActiveShell->GetView().GetEditWin();
|
||||
SwEditWin& rEditWindow = m_pActiveShell->GetView().GetEditWin();
|
||||
vcl::KeyCode tempKeycode( KEY_ESCAPE );
|
||||
KeyEvent rKEvt( 0 , tempKeycode );
|
||||
static_cast<vcl::Window*>(&pEditWindow)->KeyInput( rKEvt );
|
||||
static_cast<vcl::Window*>(&rEditWindow)->KeyInput( rKEvt );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user