[Libreoffice-commits] .: extensions/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 9 12:36:58 PST 2013


 extensions/source/bibliography/bibbeam.cxx   |    6 -
 extensions/source/bibliography/bibconfig.cxx |  130 +++++++++++++--------------
 extensions/source/bibliography/bibcont.cxx   |    1 
 extensions/source/bibliography/bibload.cxx   |   27 ++---
 extensions/source/bibliography/bibmod.cxx    |   23 ++--
 extensions/source/bibliography/bibview.cxx   |    6 -
 extensions/source/bibliography/datman.cxx    |  114 +++++++++++------------
 extensions/source/bibliography/framectr.cxx  |   46 ++++-----
 extensions/source/bibliography/general.cxx   |   22 ++--
 extensions/source/bibliography/toolbar.cxx   |   17 +--
 10 files changed, 185 insertions(+), 207 deletions(-)

New commits:
commit 4b1db520a032635afcde2b65369ab4722bfc862e
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Jan 9 21:35:46 2013 +0100

    extensions: kill no longer needed C2U and C2S

diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx
index bfde70b..4eaf83a 100644
--- a/extensions/source/bibliography/bibbeam.cxx
+++ b/extensions/source/bibliography/bibbeam.cxx
@@ -40,8 +40,6 @@ using namespace ::com::sun::star::uno;
 
 using ::rtl::OUString;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
 #define PROPERTY_FRAME                      1
 #define ID_TOOLBAR                          1
 #define ID_GRIDWIN                          2
@@ -147,7 +145,7 @@ namespace bib
 
                 if ( xPropSet.is() && m_xGridModel.is() )
                 {
-                    uno::Any aAny = xPropSet->getPropertyValue( C2U("DefaultControl") );
+                    uno::Any aAny = xPropSet->getPropertyValue( "DefaultControl" );
                     rtl::OUString aControlName;
                     aAny >>= aControlName;
 
@@ -160,7 +158,7 @@ namespace bib
                 if ( m_xControl.is() )
                 {
                     // Peer als Child zu dem FrameWindow
-                    m_xControlContainer->addControl(C2U("GridControl"), m_xControl);
+                    m_xControlContainer->addControl("GridControl", m_xControl);
                     m_xGridWin=uno::Reference< awt::XWindow > (m_xControl, UNO_QUERY );
                     // #100312# -----
                     m_xDispatchProviderInterception=uno::Reference< frame::XDispatchProviderInterception > (m_xControl, UNO_QUERY );
diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx
index 0d77ffb..e8ff2f2 100644
--- a/extensions/source/bibliography/bibconfig.cxx
+++ b/extensions/source/bibliography/bibconfig.cxx
@@ -35,9 +35,7 @@ using namespace ::com::sun::star::sdb;
 
 using ::rtl::OUString;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
-const char* cDataSourceHistory = "DataSourceHistory";
+const char cDataSourceHistory[] = "DataSourceHistory";
 
 Sequence<OUString> BibConfig::GetPropertyNames()
 {
@@ -46,57 +44,57 @@ Sequence<OUString> BibConfig::GetPropertyNames()
     {
         aNames.realloc(8);
         OUString* pNames = aNames.getArray();
-        pNames[0] = C2U("CurrentDataSource/DataSourceName");
-        pNames[1] = C2U("CurrentDataSource/Command");
-        pNames[2] = C2U("CurrentDataSource/CommandType");
-        pNames[3] = C2U("BeamerHeight");
-        pNames[4] = C2U("ViewHeight");
-        pNames[5] = C2U("QueryText");
-        pNames[6] = C2U("QueryField");
-        pNames[7] = C2U("ShowColumnAssignmentWarning");
+        pNames[0] = "CurrentDataSource/DataSourceName";
+        pNames[1] = "CurrentDataSource/Command";
+        pNames[2] = "CurrentDataSource/CommandType";
+        pNames[3] = "BeamerHeight";
+        pNames[4] = "ViewHeight";
+        pNames[5] = "QueryText";
+        pNames[6] = "QueryField";
+        pNames[7] = "ShowColumnAssignmentWarning";
     }
     return aNames;
 }
 
 BibConfig::BibConfig() :
-    ConfigItem(C2U("Office.DataAccess/Bibliography"), CONFIG_MODE_DELAYED_UPDATE),
+    ConfigItem("Office.DataAccess/Bibliography", CONFIG_MODE_DELAYED_UPDATE),
     pMappingsArr(new MappingArray),
     nBeamerSize(0),
     nViewSize(0),
     bShowColumnAssignmentWarning(sal_False)
 {
     //Names of the default columns
-    aColumnDefaults[0] = C2U("Identifier");
-    aColumnDefaults[1] = C2U("BibliographyType");
-    aColumnDefaults[2] = C2U("Author");
-    aColumnDefaults[3] = C2U("Title");
-    aColumnDefaults[4] = C2U("Year");
-    aColumnDefaults[5] = C2U("ISBN");
-    aColumnDefaults[6] = C2U("Booktitle");
-    aColumnDefaults[7] = C2U("Chapter");
-    aColumnDefaults[8] = C2U("Edition");
-    aColumnDefaults[9] = C2U("Editor");
-    aColumnDefaults[10] = C2U("Howpublished");
-    aColumnDefaults[11] = C2U("Institution");
-    aColumnDefaults[12] = C2U("Journal");
-    aColumnDefaults[13] = C2U("Month");
-    aColumnDefaults[14] = C2U("Note");
-    aColumnDefaults[15] = C2U("Annote");
-    aColumnDefaults[16] = C2U("Number");
-    aColumnDefaults[17] = C2U("Organizations");
-    aColumnDefaults[18] = C2U("Pages");
-    aColumnDefaults[19] = C2U("Publisher");
-    aColumnDefaults[20] = C2U("Address");
-    aColumnDefaults[21] = C2U("School");
-    aColumnDefaults[22] = C2U("Series");
-    aColumnDefaults[23] = C2U("ReportType");
-    aColumnDefaults[24] = C2U("Volume");
-    aColumnDefaults[25] = C2U("URL");
-    aColumnDefaults[26] = C2U("Custom1");
-    aColumnDefaults[27] = C2U("Custom2");
-    aColumnDefaults[28] = C2U("Custom3");
-    aColumnDefaults[29] = C2U("Custom4");
-    aColumnDefaults[30] = C2U("Custom5");
+    aColumnDefaults[0] = "Identifier";
+    aColumnDefaults[1] = "BibliographyType";
+    aColumnDefaults[2] = "Author";
+    aColumnDefaults[3] = "Title";
+    aColumnDefaults[4] = "Year";
+    aColumnDefaults[5] = "ISBN";
+    aColumnDefaults[6] = "Booktitle";
+    aColumnDefaults[7] = "Chapter";
+    aColumnDefaults[8] = "Edition";
+    aColumnDefaults[9] = "Editor";
+    aColumnDefaults[10] = "Howpublished";
+    aColumnDefaults[11] = "Institution";
+    aColumnDefaults[12] = "Journal";
+    aColumnDefaults[13] = "Month";
+    aColumnDefaults[14] = "Note";
+    aColumnDefaults[15] = "Annote";
+    aColumnDefaults[16] = "Number";
+    aColumnDefaults[17] = "Organizations";
+    aColumnDefaults[18] = "Pages";
+    aColumnDefaults[19] = "Publisher";
+    aColumnDefaults[20] = "Address";
+    aColumnDefaults[21] = "School";
+    aColumnDefaults[22] = "Series";
+    aColumnDefaults[23] = "ReportType";
+    aColumnDefaults[24] = "Volume";
+    aColumnDefaults[25] = "URL";
+    aColumnDefaults[26] = "Custom1";
+    aColumnDefaults[27] = "Custom2";
+    aColumnDefaults[28] = "Custom3";
+    aColumnDefaults[29] = "Custom4";
+    aColumnDefaults[30] = "Custom5";
 
 
     const Sequence< OUString > aPropertyNames = GetPropertyNames();
@@ -124,20 +122,20 @@ BibConfig::BibConfig() :
             }
         }
     }
