summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-11 15:20:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-11 15:20:37 +0100
commitffa172e1b3418204ee759c0c67f8441cb208ad89 (patch)
tree7cc392c6a47eadfe8ab405a7231154e5b07462ab
parent482676d6569aa12c8d14e73863ceba719c0e1f36 (diff)
#i112786# make ConfigManager a well-behaved singleton
-rw-r--r--filter/source/pdf/pdfexport.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 43f6f1faf2f1..cb5702252a8b 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -759,18 +759,15 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
}
// getting the string for the producer
String aProducer;
- ::utl::ConfigManager* pMgr = ::utl::ConfigManager::GetConfigManager();
- if ( pMgr )
- {
- Any aProductName = pMgr->GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
- ::rtl::OUString sProductName;
- aProductName >>= sProductName;
- aProducer = sProductName;
- aProductName = pMgr->GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
- aProductName >>= sProductName;
- aProducer.AppendAscii(" ");
- aProducer += String( sProductName );
- }
+ ::utl::ConfigManager& rMgr = ::utl::ConfigManager::GetConfigManager();
+ Any aProductName = rMgr.GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
+ ::rtl::OUString sProductName;
+ aProductName >>= sProductName;
+ aProducer = sProductName;
+ aProductName = rMgr.GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
+ aProductName >>= sProductName;
+ aProducer.AppendAscii(" ");
+ aProducer += String( sProductName );
aDocInfo.Producer = aProducer;
aDocInfo.Creator = aCreator;