summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-17 16:40:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-18 11:00:17 +0000
commitc19c242ec0757d5d5f2936e2a57430e39c692b2b (patch)
treefe8f71cab2739904472e74597e04aadefd9d19dc /sfx2
parent1215efbf616024bc262f94c38038d6de6d960b17 (diff)
boost->std
Change-Id: I412137e7e7b9b2b87f401bc140a9499d1fc012c6
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/Metadatable.cxx50
-rw-r--r--sfx2/source/doc/docmacromode.cxx30
2 files changed, 40 insertions, 40 deletions
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 331ad889f7b4..c12392466752 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -235,7 +235,7 @@ public:
const bool i_bCopyPrecedesSource);
/** create a Undo Metadatable for i_rObject. */
- ::boost::shared_ptr<MetadatableUndo> CreateUndo(
+ std::shared_ptr<MetadatableUndo> CreateUndo(
Metadatable const& i_rObject);
/** merge i_rMerged and i_rOther into i_rMerged. */
@@ -339,7 +339,7 @@ private:
const OUString & i_rIdref) const SAL_OVERRIDE;
/** create a Clipboard Metadatable for i_rObject. */
- ::boost::shared_ptr<MetadatableClipboard> CreateClipboard(
+ std::shared_ptr<MetadatableClipboard> CreateClipboard(
const bool i_isInContent);
struct XmlIdRegistry_Impl;
@@ -852,12 +852,12 @@ void XmlIdRegistryDocument::RegisterCopy(Metadatable const& i_rSource,
::std::make_pair(path, idref)));
}
-::boost::shared_ptr<MetadatableUndo>
+std::shared_ptr<MetadatableUndo>
XmlIdRegistryDocument::CreateUndo(Metadatable const& i_rObject)
{
OSL_TRACE("CreateUndo: %p", &i_rObject);
- return ::boost::shared_ptr<MetadatableUndo>(
+ return std::shared_ptr<MetadatableUndo>(
new MetadatableUndo(i_rObject.IsInContent()) );
}
@@ -912,17 +912,17 @@ XmlIdRegistryDocument::JoinMetadatables(
struct RMapEntry
{
- RMapEntry() : m_pLink() { }
+ RMapEntry() : m_xLink() { }
RMapEntry(OUString const& i_rStream,
OUString const& i_rXmlId,
- ::boost::shared_ptr<MetadatableClipboard> const& i_pLink
- = ::boost::shared_ptr<MetadatableClipboard>())
- : m_Stream(i_rStream), m_XmlId(i_rXmlId), m_pLink(i_pLink)
+ std::shared_ptr<MetadatableClipboard> const& i_pLink
+ = std::shared_ptr<MetadatableClipboard>())
+ : m_Stream(i_rStream), m_XmlId(i_rXmlId), m_xLink(i_pLink)
{}
OUString m_Stream;
OUString m_XmlId;
// this would have been an auto_ptr, if only that would have compiled...
- ::boost::shared_ptr<MetadatableClipboard> m_pLink;
+ std::shared_ptr<MetadatableClipboard> m_xLink;
};
/// element -> (stream name, idref, source)
@@ -1041,7 +1041,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupXmlId(
"null id in m_XmlIdReverseMap");
o_rStream = iter->second.m_Stream;
o_rIdref = iter->second.m_XmlId;
- o_rpLink = iter->second.m_pLink.get();
+ o_rpLink = iter->second.m_xLink.get();
return true;
}
else
@@ -1235,12 +1235,12 @@ void XmlIdRegistryClipboard::RemoveXmlIdForElement(const Metadatable& i_rObject)
-::boost::shared_ptr<MetadatableClipboard>
+std::shared_ptr<MetadatableClipboard>
XmlIdRegistryClipboard::CreateClipboard(const bool i_isInContent)
{
OSL_TRACE("CreateClipboard:");
- return ::boost::shared_ptr<MetadatableClipboard>(
+ return std::shared_ptr<MetadatableClipboard>(
new MetadatableClipboard(i_isInContent) );
}
@@ -1275,11 +1275,11 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
OSL_ENSURE(success, "RegisterCopyClipboard: TryInsert failed?");
(void) success;
}
- const ::boost::shared_ptr<MetadatableClipboard> pLink(
+ const std::shared_ptr<MetadatableClipboard> xLink(
CreateClipboard( isContentFile(i_rReference.First)) );
m_pImpl->m_XmlIdReverseMap.insert(::std::make_pair(&i_rCopy,
- RMapEntry(i_rReference.First, i_rReference.Second, pLink)));
- return *pLink.get();
+ RMapEntry(i_rReference.First, i_rReference.Second, xLink)));
+ return *xLink.get();
}
MetadatableClipboard const*
@@ -1481,7 +1481,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource,
}
}
-::boost::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const
+std::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const
{
OSL_ENSURE(!IsInUndo(), "CreateUndo called for object in undo?");
OSL_ENSURE(!IsInClipboard(), "CreateUndo called for object in clipboard?");
@@ -1491,29 +1491,29 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource,
{
XmlIdRegistryDocument * pRegDoc(
dynamic_cast<XmlIdRegistryDocument*>( m_pReg ) );
- ::boost::shared_ptr<MetadatableUndo> pUndo(
+ std::shared_ptr<MetadatableUndo> xUndo(
pRegDoc->CreateUndo(*this) );
- pRegDoc->RegisterCopy(*this, *pUndo, false);
- pUndo->m_pReg = pRegDoc;
- return pUndo;
+ pRegDoc->RegisterCopy(*this, *xUndo, false);
+ xUndo->m_pReg = pRegDoc;
+ return xUndo;
}
}
catch (const uno::Exception &)
{
OSL_FAIL("Metadatable::CreateUndo: exception");
}
- return ::boost::shared_ptr<MetadatableUndo>();
+ return std::shared_ptr<MetadatableUndo>();
}
-::boost::shared_ptr<MetadatableUndo> Metadatable::CreateUndoForDelete()
+std::shared_ptr<MetadatableUndo> Metadatable::CreateUndoForDelete()
{
- ::boost::shared_ptr<MetadatableUndo> const pUndo( CreateUndo() );
+ std::shared_ptr<MetadatableUndo> const xUndo( CreateUndo() );
RemoveMetadataReference();
- return pUndo;
+ return xUndo;
}
void Metadatable::RestoreMetadata(
- ::boost::shared_ptr<MetadatableUndo> const& i_pUndo)
+ std::shared_ptr<MetadatableUndo> const& i_pUndo)
{
OSL_ENSURE(!IsInUndo(), "RestoreMetadata called for object in undo?");
OSL_ENSURE(!IsInClipboard(),
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index a032d8051685..54fd58ef51f0 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -134,7 +134,7 @@ namespace sfx2
DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& rDocumentAccess )
- :m_pData( new DocumentMacroMode_Data( rDocumentAccess ) )
+ :m_xData( new DocumentMacroMode_Data( rDocumentAccess ) )
{
}
@@ -146,26 +146,26 @@ namespace sfx2
bool DocumentMacroMode::allowMacroExecution()
{
- m_pData->m_rDocumentAccess.setCurrentMacroExecMode( MacroExecMode::ALWAYS_EXECUTE_NO_WARN );
+ m_xData->m_rDocumentAccess.setCurrentMacroExecMode( MacroExecMode::ALWAYS_EXECUTE_NO_WARN );
return true;
}
bool DocumentMacroMode::disallowMacroExecution()
{
- m_pData->m_rDocumentAccess.setCurrentMacroExecMode( MacroExecMode::NEVER_EXECUTE );
+ m_xData->m_rDocumentAccess.setCurrentMacroExecMode( MacroExecMode::NEVER_EXECUTE );
return false;
}
bool DocumentMacroMode::adjustMacroMode( const Reference< XInteractionHandler >& rxInteraction )
{
- sal_uInt16 nMacroExecutionMode = m_pData->m_rDocumentAccess.getCurrentMacroExecMode();
+ sal_uInt16 nMacroExecutionMode = m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
if ( SvtSecurityOptions().IsMacroDisabled() )
{
// no macro should be executed at all
- lcl_showMacrosDisabledError( rxInteraction, m_pData->m_bMacroDisabledMessageShown );
+ lcl_showMacrosDisabledError( rxInteraction, m_xData->m_bMacroDisabledMessageShown );
return disallowMacroExecution();
}
@@ -217,7 +217,7 @@ namespace sfx2
try
{
- OUString sReferrer( m_pData->m_rDocumentAccess.getDocumentLocation() );
+ OUString sReferrer( m_xData->m_rDocumentAccess.getDocumentLocation() );
// get document location from medium name and check whether it is a trusted one
// the service is created ohne document version, since it is not of interest here
@@ -236,7 +236,7 @@ namespace sfx2
// at this point it is clear that the document is not in the secure location
if ( nMacroExecutionMode == MacroExecMode::FROM_LIST_NO_WARN )
{
- lcl_showDocumentMacrosDisabledError( rxInteraction, m_pData->m_bDocMacroDisabledMessageShown );
+ lcl_showDocumentMacrosDisabledError( rxInteraction, m_xData->m_bDocMacroDisabledMessageShown );
return disallowMacroExecution();
}
@@ -244,14 +244,14 @@ namespace sfx2
if ( nMacroExecutionMode != MacroExecMode::FROM_LIST )
{
// the trusted macro check will also retrieve the signature state ( small optimization )
- bool bHasTrustedMacroSignature = m_pData->m_rDocumentAccess.hasTrustedScriptingSignature( nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN );
+ bool bHasTrustedMacroSignature = m_xData->m_rDocumentAccess.hasTrustedScriptingSignature( nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN );
- sal_uInt16 nSignatureState = m_pData->m_rDocumentAccess.getScriptingSignatureState();
+ sal_uInt16 nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState();
if ( nSignatureState == SIGNATURESTATE_SIGNATURES_BROKEN )
{
// the signature is broken, no macro execution
if ( nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN )
- m_pData->m_rDocumentAccess.showBrokenSignatureWarning( rxInteraction );
+ m_xData->m_rDocumentAccess.showBrokenSignatureWarning( rxInteraction );
return disallowMacroExecution();
}
@@ -274,7 +274,7 @@ namespace sfx2
)
{
if ( nMacroExecutionMode == MacroExecMode::FROM_LIST_AND_SIGNED_WARN )
- lcl_showDocumentMacrosDisabledError( rxInteraction, m_pData->m_bDocMacroDisabledMessageShown );
+ lcl_showDocumentMacrosDisabledError( rxInteraction, m_xData->m_bDocMacroDisabledMessageShown );
return disallowMacroExecution();
}
@@ -295,7 +295,7 @@ namespace sfx2
if ( eAutoConfirm == eNoAutoConfirm )
{
- OUString sReferrer( m_pData->m_rDocumentAccess.getDocumentLocation() );
+ OUString sReferrer( m_xData->m_rDocumentAccess.getDocumentLocation() );
OUString aSystemFileURL;
if ( osl::FileBase::getSystemPathFromFileURL( sReferrer, aSystemFileURL ) == osl::FileBase::E_None )
@@ -312,7 +312,7 @@ namespace sfx2
bool DocumentMacroMode::isMacroExecutionDisallowed() const
{
- return m_pData->m_rDocumentAccess.getCurrentMacroExecMode() == MacroExecMode::NEVER_EXECUTE;
+ return m_xData->m_rDocumentAccess.getCurrentMacroExecMode() == MacroExecMode::NEVER_EXECUTE;
}
@@ -369,7 +369,7 @@ namespace sfx2
#if HAVE_FEATURE_SCRIPTING
try
{
- Reference< XEmbeddedScripts > xScripts( m_pData->m_rDocumentAccess.getEmbeddedDocumentScripts() );
+ Reference< XEmbeddedScripts > xScripts( m_xData->m_rDocumentAccess.getEmbeddedDocumentScripts() );
Reference< XLibraryContainer > xContainer;
if ( xScripts.is() )
xContainer.set( xScripts->getBasicLibraries(), UNO_QUERY_THROW );
@@ -422,7 +422,7 @@ namespace sfx2
}
else
{
- if ( m_pData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() )
+ if ( m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() )
{
bAllow = adjustMacroMode( rxInteraction );
}