-    OUString sName(C2U("DataSourceName"));
-    OUString sTable(C2U("Command"));
-    OUString sCommandType(C2U("CommandType"));
-    Sequence< OUString > aNodeNames = GetNodeNames(C2U(cDataSourceHistory));
+    OUString sName("DataSourceName");
+    OUString sTable("Command");
+    OUString sCommandType("CommandType");
+    Sequence< OUString > aNodeNames = GetNodeNames(cDataSourceHistory);
     const OUString* pNodeNames = aNodeNames.getConstArray();
     for(sal_Int32 nNode = 0; nNode < aNodeNames.getLength(); nNode++)
     {
         Sequence<OUString> aHistoryNames(3);
         OUString* pHistoryNames = aHistoryNames.getArray();
 
-        OUString sPrefix(C2U(cDataSourceHistory));
-        sPrefix += C2U("/");
+        OUString sPrefix(cDataSourceHistory);
+        sPrefix += "/";
         sPrefix += pNodeNames[nNode];
-        sPrefix += C2U("/");
+        sPrefix += "/";
         pHistoryNames[0] = sPrefix;
         pHistoryNames[0] += sName;
         pHistoryNames[1] = sPrefix;
@@ -155,7 +153,7 @@ BibConfig::BibConfig() :
             pHistoryValues[1] >>= pMapping->sTableName;
             pHistoryValues[2] >>= pMapping->nCommandType;
             //field assignment is contained in another set
-            sPrefix += C2U("Fields");
+            sPrefix += "Fields";
             Sequence< OUString > aAssignmentNodeNames = GetNodeNames(sPrefix);
             const OUString* pAssignmentNodeNames = aAssignmentNodeNames.getConstArray();
             Sequence<OUString> aAssignmentPropertyNames(aAssignmentNodeNames.getLength() * 2);
@@ -164,12 +162,12 @@ BibConfig::BibConfig() :
             for(sal_Int16 nField = 0; nField < aAssignmentNodeNames.getLength(); nField++)
             {
                 OUString sSubPrefix(sPrefix);
-                sSubPrefix += C2U("/");
+                sSubPrefix += "/";
                 sSubPrefix += pAssignmentNodeNames[nField];
                 pAssignmentPropertyNames[nFieldIdx] = sSubPrefix;
-                pAssignmentPropertyNames[nFieldIdx++] += C2U("/ProgrammaticFieldName");
+                pAssignmentPropertyNames[nFieldIdx++] += "/ProgrammaticFieldName";
                 pAssignmentPropertyNames[nFieldIdx] = sSubPrefix;
-                pAssignmentPropertyNames[nFieldIdx++]   += C2U("/AssignedFieldName");
+                pAssignmentPropertyNames[nFieldIdx++]   += "/AssignedFieldName";
             }
             Sequence<Any> aAssignmentValues = GetProperties(aAssignmentPropertyNames);
             const Any* pAssignmentValues = aAssignmentValues.getConstArray();
@@ -243,21 +241,21 @@ void    BibConfig::Commit()
         }
     }
     PutProperties(aPropertyNames, aValues);
-    ClearNodeSet( C2U(cDataSourceHistory));
+    ClearNodeSet(cDataSourceHistory);
     Sequence< PropertyValue > aNodeValues(pMappingsArr->size() * 3);
     PropertyValue* pNodeValues = aNodeValues.getArray();
 
     sal_Int32 nIndex = 0;
-    OUString sName(C2U("DataSourceName"));
-    OUString sTable(C2U("Command"));
-    OUString sCommandType(C2U("CommandType"));
+    OUString sName("DataSourceName");
+    OUString sTable("Command");
+    OUString sCommandType("CommandType");
     for(sal_Int32 i = 0; i < (sal_Int32)pMappingsArr->size(); i++)
     {
         const Mapping* pMapping = &(*pMappingsArr)[i];
-        OUString sPrefix(C2U(cDataSourceHistory));
-        sPrefix += C2U("/_");
+        OUString sPrefix(cDataSourceHistory);
+        sPrefix += "/_";
         sPrefix += OUString::valueOf(i);
-        sPrefix += C2U("/");
+        sPrefix += "/";
         pNodeValues[nIndex].Name    = sPrefix;
         pNodeValues[nIndex].Name    += sName;
         pNodeValues[nIndex++].Value <<= pMapping->sURL;
@@ -267,19 +265,19 @@ void    BibConfig::Commit()
         pNodeValues[nIndex].Name    = sPrefix;
         pNodeValues[nIndex].Name    += sCommandType;
         pNodeValues[nIndex++].Value <<= pMapping->nCommandType;
-        SetSetProperties( C2U(cDataSourceHistory), aNodeValues);
+        SetSetProperties(cDataSourceHistory, aNodeValues);
 
-        sPrefix += C2U("Fields");
+        sPrefix += "Fields";
         sal_Int32 nFieldAssignment = 0;
-        OUString sFieldName = C2U("/ProgrammaticFieldName");
-        OUString sDatabaseFieldName = C2U("/AssignedFieldName");
+        OUString sFieldName = "/ProgrammaticFieldName";
+        OUString sDatabaseFieldName = "/AssignedFieldName";
         ClearNodeSet( sPrefix );
 
         while(nFieldAssignment < COLUMN_COUNT &&
             !pMapping->aColumnPairs[nFieldAssignment].sLogicalColumnName.isEmpty())
         {
             OUString sSubPrefix(sPrefix);
-            sSubPrefix += C2U("/_");
+            sSubPrefix += "/_";
             sSubPrefix += OUString::valueOf(nFieldAssignment);
             Sequence< PropertyValue > aAssignmentValues(2);
             PropertyValue* pAssignmentValues = aAssignmentValues.getArray();
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index c61ea5f..ceaf1c6 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -76,7 +76,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 using namespace ::rtl;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
 #define PROPERTY_FRAME                      1
 //split window size is a percent value
 #define WIN_MIN_HEIGHT 10
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 537010e..52c84c6 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -72,11 +72,6 @@ using namespace ::com::sun::star::form;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::frame;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
-
-//-----------------------------------------------------------------------------
-
 #define PROPERTY_FRAME                      1
 
 class BibliographyLoader : public cppu::WeakImplHelper4
@@ -111,7 +106,7 @@ public:
 
                             {
                                 //!
-                                return C2U("com.sun.star.extensions.Bibliography");
+                                return OUString("com.sun.star.extensions.Bibliography");
                                 //!
                             }
 
@@ -194,9 +189,9 @@ Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames(void) thr
 Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames_Static(void) throw(  )
 {
     Sequence< rtl::OUString > aSNS( 2 );
-    aSNS.getArray()[0] = C2U("com.sun.star.frame.FrameLoader");
+    aSNS.getArray()[0] = "com.sun.star.frame.FrameLoader";
     //!
-    aSNS.getArray()[1] = C2U("com.sun.star.frame.Bibliography");
+    aSNS.getArray()[1] = "com.sun.star.frame.Bibliography";
     //!
     return aSNS;
 }
@@ -247,7 +242,7 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const rtl::OUS
     {
         Any aTitle;
         aTitle <<= OUString(String(BibResId(RID_BIB_STR_FRAME_TITLE)));
-        xPrSet->setPropertyValue(C2U("Title"), aTitle);
+        xPrSet->setPropertyValue("Title", aTitle);
     }
     if(aPartName.EqualsAscii("View") || aPartName.EqualsAscii("View1"))
     {
@@ -352,22 +347,22 @@ Reference< XNameAccess >  BibliographyLoader::GetDataColumns() const
     if (!m_xColumns.is())
     {
         Reference< XMultiServiceFactory >  xMgr = comphelper::getProcessServiceFactory();
-        Reference< XRowSet >  xRowSet(xMgr->createInstance(C2U("com.sun.star.sdb.RowSet")), UNO_QUERY);
+        Reference< XRowSet >  xRowSet(xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY);
         Reference< XPropertySet >  xResultSetProps(xRowSet, UNO_QUERY);
         DBG_ASSERT(xResultSetProps.is() , "BibliographyLoader::GetDataCursor : invalid row set (no XResultSet or no XPropertySet) !");
 
         BibDBDescriptor aBibDesc = BibModul::GetConfig()->GetBibliographyURL();
 
         Any aBibUrlAny; aBibUrlAny <<= aBibDesc.sDataSource;
-        xResultSetProps->setPropertyValue(C2U("DataSourceName"), aBibUrlAny);
+        xResultSetProps->setPropertyValue("DataSourceName", aBibUrlAny);
         Any aCommandType; aCommandType <<= aBibDesc.nCommandType;
-        xResultSetProps->setPropertyValue(C2U("CommandType"), aCommandType);
+        xResultSetProps->setPropertyValue("CommandType", aCommandType);
         Any aTableName; aTableName <<= aBibDesc.sTableOrQuery;
-        xResultSetProps->setPropertyValue(C2U("Command"), aTableName);
+        xResultSetProps->setPropertyValue("Command", aTableName);
         Any aResultSetType; aResultSetType <<= (sal_Int32)(ResultSetType::SCROLL_INSENSITIVE);
-        xResultSetProps->setPropertyValue(C2U("ResultSetType"), aResultSetType);
+        xResultSetProps->setPropertyValue("ResultSetType", aResultSetType);
         Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)(ResultSetConcurrency::UPDATABLE);
-        xResultSetProps->setPropertyValue(C2U("ResultSetConcurrency"), aResultSetCurrency);
+        xResultSetProps->setPropertyValue("ResultSetConcurrency", aResultSetCurrency);
 
         sal_Bool bSuccess = sal_False;
         try
@@ -643,7 +638,7 @@ Any BibliographyLoader::getPropertyValue(const rtl::OUString& rPropertyName)
         CUSTOM5_POS                , // BibliographyDataField_CUSTOM5
         ISBN_POS                    //BibliographyDataField_ISBN
     };
-    if(C2U("BibliographyDataFieldNames") == rPropertyName)
+    if(rPropertyName == "BibliographyDataFieldNames")
     {
         Sequence<PropertyValue> aSeq(COLUMN_COUNT);
         PropertyValue* pArray = aSeq.getArray();
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
index 7b0f01b..74ad9b4 100644
--- a/extensions/source/bibliography/bibmod.cxx
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -38,9 +38,6 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::ucb;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-#define C2S(cChar) String::CreateFromAscii(cChar)
-
 HdlBibModul OpenBibModul()
 {
     if(pBibModul==NULL)
@@ -93,15 +90,15 @@ BibConfig*  BibModul::GetConfig()
 
 // PropertyNames
 #define STATIC_USTRING(a,b) rtl::OUString a(b)
-STATIC_USTRING(FM_PROP_LABEL,C2U("Label"));
-STATIC_USTRING(FM_PROP_CONTROLSOURCE,C2U("DataField"));
-STATIC_USTRING(FM_PROP_NAME,C2U("Name"));
-STATIC_USTRING(FM_PROP_FORMATKEY,C2U("FormatKey"));
-STATIC_USTRING(FM_PROP_EDITMODE,C2U("RecordMode"));
-STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,C2U("DataSelectionType"));
-STATIC_USTRING(FM_PROP_CURSORSOURCE,C2U("DataSelection"));
-STATIC_USTRING(FM_PROP_DATASOURCE, C2U("DataSource"));
-STATIC_USTRING(FM_PROP_VALUE,C2U("Value"));
-STATIC_USTRING(FM_PROP_TEXT,C2U("Text"));
+STATIC_USTRING(FM_PROP_LABEL,"Label");
+STATIC_USTRING(FM_PROP_CONTROLSOURCE,"DataField");
+STATIC_USTRING(FM_PROP_NAME,"Name");
+STATIC_USTRING(FM_PROP_FORMATKEY,"FormatKey");
+STATIC_USTRING(FM_PROP_EDITMODE,"RecordMode");
+STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,"DataSelectionType");
+STATIC_USTRING(FM_PROP_CURSORSOURCE,"DataSelection");
+STATIC_USTRING(FM_PROP_DATASOURCE, "DataSource");
+STATIC_USTRING(FM_PROP_VALUE,"Value");
+STATIC_USTRING(FM_PROP_TEXT,"Text");
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx
index e219d91..dac9071 100644
--- a/extensions/source/bibliography/bibview.cxx
+++ b/extensions/source/bibliography/bibview.cxx
@@ -42,8 +42,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 
-#define C2U( cChar ) ::rtl::OUString::createFromAscii( cChar )
-
 //.........................................................................
 namespace bib
 {
@@ -74,14 +72,14 @@ namespace bib
 
         if ( xResUpd.is() )
         {
-            Any aModified = xProps->getPropertyValue( C2U( "IsModified" ) );
+            Any aModified = xProps->getPropertyValue( "IsModified" );
             sal_Bool bFlag = sal_False;
             if ( ( aModified >>= bFlag ) && bFlag )
             {
 
                 try
                 {
-                    Any aNew = xProps->getPropertyValue( C2U( "IsNew" ) );
+                    Any aNew = xProps->getPropertyValue( "IsNew" );
                     aNew >>= bFlag;
                     if ( bFlag )
                         xResUpd->insertRow();
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 02a2946..298fe29 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -80,8 +80,6 @@ using namespace ::com::sun::star::form;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 
-#define C2U(cChar) ::rtl::OUString::createFromAscii(cChar)
-
 Reference< XConnection > getConnection(const ::rtl::OUString& _rURL)
 {
     // first get the sdb::DataSource corresponding to the url
@@ -133,7 +131,7 @@ Reference< XConnection >    getConnection(const Reference< XInterface > & xRowSe
         if (!xFormProps.is())
             return xConn;
 
-        xConn = Reference< XConnection > (*(Reference< XInterface > *)xFormProps->getPropertyValue(C2U("ActiveConnection")).getValue(), UNO_QUERY);
+        xConn = Reference< XConnection > (*(Reference< XInterface > *)xFormProps->getPropertyValue("ActiveConnection").getValue(), UNO_QUERY);
         if (!xConn.is())
         {
             DBG_WARNING("no active connection");
@@ -165,10 +163,10 @@ Reference< XNameAccess >  getColumns(const Reference< XForm > & _rxForm)
         {
             try
             {
-                DBG_ASSERT((*(sal_Int32*)xFormProps->getPropertyValue(C2U("CommandType")).getValue()) == CommandType::TABLE,
+                DBG_ASSERT((*(sal_Int32*)xFormProps->getPropertyValue("CommandType").getValue()) == CommandType::TABLE,
                     "::getColumns : invalid form (has no table as data source) !");
                 ::rtl::OUString sTable;
-                xFormProps->getPropertyValue(C2U("Command")) >>= sTable;
+                xFormProps->getPropertyValue("Command") >>= sTable;
                 Reference< XNameAccess >  xTables = xSupplyTables->getTables();
                 if (xTables.is() && xTables->hasByName(sTable))
                     xSupplyCols = Reference< XColumnsSupplier > (
@@ -699,11 +697,11 @@ void SAL_CALL BibInterceptorHelper::setMasterDispatchProvider( const ::com::sun:
 
 //-----------------------------------------------------------------------------
 #define STR_UID "uid"
-::rtl::OUString gGridName(C2U("theGrid"));
-::rtl::OUString gViewName(C2U("theView"));
-::rtl::OUString gGlobalName(C2U("theGlobals"));
-::rtl::OUString gBeamerSize(C2U("theBeamerSize"));
-::rtl::OUString gViewSize(C2U("theViewSize"));
+::rtl::OUString gGridName("theGrid");
+::rtl::OUString gViewName("theView");
+::rtl::OUString gGlobalName("theGlobals");
+::rtl::OUString gBeamerSize("theBeamerSize");
+::rtl::OUString gViewSize("theViewSize");
 
 BibDataManager::BibDataManager()
     :BibDataManager_Base( GetMutex() )
@@ -723,7 +721,7 @@ BibDataManager::~BibDataManager()
     if ( m_xForm.is() )
     {
         Reference< XComponent >  xConnection;
-        xPrSet->getPropertyValue(C2U("ActiveConnection")) >>= xConnection;
+        xPrSet->getPropertyValue("ActiveConnection") >>= xConnection;
         RemoveMeAsUidListener();
         if (xLoad.is())
             xLoad->unload();
@@ -776,7 +774,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
             xFields->getByName( *pFields ) >>= xField;
 
             ::rtl::OUString sCurrentModelType;
-            const ::rtl::OUString sType(C2U("Type"));
+            const ::rtl::OUString sType("Type");
             sal_Int32 nType = 0;
             sal_Bool bIsFormatted           = sal_False;
             sal_Bool bFormattedIsNumeric    = sal_True;
@@ -785,14 +783,14 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
             {
                 case DataType::BIT:
                 case DataType::BOOLEAN:
-                    sCurrentModelType = C2U("CheckBox");
+                    sCurrentModelType = "CheckBox";
                     break;
 
                 case DataType::BINARY:
                 case DataType::VARBINARY:
                 case DataType::LONGVARBINARY:
                 case DataType::BLOB:
-                    sCurrentModelType = C2U("TextField");
+                    sCurrentModelType = "TextField";
                     break;
 
                 case DataType::VARCHAR:
@@ -802,7 +800,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
                     bFormattedIsNumeric = sal_False;
                     // _NO_ break !
                 default:
-                    sCurrentModelType = C2U("FormattedField");
+                    sCurrentModelType = "FormattedField";
                     bIsFormatted = sal_True;
                     break;
             }
@@ -810,10 +808,10 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
             Reference< XPropertySet >  xCurrentCol = xColFactory->createColumn(sCurrentModelType);
             if (bIsFormatted)
             {
-                ::rtl::OUString sFormatKey(C2U("FormatKey"));
+                ::rtl::OUString sFormatKey("FormatKey");
                 xCurrentCol->setPropertyValue(sFormatKey, xField->getPropertyValue(sFormatKey));
                 Any aFormatted(&bFormattedIsNumeric, ::getBooleanCppuType());
-                xCurrentCol->setPropertyValue(C2U("TreatAsNumber"), aFormatted);
+                xCurrentCol->setPropertyValue("TreatAsNumber", aFormatted);
             }
             Any aColName = makeAny( *pFields );
             xCurrentCol->setPropertyValue(FM_PROP_CONTROLSOURCE,    aColName);
@@ -839,7 +837,7 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference<
     {
         Reference< XPropertySet >  aFormPropSet( xDbForm, UNO_QUERY );
         ::rtl::OUString sName;
-        aFormPropSet->getPropertyValue(C2U("Command")) >>= sName;
+        aFormPropSet->getPropertyValue("Command") >>= sName;
 
         if ( !m_xGridModel.is() )
         {
@@ -867,7 +865,7 @@ Reference< XForm >  BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc)
     try
     {
         Reference< XMultiServiceFactory >  xMgr = comphelper::getProcessServiceFactory();
-        m_xForm = Reference< XForm > ( xMgr->createInstance( C2U("com.sun.star.form.component.Form") ), UNO_QUERY );
+        m_xForm = Reference< XForm > ( xMgr->createInstance( "com.sun.star.form.component.Form" ), UNO_QUERY );
 
         Reference< XPropertySet >  aPropertySet( m_xForm, UNO_QUERY );
 
@@ -876,17 +874,17 @@ Reference< XForm >  BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc)
         {
             Any aVal;
             aVal <<= (sal_Int32)ResultSetType::SCROLL_INSENSITIVE;
-            aPropertySet->setPropertyValue(C2U("ResultSetType"),aVal );
+            aPropertySet->setPropertyValue("ResultSetType",aVal );
             aVal <<= (sal_Int32)ResultSetConcurrency::READ_ONLY;
-            aPropertySet->setPropertyValue(C2U("ResultSetConcurrency"), aVal);
+            aPropertySet->setPropertyValue("ResultSetConcurrency", aVal);
 
             //Caching for Performance
             aVal <<= (sal_Int32)50;
-            aPropertySet->setPropertyValue(C2U("FetchSize"), aVal);
+            aPropertySet->setPropertyValue("FetchSize", aVal);
 
             Reference< XConnection >    xConnection = getConnection(rDesc.sDataSource);
             aVal <<= xConnection;
-            aPropertySet->setPropertyValue(C2U("ActiveConnection"), aVal);
+            aPropertySet->setPropertyValue("ActiveConnection", aVal);
 
             Reference< XTablesSupplier >  xSupplyTables(xConnection, UNO_QUERY);
             Reference< XNameAccess >  xTables = xSupplyTables.is() ?
@@ -908,9 +906,9 @@ Reference< XForm >  BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc)
                 }
 
                 aVal <<= aActiveDataTable;
-                aPropertySet->setPropertyValue(C2U("Command"), aVal);
+                aPropertySet->setPropertyValue("Command", aVal);
                 aVal <<= rDesc.nCommandType;
-                aPropertySet->setPropertyValue(C2U("CommandType"), aVal);
+                aPropertySet->setPropertyValue("CommandType", aVal);
 
 
                 Reference< XDatabaseMetaData >  xMetaData = xConnection->getMetaData();
@@ -920,7 +918,7 @@ Reference< XForm >  BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc)
                 if ( xFactory.is() )
                     m_xParser.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.SingleSelectQueryComposer" ) ) ), UNO_QUERY );
 
-                ::rtl::OUString aString(C2U("SELECT * FROM "));
+                ::rtl::OUString aString("SELECT * FROM ");
 
                 ::rtl::OUString sCatalog, sSchema, sName;
                 ::dbtools::qualifiedNameComponents( xMetaData, aActiveDataTable, sCatalog, sSchema, sName, ::dbtools::eInDataManipulation );
@@ -978,8 +976,8 @@ void BibDataManager::setFilter(const ::rtl::OUString& rQuery)
         m_xParser->setFilter( rQuery );
         ::rtl::OUString aQuery = m_xParser->getFilter();
         Reference< XPropertySet >  xFormProps( m_xForm, UNO_QUERY_THROW );
-        xFormProps->setPropertyValue( C2U( "Filter" ), makeAny( aQuery ) );
-        xFormProps->setPropertyValue( C2U( "ApplyFilter" ), makeAny( sal_True ) );
+        xFormProps->setPropertyValue( "Filter", makeAny( aQuery ) );
+        xFormProps->setPropertyValue( "ApplyFilter", makeAny( sal_True ) );
         reload();
     }
     catch (const Exception&)
@@ -997,7 +995,7 @@ void BibDataManager::setFilter(const ::rtl::OUString& rQuery)
     try
     {
         Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW );
-        OSL_VERIFY( xFormProps->getPropertyValue( C2U( "Filter" ) ) >>= aQueryString );
+        OSL_VERIFY( xFormProps->getPropertyValue( "Filter"  ) >>= aQueryString );
     }
     catch (const Exception&)
     {
@@ -1045,12 +1043,12 @@ void BibDataManager::startQueryWith(const ::rtl::OUString& rQuery)
         aQueryString=aQuoteChar;
         aQueryString+=getQueryField();
         aQueryString+=aQuoteChar;
-        aQueryString+=C2U(" like '");
+        aQueryString+=" like '";
         String sQuery(rQuery);
         sQuery.SearchAndReplaceAll('?','_');
         sQuery.SearchAndReplaceAll('*','%');
         aQueryString += sQuery;
-        aQueryString+=C2U("%'");
+        aQueryString+="%'";
     }
     setFilter(aQueryString);
 }
@@ -1066,7 +1064,7 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL)
         unload();
 
         Reference< XComponent >  xOldConnection;
-        aPropertySet->getPropertyValue(C2U("ActiveConnection")) >>= xOldConnection;
+        aPropertySet->getPropertyValue("ActiveConnection") >>= xOldConnection;
 
         Reference< XConnection >    xConnection = getConnection(rURL);
         if(!xConnection.is())
@@ -1075,7 +1073,7 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL)
             return;
         }
         Any aVal; aVal <<= xConnection;
-        aPropertySet->setPropertyValue(C2U("ActiveConnection"), aVal);
+        aPropertySet->setPropertyValue("ActiveConnection", aVal);
         Reference< XMultiServiceFactory >   xFactory(xConnection, UNO_QUERY);
         if ( xFactory.is() )
             m_xParser.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.SingleSelectQueryComposer" ) ) ), UNO_QUERY );
@@ -1095,12 +1093,12 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL)
             const ::rtl::OUString* pTableNames = aTableNameSeq.getConstArray();
             aActiveDataTable = pTableNames[0];
             aVal <<= aActiveDataTable;
-            aPropertySet->setPropertyValue(C2U("Command"), aVal);
-            aPropertySet->setPropertyValue(C2U("CommandType"), makeAny(CommandType::TABLE));
+            aPropertySet->setPropertyValue("Command", aVal);
+            aPropertySet->setPropertyValue("CommandType", makeAny(CommandType::TABLE));
             //Caching for Performance
             aVal <<= (sal_Int32)50;
-            aPropertySet->setPropertyValue(C2U("FetchSize"), aVal);
-            ::rtl::OUString aString(C2U("SELECT * FROM "));
+            aPropertySet->setPropertyValue("FetchSize", aVal);
+            ::rtl::OUString aString("SELECT * FROM ");
             // quote the table name which may contain catalog.schema.table
             Reference<XDatabaseMetaData> xMetaData(xConnection->getMetaData(),UNO_QUERY);
             aQuoteChar = xMetaData->getIdentifierQuoteString();
@@ -1125,7 +1123,7 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL)
 
         if(pToolbar)
         {
-            aURL.Complete =C2U(".uno:Bib/source");
+            aURL.Complete =".uno:Bib/source";
             aEvent.FeatureURL = aURL;
             pToolbar->statusChanged( aEvent );
         }
@@ -1160,7 +1158,7 @@ void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable)
                 {
                     aActiveDataTable = rTable;
                     Any aVal; aVal <<= rTable;
-                    aPropertySet->setPropertyValue( C2U("Command"), aVal );
+                    aPropertySet->setPropertyValue( "Command", aVal );
                     break;
                 }
             }
@@ -1173,7 +1171,7 @@ void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable)
                 if ( xFactory.is() )
                     m_xParser.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.SingleSelectQueryComposer" ) ) ), UNO_QUERY );
 
-                ::rtl::OUString aString(C2U("SELECT * FROM "));
+                ::rtl::OUString aString("SELECT * FROM ");
 
                 ::rtl::OUString sCatalog, sSchema, sName;
                 ::dbtools::qualifiedNameComponents( xMetaData, aActiveDataTable, sCatalog, sSchema, sName, ::dbtools::eInDataManipulation );
@@ -1302,20 +1300,20 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS
     {
         // create the control model
         Reference< XMultiServiceFactory >  xMgr = ::comphelper::getProcessServiceFactory();
-        Reference< XInterface >  xObject = xMgr->createInstance(C2U("com.sun.star.form.component.GridControl"));
+        Reference< XInterface >  xObject = xMgr->createInstance("com.sun.star.form.component.GridControl");
         xModel=Reference< awt::XControlModel > ( xObject, UNO_QUERY );
 
         // set the
         Reference< XPropertySet > xPropSet( xModel, UNO_QUERY );
-        xPropSet->setPropertyValue( C2U("Name"), makeAny( rName ) );
+        xPropSet->setPropertyValue( "Name", makeAny( rName ) );
 
         // set the name of the to-be-created control
-        ::rtl::OUString aControlName(C2U("com.sun.star.form.control.InteractionGridControl"));
+        ::rtl::OUString aControlName("com.sun.star.form.control.InteractionGridControl");
         Any aAny; aAny <<= aControlName;
-        xPropSet->setPropertyValue( C2U("DefaultControl"),aAny );
+        xPropSet->setPropertyValue( "DefaultControl",aAny );
 
         // the the helpURL
-        ::rtl::OUString uProp(C2U("HelpURL"));
+        ::rtl::OUString uProp("HelpURL");
         Reference< XPropertySetInfo > xPropInfo = xPropSet->getPropertySetInfo();
         if (xPropInfo->hasPropertyByName(uProp))
         {
@@ -1339,33 +1337,33 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS
     {
         case DataType::BIT:
         case DataType::BOOLEAN:
-            aResStr=C2U("CheckBox");
+            aResStr="CheckBox";
             break;
         case DataType::TINYINT:
         case DataType::SMALLINT:
         case DataType::INTEGER:
-            aResStr=C2U("NumericField");   ;
+            aResStr="NumericField";   ;
             break;
         case DataType::REAL:
         case DataType::DOUBLE:
         case DataType::NUMERIC:
         case DataType::DECIMAL:
-            aResStr=C2U("FormattedField");
+            aResStr="FormattedField";
             break;
         case DataType::TIMESTAMP:
-            aResStr=C2U("FormattedField");
+            aResStr="FormattedField";
             break;
         case DataType::DATE:
-            aResStr=C2U("DateField");
+            aResStr="DateField";
             break;
         case DataType::TIME:
-            aResStr=C2U("TimeField");
+            aResStr="TimeField";
             break;
         case DataType::CHAR:
         case DataType::VARCHAR:
         case DataType::LONGVARCHAR:
         default:
-            aResStr=C2U("TextField");
+            aResStr="TextField";
             break;
     }
     return aResStr;
@@ -1375,7 +1373,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel(
                     const ::rtl::OUString& rName, sal_Bool bForceListBox)
 {
     Reference< awt::XControlModel > xModel;
-    ::rtl::OUString aName(C2U("View_"));
+    ::rtl::OUString aName("View_");
     aName += rName;
 
     try
@@ -1394,14 +1392,14 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel(
             Reference< XPropertySetInfo >  xInfo = xField.is() ? xField->getPropertySetInfo() : Reference< XPropertySetInfo > ();
 
             ::rtl::OUString sCurrentModelType;
-            const ::rtl::OUString sType(C2U("Type"));
+            const ::rtl::OUString sType("Type");
             sal_Int32 nFormatKey = 0;
             xField->getPropertyValue(sType) >>= nFormatKey;
 
-            ::rtl::OUString aInstanceName(C2U("com.sun.star.form.component."));
+            ::rtl::OUString aInstanceName("com.sun.star.form.component.");
 
             if (bForceListBox)
-                aInstanceName += C2U("ListBox");
+                aInstanceName += "ListBox";
             else
                 aInstanceName += getControlName(nFormatKey);
 
@@ -1647,7 +1645,7 @@ uno::Reference< form::runtime::XFormController > BibDataManager::GetFormControll
     {
         Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory();
         m_xFormCtrl = uno::Reference< form::runtime::XFormController > (
-            xMgr->createInstance(C2U("com.sun.star.form.runtime.FormController")), UNO_QUERY);
+            xMgr->createInstance("com.sun.star.form.runtime.FormController"), UNO_QUERY);
         m_xFormCtrl->setModel(uno::Reference< awt::XTabControllerModel > (getForm(), UNO_QUERY));
         m_xFormDispatch = uno::Reference< frame::XDispatch > ( m_xFormCtrl, UNO_QUERY);
     }
@@ -1672,7 +1670,7 @@ sal_Bool BibDataManager::HasActiveConnection()const
     if( xPrSet.is() )
     {
         Reference< XComponent >  xConnection;
-        xPrSet->getPropertyValue(C2U("ActiveConnection")) >>= xConnection;
+        xPrSet->getPropertyValue("ActiveConnection") >>= xConnection;
         bRet = xConnection.is();
     }
     return bRet;
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 61601bb..26925eb 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -62,8 +62,6 @@ using namespace com::sun::star;
 
 using ::rtl::OUString;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
 struct DispatchInfo
 {
     const char*   pCommand;
@@ -361,7 +359,7 @@ throw (::com::sun::star::uno::RuntimeException)
 sal_Bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet)
 {
     sal_Int32 nPriv = 0;
-    _rxCursorSet->getPropertyValue(C2U("Privileges")) >>= nPriv;
+    _rxCursorSet->getPropertyValue("Privileges") >>= nPriv;
     return ((_rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0));
 }
 
@@ -380,8 +378,8 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X
         return sal_False;
 
     // need to save?
-    sal_Bool  bIsNew        = ::comphelper::getBOOL(_xSet->getPropertyValue(C2U("IsNew")));
-    sal_Bool  bIsModified   = ::comphelper::getBOOL(_xSet->getPropertyValue(C2U("IsModified")));
+    sal_Bool  bIsNew        = ::comphelper::getBOOL(_xSet->getPropertyValue("IsNew"));
+    sal_Bool  bIsModified   = ::comphelper::getBOOL(_xSet->getPropertyValue("IsModified"));
     sal_Bool bResult = !bIsModified;
     if (bIsModified)
     {
@@ -459,7 +457,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
             for ( sal_uInt16 n=0; n<nCount; n++ )
             {
                 BibStatusDispatch *pObj = &aStatusListeners[n];
-                if ( pObj->aURL.Path == C2U("Bib/removeFilter") )
+                if ( pObj->aURL.Path == "Bib/removeFilter" )
                 {
                     FeatureStateEvent  aEvent;
                     aEvent.FeatureURL = pObj->aURL;
@@ -510,7 +508,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
             for ( sal_uInt16 n=0; n<nCount; n++ )
             {
                 BibStatusDispatch *pObj = &aStatusListeners[n];
-                if ( pObj->aURL.Path == C2U("Bib/removeFilter") && pDatMan->getParser().is())
+                if ( pObj->aURL.Path == "Bib/removeFilter" && pDatMan->getParser().is())
                 {
                     FeatureStateEvent  aEvent;
                     aEvent.FeatureURL = pObj->aURL;
@@ -555,11 +553,11 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
             Reference< ::com::sun::star::sdbc::XResultSet >  xCursor(pDatMan->getForm(), UNO_QUERY);
             Reference< XResultSetUpdate >  xUpdateCursor(xCursor, UNO_QUERY);
             Reference< beans::XPropertySet >  xSet(pDatMan->getForm(), UNO_QUERY);
-            sal_Bool  bIsNew  = ::comphelper::getBOOL(xSet->getPropertyValue(C2U("IsNew")));
+            sal_Bool  bIsNew  = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew"));
             if(!bIsNew)
             {
                 sal_uInt32 nCount = 0;
-                xSet->getPropertyValue(C2U("RowCount")) >>= nCount;
+                xSet->getPropertyValue("RowCount") >>= nCount;
                 // naechste position festellen
                 sal_Bool bSuccess = sal_False;
                 sal_Bool bLeft = sal_False;
@@ -662,18 +660,18 @@ void BibFrameController_Impl::addStatusListener(
     aEvent.FeatureURL = aURL;
     aEvent.Requery    = sal_False;
     aEvent.Source     = (XDispatch *) this;
-    if ( aURL.Path == C2U("StatusBarVisible") )
+    if ( aURL.Path == "StatusBarVisible" )
     {
         aEvent.IsEnabled  = sal_False;
         aEvent.State <<= sal_Bool( sal_False );
     }
-    else if ( aURL.Path == C2U("Bib/hierarchical") )
+    else if ( aURL.Path == "Bib/hierarchical" )
     {
         aEvent.IsEnabled  = sal_True;
         const char*  pHier = bHierarchical? "" : "*" ;
         aEvent.State <<= rtl::OUString::createFromAscii(pHier);
     }
-    else if(aURL.Path == C2U("Bib/MenuFilter"))
+    else if(aURL.Path == "Bib/MenuFilter")
     {
         aEvent.IsEnabled  = sal_True;
         aEvent.FeatureDescriptor=pDatMan->getQueryField();
@@ -682,7 +680,7 @@ void BibFrameController_Impl::addStatusListener(
         aEvent.State.setValue(&aStringSeq,::getCppuType((uno::Sequence<rtl::OUString>*)0));
 
     }
-    else if ( aURL.Path == C2U("Bib/source"))
+    else if ( aURL.Path == "Bib/source")
     {
         aEvent.IsEnabled  = sal_True;
         aEvent.FeatureDescriptor=pDatMan->getActiveDataTable();
@@ -697,31 +695,31 @@ void BibFrameController_Impl::addStatusListener(
     {
         aEvent.IsEnabled  = sal_True;
     }
-    else if(aURL.Path == C2U("Bib/query"))
+    else if(aURL.Path == "Bib/query")
     {
         aEvent.IsEnabled  = sal_True;
         aEvent.State <<= pConfig->getQueryText();
     }
-    else if (aURL.Path == C2U("Bib/removeFilter") )
+    else if (aURL.Path == "Bib/removeFilter" )
     {
         rtl::OUString aFilterStr=pDatMan->getFilter();
         aEvent.IsEnabled  = !aFilterStr.isEmpty();
     }
-    else if(aURL.Path == C2U("Cut"))
+    else if(aURL.Path == "Cut")
     {
         Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
         Edit* pEdit = dynamic_cast<Edit*>( pChild );
         if( pEdit )
             aEvent.IsEnabled  = !pEdit->IsReadOnly() && pEdit->GetSelection().Len();
     }
-    if(aURL.Path == C2U("Copy"))
+    if(aURL.Path == "Copy")
     {
         Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
         Edit* pEdit = dynamic_cast<Edit*>( pChild );
         if( pEdit )
             aEvent.IsEnabled  = pEdit->GetSelection().Len() > 0;
     }
-    else if(aURL.Path == C2U("Paste") )
+    else if(aURL.Path == "Paste" )
     {
         aEvent.IsEnabled  = sal_False;
         Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
@@ -760,20 +758,20 @@ void BibFrameController_Impl::addStatusListener(
             uno::Reference< datatransfer::XTransferable > xContents = xClip->getContents(  );
         }
     }
-    else if(aURL.Path == C2U("Bib/DeleteRecord"))
+    else if(aURL.Path == "Bib/DeleteRecord")
     {
         Reference< ::com::sun::star::sdbc::XResultSet >  xCursor(pDatMan->getForm(), UNO_QUERY);
         Reference< XResultSetUpdate >  xUpdateCursor(xCursor, UNO_QUERY);
         Reference< beans::XPropertySet >  xSet(pDatMan->getForm(), UNO_QUERY);
-        sal_Bool  bIsNew  = ::comphelper::getBOOL(xSet->getPropertyValue(C2U("IsNew")));
+        sal_Bool  bIsNew  = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew"));
         if(!bIsNew)
         {
             sal_uInt32 nCount = 0;
-            xSet->getPropertyValue(C2U("RowCount")) >>= nCount;
+            xSet->getPropertyValue("RowCount") >>= nCount;
             aEvent.IsEnabled  = nCount > 0;
         }
     }
-    else if (aURL.Path == C2U("Bib/InsertRecord"))
+    else if (aURL.Path == "Bib/InsertRecord")
     {
         Reference< beans::XPropertySet >  xSet(pDatMan->getForm(), UNO_QUERY);
         aEvent.IsEnabled = canInsertRecords(xSet);
@@ -817,7 +815,7 @@ void BibFrameController_Impl::RemoveFilter()
     for ( sal_uInt16 n=0; n<nCount; n++ )
     {
         BibStatusDispatch *pObj = &aStatusListeners[n];
-        if ( pObj->aURL.Path == C2U("Bib/removeFilter") )
+        if ( pObj->aURL.Path == "Bib/removeFilter" )
         {
             FeatureStateEvent  aEvent;
             aEvent.FeatureURL = pObj->aURL;
@@ -827,7 +825,7 @@ void BibFrameController_Impl::RemoveFilter()
             pObj->xListener->statusChanged( aEvent );
             bRemoveFilter=sal_True;
         }
-        else if(pObj->aURL.Path == C2U("Bib/query"))
+        else if(pObj->aURL.Path == "Bib/query")
         {
             FeatureStateEvent  aEvent;
             aEvent.FeatureURL = pObj->aURL;
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index fd6cca9..dea0a28 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -52,8 +52,6 @@ using namespace ::com::sun::star::form;
 using namespace ::com::sun::star::sdb;
 using namespace ::rtl;
 
-#define C2U(cChar) OUString::createFromAscii(cChar)
-#define C2S(cChar) String::CreateFromAscii(cChar)
 #define DISTANCE_CONTROL_TO_FIXEDTEXT 5
 
 static ::Point lcl_MovePoint(const FixedText& rFixedText)
@@ -164,7 +162,7 @@ void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno
                 sal_Int16* pArr = aSelSeq.getArray();
                 pArr[0] = TYPE_COUNT;
                 aSel.setValue(&aSelSeq, ::getCppuType((Sequence<sal_Int16>*)0));
-                xPropSet->setPropertyValue(C2U("SelectedItems"), aSel);
+                xPropSet->setPropertyValue("SelectedItems", aSel);
             }
         }
     }
@@ -474,11 +472,11 @@ uno::Reference< awt::XControlModel >  BibGeneralPage::AddXControl(
             {
                 uno::Reference< beans::XPropertySetInfo >  xPropInfo = xPropSet->getPropertySetInfo();
 
-                uno::Any aAny = xPropSet->getPropertyValue( C2U("DefaultControl") );
+                uno::Any aAny = xPropSet->getPropertyValue( "DefaultControl" );
                 rtl::OUString aControlName;
                 aAny >>= aControlName;
 
-                rtl::OUString uProp(C2U("HelpURL"));
+                rtl::OUString uProp("HelpURL");
                 if(xPropInfo->hasPropertyByName(uProp))
                 {
                     ::rtl::OUString sId = ::rtl::OUString::createFromAscii( INET_HID_SCHEME );
@@ -491,19 +489,19 @@ uno::Reference< awt::XControlModel >  BibGeneralPage::AddXControl(
                 {
                     //uno::Reference< beans::XPropertySet >  xPropSet(xControl, UNO_QUERY);
                     aAny <<= (sal_Int16)1;
-                    xPropSet->setPropertyValue(C2U("BoundColumn"), aAny);
+                    xPropSet->setPropertyValue("BoundColumn", aAny);
                     ListSourceType eSet = ListSourceType_VALUELIST;
                     aAny.setValue( &eSet, ::getCppuType((const ListSourceType*)0) );
-                    xPropSet->setPropertyValue(C2U("ListSourceType"), aAny);
+                    xPropSet->setPropertyValue("ListSourceType", aAny);
 
                     uno::Sequence<rtl::OUString> aListSource(TYPE_COUNT);
                     rtl::OUString* pListSourceArr = aListSource.getArray();
-                    //pListSourceArr[0] = C2U("select TypeName, TypeIndex from TypeNms");
+                    //pListSourceArr[0] = "select TypeName, TypeIndex from TypeNms";
                     for(sal_Int32 i = 0; i < TYPE_COUNT; ++i)
                         pListSourceArr[i] = rtl::OUString::valueOf(i);
                     aAny.setValue(&aListSource, ::getCppuType((uno::Sequence<rtl::OUString>*)0));
 
-                    xPropSet->setPropertyValue(C2U("ListSource"), aAny);
+                    xPropSet->setPropertyValue("ListSource", aAny);
 
                     uno::Sequence<rtl::OUString> aValues(TYPE_COUNT + 1);
                     rtl::OUString* pValuesArr = aValues.getArray();
@@ -514,13 +512,13 @@ uno::Reference< awt::XControlModel >  BibGeneralPage::AddXControl(
 
                     aAny.setValue(&aValues, ::getCppuType((uno::Sequence<rtl::OUString>*)0));
 
-                    xPropSet->setPropertyValue(C2U("StringItemList"), aAny);
+                    xPropSet->setPropertyValue("StringItemList", aAny);
 
                     sal_Bool bTrue = sal_True;
                     aAny.setValue( &bTrue, ::getBooleanCppuType() );
-                    xPropSet->setPropertyValue( C2U("Dropdown"), aAny );
+                    xPropSet->setPropertyValue( "Dropdown", aAny );
 
-                    aControlName = C2U("com.sun.star.form.control.ListBox");
+                    aControlName = "com.sun.star.form.control.ListBox";
                     xLBModel = Reference< form::XBoundComponent >(xCtrModel, UNO_QUERY);
 
                 }
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 9893179..3b40e72 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -40,7 +40,6 @@ using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
-#define C2U(cChar) OUString::createFromAscii(cChar)
 
 
 // Konstanten -------------------------------------------------------------
@@ -256,7 +255,7 @@ void BibToolBar::InitListener()
     if( xTrans.is() )
     {
         util::URL aQueryURL;
-        aQueryURL.Complete = C2U(".uno:Bib/MenuFilter");
+        aQueryURL.Complete = ".uno:Bib/MenuFilter";
         xTrans->parseStrict( aQueryURL);
         BibToolBarListener* pQuery=new BibTBQueryMenuListener(this,aQueryURL.Complete,TBC_BT_AUTOFILTER);
         xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pQuery),aQueryURL);
@@ -315,11 +314,11 @@ void BibToolBar::Select()
     {
         Sequence<PropertyValue> aPropVal(2);
         PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
-        pPropertyVal[0].Name=C2U("QueryText");
+        pPropertyVal[0].Name="QueryText";
         rtl::OUString aSelection = aEdQuery.GetText();
         pPropertyVal[0].Value <<= aSelection;
 
-        pPropertyVal[1].Name=C2U("QueryField");
+        pPropertyVal[1].Name="QueryField";
         pPropertyVal[1].Value <<= aQueryField;
         SendDispatch(nId,aPropVal);
     }
@@ -443,10 +442,10 @@ long BibToolBar::PreNotify( NotifyEvent& rNEvt )
         {
             Sequence<PropertyValue> aPropVal(2);
             PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
-            pPropertyVal[0].Name = C2U("QueryText");
+            pPropertyVal[0].Name = "QueryText";
             rtl::OUString aSelection = aEdQuery.GetText();
             pPropertyVal[0].Value <<= aSelection;
-            pPropertyVal[1].Name=C2U("QueryField");
+            pPropertyVal[1].Name="QueryField";
             pPropertyVal[1].Value <<= aQueryField;
             SendDispatch(TBC_BT_AUTOFILTER,aPropVal);
             return nResult;
@@ -469,7 +468,7 @@ IMPL_LINK( BibToolBar, SendSelHdl, Timer*,/*pT*/)
 {
     Sequence<PropertyValue> aPropVal(1);
     PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
-    pPropertyVal[0].Name = C2U("DataSourceName");
+    pPropertyVal[0].Name = "DataSourceName";
     String aEntry( MnemonicGenerator::EraseAllMnemonicChars( aLBSource.GetSelectEntry() ) );
     rtl::OUString aSelection = aEntry;
     pPropertyVal[0].Value <<= aSelection;
@@ -497,10 +496,10 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/)
             aQueryField = MnemonicGenerator::EraseAllMnemonicChars( aPopupMenu.GetItemText(nId) );
             Sequence<PropertyValue> aPropVal(2);
             PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray();
-            pPropertyVal[0].Name = C2U("QueryText");
+            pPropertyVal[0].Name = "QueryText";
             rtl::OUString aSelection = aEdQuery.GetText();
             pPropertyVal[0].Value <<= aSelection;
-            pPropertyVal[1].Name=C2U("QueryField");
+            pPropertyVal[1].Name="QueryField";
             pPropertyVal[1].Value <<= aQueryField;
             SendDispatch(TBC_BT_AUTOFILTER,aPropVal);
         }


More information about the Libreoffice-commits mailing list