fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
This commit is contained in:
@@ -681,8 +681,7 @@ throw(RuntimeException, std::exception)
|
||||
checkActionIndex_Impl( nIndex );
|
||||
EnsureIsAlive();
|
||||
|
||||
static const OUString sActionDesc( "Select" );
|
||||
return sActionDesc;
|
||||
return OUString( "Select" );
|
||||
}
|
||||
|
||||
Reference< XAccessibleKeyBinding > AccessibleIconChoiceCtrlEntry::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
|
||||
|
||||
@@ -819,8 +819,8 @@ namespace accessibility
|
||||
checkActionIndex_Impl( nIndex );
|
||||
EnsureIsAlive();
|
||||
|
||||
static const OUString sActionDesc1( "Check" );
|
||||
static const OUString sActionDesc2( "UnCheck" );
|
||||
static const char sActionDesc1[] = "Check";
|
||||
static const char sActionDesc2[] = "UnCheck";
|
||||
// sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
|
||||
SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
|
||||
SvButtonState state = getListBox()->GetCheckButtonState( pEntry );
|
||||
@@ -830,9 +830,9 @@ namespace accessibility
|
||||
if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
|
||||
{
|
||||
if ( state == SV_BUTTON_CHECKED )
|
||||
return sActionDesc2;
|
||||
return OUString(sActionDesc2);
|
||||
else if (state == SV_BUTTON_UNCHECKED)
|
||||
return sActionDesc1;
|
||||
return OUString(sActionDesc1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -275,8 +275,7 @@ OUString VCLXAccessibleEdit::getAccessibleActionDescription ( sal_Int32 nIndex )
|
||||
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
|
||||
throw IndexOutOfBoundsException();
|
||||
|
||||
static const OUString sAction( "activate" );
|
||||
return sAction;
|
||||
return OUString( "activate" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -242,9 +242,9 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window* /* pParent */,
|
||||
::sfx2::FileDialogHelper aDlg( (o_pbLink)
|
||||
? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW
|
||||
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
|
||||
static const OUString aWildcard( "*." );
|
||||
static const char aWildcard[] = "*.";
|
||||
FilterNameVector aFilters;
|
||||
const OUString aSeparator( ";" );
|
||||
static const char aSeparator[] = ";";
|
||||
OUString aAllTypes;
|
||||
|
||||
aDlg.SetTitle( AVMEDIA_RESSTR( (o_pbLink)
|
||||
|
||||
@@ -702,8 +702,6 @@ void DialogWindow::UpdateBrowser()
|
||||
rLayout.UpdatePropertyBrowser();
|
||||
}
|
||||
|
||||
static OUString aResourceResolverPropName( "ResourceResolver" );
|
||||
|
||||
bool DialogWindow::SaveDialog()
|
||||
{
|
||||
bool bDone = false;
|
||||
@@ -771,7 +769,7 @@ bool DialogWindow::SaveDialog()
|
||||
{
|
||||
try
|
||||
{
|
||||
Any aResourceResolver = xDialogModelPropSet->getPropertyValue( aResourceResolverPropName );
|
||||
Any aResourceResolver = xDialogModelPropSet->getPropertyValue( "ResourceResolver" );
|
||||
aResourceResolver >>= xStringResourceResolver;
|
||||
}
|
||||
catch(const beans::UnknownPropertyException& )
|
||||
|
||||
@@ -1053,12 +1053,10 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
|
||||
|
||||
void Shell::ManageToolbars()
|
||||
{
|
||||
static OUString aLayoutManagerName( "LayoutManager" );
|
||||
static OUString aMacroBarResName( "private:resource/toolbar/macrobar" );
|
||||
static OUString aDialogBarResName( "private:resource/toolbar/dialogbar" );
|
||||
static OUString aInsertControlsBarResName( "private:resource/toolbar/insertcontrolsbar" );
|
||||
static OUString aFormControlsBarResName( "private:resource/toolbar/formcontrolsbar" );
|
||||
(void)aInsertControlsBarResName;
|
||||
static const char aMacroBarResName[] = "private:resource/toolbar/macrobar";
|
||||
static const char aDialogBarResName[] = "private:resource/toolbar/dialogbar";
|
||||
static const char aInsertControlsBarResName[] = "private:resource/toolbar/insertcontrolsbar";
|
||||
static const char aFormControlsBarResName[] = "private:resource/toolbar/formcontrolsbar";
|
||||
|
||||
if( !pCurWin )
|
||||
return;
|
||||
@@ -1068,7 +1066,7 @@ void Shell::ManageToolbars()
|
||||
if ( xFrameProps.is() )
|
||||
{
|
||||
Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
|
||||
uno::Any a = xFrameProps->getPropertyValue( aLayoutManagerName );
|
||||
uno::Any a = xFrameProps->getPropertyValue( "LayoutManager" );
|
||||
a >>= xLayoutManager;
|
||||
if ( xLayoutManager.is() )
|
||||
{
|
||||
|
||||
@@ -69,8 +69,8 @@ bool LocalizationMgr::isLibraryLocalized ()
|
||||
|
||||
void LocalizationMgr::handleTranslationbar ()
|
||||
{
|
||||
static OUString const aLayoutManagerName("LayoutManager");
|
||||
static OUString const aToolBarResName("private:resource/toolbar/translationbar");
|
||||
static const char aLayoutManagerName[] = "LayoutManager";
|
||||
static const char aToolBarResName[] = "private:resource/toolbar/translationbar";
|
||||
|
||||
Reference< beans::XPropertySet > xFrameProps
|
||||
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
|
||||
@@ -902,7 +902,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
|
||||
void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName,
|
||||
const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
|
||||
{
|
||||
static OUString aResourceResolverPropName( "ResourceResolver" );
|
||||
static const char aResourceResolverPropName[] = "ResourceResolver";
|
||||
|
||||
// Get library
|
||||
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
|
||||
|
||||
@@ -57,9 +57,9 @@ using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::io;
|
||||
|
||||
static OUString aResourceResolverPropName( "ResourceResolver" );
|
||||
static OUString aDecorationPropName( "Decoration" );
|
||||
static OUString aTitlePropName( "Title" );
|
||||
static const char aResourceResolverPropName[] = "ResourceResolver";
|
||||
static const char aDecorationPropName[] = "Decoration";
|
||||
static const char aTitlePropName[] = "Title";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ void PropBrw::ImplReCreateController()
|
||||
|
||||
// create a property browser controller
|
||||
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
|
||||
static const OUString s_sControllerServiceName( "com.sun.star.awt.PropertyBrowserController" );
|
||||
static const char s_sControllerServiceName[] = "com.sun.star.awt.PropertyBrowserController";
|
||||
m_xBrowserController = Reference< XPropertySet >(
|
||||
xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY
|
||||
);
|
||||
|
||||
@@ -156,8 +156,7 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any
|
||||
OUString SAL_CALL
|
||||
ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
static OUString sDfltPropName( "Number" );
|
||||
return sDfltPropName;
|
||||
return OUString( "Number" );
|
||||
}
|
||||
|
||||
void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext )
|
||||
|
||||
@@ -4242,7 +4242,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
static OUString aTypeTypeString( "type" );
|
||||
static const char aTypeTypeString[] = "type";
|
||||
|
||||
// 2 parameters needed
|
||||
if ( rPar.Count() != 3 )
|
||||
|
||||
@@ -732,9 +732,7 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
|
||||
|
||||
const OUString& SbModule::GetSource() const
|
||||
{
|
||||
static OUString aRetStr;
|
||||
aRetStr = aOUSource;
|
||||
return aRetStr;
|
||||
return aOUSource;
|
||||
}
|
||||
|
||||
// Parent and BASIC are one!
|
||||
@@ -1000,29 +998,25 @@ static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p )
|
||||
void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
|
||||
{
|
||||
// delete the return value of CreateUnoService
|
||||
static OUString aName("CreateUnoService");
|
||||
SbxVariable* pVar = pBasic->GetRtl()->Find( aName, SbxCLASS_METHOD );
|
||||
SbxVariable* pVar = pBasic->GetRtl()->Find( OUString("CreateUnoService"), SbxCLASS_METHOD );
|
||||
if( pVar )
|
||||
{
|
||||
pVar->SbxValue::Clear();
|
||||
}
|
||||
// delete the return value of CreateUnoDialog
|
||||
static OUString aName2("CreateUnoDialog");
|
||||
pVar = pBasic->GetRtl()->Find( aName2, SbxCLASS_METHOD );
|
||||
pVar = pBasic->GetRtl()->Find( OUString("CreateUnoDialog"), SbxCLASS_METHOD );
|
||||
if( pVar )
|
||||
{
|
||||
pVar->SbxValue::Clear();
|
||||
}
|
||||
// delete the return value of CDec
|
||||
static OUString aName3("CDec");
|
||||
pVar = pBasic->GetRtl()->Find( aName3, SbxCLASS_METHOD );
|
||||
pVar = pBasic->GetRtl()->Find( OUString("CDec"), SbxCLASS_METHOD );
|
||||
if( pVar )
|
||||
{
|
||||
pVar->SbxValue::Clear();
|
||||
}
|
||||
// delete return value of CreateObject
|
||||
static OUString aName4("CreateObject");
|
||||
pVar = pBasic->GetRtl()->Find( aName4, SbxCLASS_METHOD );
|
||||
pVar = pBasic->GetRtl()->Find( OUString("CreateObject"), SbxCLASS_METHOD );
|
||||
if( pVar )
|
||||
{
|
||||
pVar->SbxValue::Clear();
|
||||
@@ -2548,29 +2542,25 @@ void SbUserFormModule::triggerInitializeEvent( void )
|
||||
if ( mbInit )
|
||||
return;
|
||||
SAL_INFO("basic", "**** SbUserFormModule::triggerInitializeEvent");
|
||||
static OUString aInitMethodName( "Userform_Initialize");
|
||||
triggerMethod( aInitMethodName );
|
||||
triggerMethod(OUString("Userform_Initialize"));
|
||||
mbInit = true;
|
||||
}
|
||||
|
||||
void SbUserFormModule::triggerTerminateEvent( void )
|
||||
{
|
||||
SAL_INFO("basic", "**** SbUserFormModule::triggerTerminateEvent");
|
||||
static OUString aTermMethodName( "Userform_Terminate" );
|
||||
triggerMethod( aTermMethodName );
|
||||
triggerMethod(OUString( "Userform_Terminate" ));
|
||||
mbInit=false;
|
||||
}
|
||||
|
||||
void SbUserFormModule::triggerLayoutEvent( void )
|
||||
{
|
||||
static OUString aMethodName( "Userform_Layout" );
|
||||
triggerMethod( aMethodName );
|
||||
triggerMethod(OUString( "Userform_Layout" ));
|
||||
}
|
||||
|
||||
void SbUserFormModule::triggerResizeEvent( void )
|
||||
{
|
||||
static OUString aMethodName("Userform_Resize");
|
||||
triggerMethod( aMethodName );
|
||||
triggerMethod(OUString("Userform_Resize"));
|
||||
}
|
||||
|
||||
SbUserFormModuleInstance* SbUserFormModule::CreateInstance()
|
||||
|
||||
@@ -40,7 +40,7 @@ using ::com::sun::star::uno::Sequence;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Area" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Area";
|
||||
|
||||
struct StaticAreaWrapperPropertyArray_Initializer
|
||||
{
|
||||
@@ -179,7 +179,7 @@ Sequence< OUString > AreaWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( AreaWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( AreaWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -63,7 +63,7 @@ using ::com::sun::star::uno::Any;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Axis" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Axis";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -694,7 +694,7 @@ Sequence< OUString > AxisWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -61,7 +61,7 @@ using ::com::sun::star::chart::XDateCategories;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ChartData" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartData";
|
||||
|
||||
uno::Sequence< uno::Sequence< double > > lcl_getNANInsteadDBL_MIN( const uno::Sequence< uno::Sequence< double > >& rData )
|
||||
{
|
||||
@@ -726,7 +726,7 @@ uno::Sequence< OUString > ChartDataWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( ChartDataWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( ChartDataWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -65,7 +65,7 @@ using ::osl::MutexGuard;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.DataSeries" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSeries";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -881,7 +881,7 @@ uno::Sequence< OUString > DataSeriesPointWrapper::getSupportedServiceNames_Stati
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( DataSeriesPointWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( DataSeriesPointWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -79,7 +79,7 @@ using ::osl::MutexGuard;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Diagram" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Diagram";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -2081,7 +2081,7 @@ uno::Sequence< OUString > DiagramWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( DiagramWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( DiagramWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -44,7 +44,7 @@ using ::com::sun::star::uno::Sequence;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Grid" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Grid";
|
||||
|
||||
struct StaticGridWrapperPropertyArray_Initializer
|
||||
{
|
||||
@@ -185,7 +185,7 @@ Sequence< OUString > GridWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( GridWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( GridWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -210,7 +210,7 @@ Any WrappedLegendAlignmentProperty::convertOuterToInnerValue( const Any& rOuterV
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName("com.sun.star.comp.chart.Legend");
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Legend";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -432,7 +432,7 @@ Sequence< OUString > LegendWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( LegendWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( LegendWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -41,7 +41,7 @@ using ::com::sun::star::uno::Any;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ChartLine" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartLine";
|
||||
|
||||
struct StaticMinMaxLineWrapperDefaults_Initializer
|
||||
{
|
||||
@@ -418,7 +418,7 @@ Sequence< OUString > MinMaxLineWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( MinMaxLineWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( MinMaxLineWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -127,7 +127,7 @@ WrappedStackedTextProperty::~WrappedStackedTextProperty()
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName("com.sun.star.comp.chart.Title");
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Title";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -523,7 +523,7 @@ Sequence< OUString > TitleWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( TitleWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( TitleWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -41,7 +41,7 @@ using ::com::sun::star::uno::Any;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName("com.sun.star.comp.chart.ChartArea");
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartArea";
|
||||
|
||||
struct StaticUpDownBarWrapperPropertyArray_Initializer
|
||||
{
|
||||
@@ -382,7 +382,7 @@ Sequence< OUString > UpDownBarWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( UpDownBarWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( UpDownBarWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -44,7 +44,7 @@ using ::com::sun::star::uno::Sequence;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.WallOrFloor" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.WallOrFloor";
|
||||
|
||||
struct StaticWallFloorWrapperPropertyArray_Initializer
|
||||
{
|
||||
@@ -166,7 +166,7 @@ Sequence< OUString > WallFloorWrapper::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( WallFloorWrapper, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( WallFloorWrapper, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace wrapper
|
||||
} // namespace chart
|
||||
|
||||
@@ -64,7 +64,7 @@ WrappedScaleTextProperty::~WrappedScaleTextProperty()
|
||||
void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
|
||||
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
|
||||
{
|
||||
static const OUString aRefSizeName( "ReferencePageSize" );
|
||||
static const char aRefSizeName[] = "ReferencePageSize";
|
||||
|
||||
if( xInnerPropertySet.is() )
|
||||
{
|
||||
@@ -95,7 +95,7 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R
|
||||
Any WrappedScaleTextProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
|
||||
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
|
||||
{
|
||||
static const OUString aRefSizeName( "ReferencePageSize" );
|
||||
static const char aRefSizeName[] = "ReferencePageSize";
|
||||
|
||||
Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) );
|
||||
if( xInnerPropertySet.is() )
|
||||
|
||||
@@ -47,7 +47,7 @@ using ::com::sun::star::uno::Sequence;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ElementSelectorToolbarController" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ElementSelectorToolbarController";
|
||||
}
|
||||
|
||||
SelectorListBox::SelectorListBox( vcl::Window* pParent, WinBits nStyle )
|
||||
@@ -246,7 +246,7 @@ Reference< ::com::sun::star::accessibility::XAccessible > SelectorListBox::Creat
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, OUString(lcl_aServiceName) );
|
||||
|
||||
Sequence< OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static()
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ using ::osl::MutexGuard;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Axis" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Axis";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -637,7 +637,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( Axis, Axis_Base, ::property::OPropertySet )
|
||||
IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis, Axis_Base, ::property::OPropertySet )
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( Axis, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( Axis, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace chart
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ using ::com::sun::star::uno::Sequence;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceNameCartesian2d( "com.sun.star.chart2.CartesianCoordinateSystem2d" );
|
||||
static const OUString lcl_aServiceNameCartesian3d( "com.sun.star.chart2.CartesianCoordinateSystem3d" );
|
||||
static const char lcl_aServiceNameCartesian2d[] = "com.sun.star.chart2.CartesianCoordinateSystem2d";
|
||||
static const char lcl_aServiceNameCartesian3d[] = "com.sun.star.chart2.CartesianCoordinateSystem3d";
|
||||
|
||||
static const OUString lcl_aImplementationNameCartesian2d( "com.sun.star.comp.chart2.CartesianCoordinateSystem2d" );
|
||||
static const OUString lcl_aImplementationNameCartesian3d( "com.sun.star.comp.chart2.CartesianCoordinateSystem3d" );
|
||||
static const char lcl_aImplementationNameCartesian2d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem2d";
|
||||
static const char lcl_aImplementationNameCartesian3d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem3d";
|
||||
}
|
||||
|
||||
namespace chart
|
||||
@@ -108,7 +108,7 @@ Sequence< OUString > CartesianCoordinateSystem2d::getSupportedServiceNames_Stati
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, lcl_aImplementationNameCartesian2d )
|
||||
APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, OUString(lcl_aImplementationNameCartesian2d) )
|
||||
|
||||
// ==== CartesianCoordinateSystem3d ====
|
||||
|
||||
@@ -130,7 +130,7 @@ Sequence< OUString > CartesianCoordinateSystem3d::getSupportedServiceNames_Stati
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, lcl_aImplementationNameCartesian3d )
|
||||
APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, OUString(lcl_aImplementationNameCartesian3d) )
|
||||
|
||||
} // namespace chart
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ using ::osl::MutexGuard;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.GridProperties" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.GridProperties";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -243,7 +243,7 @@ Sequence< OUString > GridProperties::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( GridProperties, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( GridProperties, OUString(lcl_aServiceName) );
|
||||
|
||||
// needed by MSC compiler
|
||||
using impl::GridProperties_Base;
|
||||
|
||||
@@ -47,7 +47,7 @@ using ::com::sun::star::beans::Property;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Legend" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Legend";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -301,7 +301,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL Legend::getPropertySetInfo()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( Legend, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( Legend, OUString(lcl_aServiceName) );
|
||||
|
||||
// needed by MSC compiler
|
||||
using impl::Legend_Base;
|
||||
|
||||
@@ -40,7 +40,7 @@ using ::osl::MutexGuard;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.PageBackground" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.PageBackground";
|
||||
|
||||
struct StaticPageBackgroundDefaults_Initializer
|
||||
{
|
||||
@@ -223,7 +223,7 @@ uno::Sequence< OUString > PageBackground::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( PageBackground, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( PageBackground, OUString(lcl_aServiceName) );
|
||||
|
||||
using impl::PageBackground_Base;
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ using ::com::sun::star::uno::Sequence;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceNamePolar2d( "com.sun.star.chart2.PolarCoordinateSystem2d" );
|
||||
static const OUString lcl_aServiceNamePolar3d( "com.sun.star.chart2.PolarCoordinateSystem3d" );
|
||||
static const char lcl_aServiceNamePolar2d[] = "com.sun.star.chart2.PolarCoordinateSystem2d";
|
||||
static const char lcl_aServiceNamePolar3d[] = "com.sun.star.chart2.PolarCoordinateSystem3d";
|
||||
|
||||
static const OUString lcl_aImplementationNamePolar2d( "com.sun.star.comp.chart2.PolarCoordinateSystem2d" );
|
||||
static const OUString lcl_aImplementationNamePolar3d( "com.sun.star.comp.chart2.PolarCoordinateSystem3d" );
|
||||
static const char lcl_aImplementationNamePolar2d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem2d";
|
||||
static const char lcl_aImplementationNamePolar3d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem3d";
|
||||
}
|
||||
|
||||
namespace chart
|
||||
@@ -108,7 +108,7 @@ Sequence< OUString > PolarCoordinateSystem2d::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, lcl_aImplementationNamePolar2d )
|
||||
APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, OUString(lcl_aImplementationNamePolar2d) )
|
||||
|
||||
// ==== PolarCoordinateSystem3d ====
|
||||
|
||||
@@ -130,7 +130,7 @@ Sequence< OUString > PolarCoordinateSystem3d::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, lcl_aImplementationNamePolar3d )
|
||||
APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, OUString(lcl_aImplementationNamePolar3d) )
|
||||
|
||||
} // namespace chart
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ using ::osl::MutexGuard;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Title" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Title";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -374,7 +374,7 @@ uno::Sequence< OUString > Title::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( Title, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( Title, OUString(lcl_aServiceName) );
|
||||
|
||||
// needed by MSC compiler
|
||||
using impl::Title_Base;
|
||||
|
||||
@@ -46,7 +46,7 @@ using ::chart::impl::CachedDataSequence_Base;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.CachedDataSequence" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.CachedDataSequence";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -260,7 +260,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL CachedDataSequence::getPropertySet
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( CachedDataSequence, lcl_aServiceName )
|
||||
APPHELPER_XSERVICEINFO_IMPL( CachedDataSequence, OUString(lcl_aServiceName) )
|
||||
|
||||
// ________ XNumericalDataSequence ________
|
||||
Sequence< double > SAL_CALL CachedDataSequence::getNumericalData()
|
||||
|
||||
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString aSeriesPropName( "Series" );
|
||||
static const char aSeriesPropName[] = "Series";
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ using namespace ::com::sun::star;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.DataSource" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSource";
|
||||
} // anonymous namespace
|
||||
|
||||
namespace chart
|
||||
@@ -69,7 +69,7 @@ Sequence< OUString > DataSource::getSupportedServiceNames_Static()
|
||||
return aServices;
|
||||
}
|
||||
|
||||
APPHELPER_XSERVICEINFO_IMPL( DataSource, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( DataSource, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace chart
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ using namespace ::com::sun::star;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.ErrorBar" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.ErrorBar";
|
||||
|
||||
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
|
||||
{
|
||||
@@ -468,7 +468,7 @@ uno::Sequence< OUString > ErrorBar::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( ErrorBar, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( ErrorBar, OUString(lcl_aServiceName) );
|
||||
|
||||
// needed by MSC compiler
|
||||
using impl::ErrorBar_Base;
|
||||
|
||||
@@ -59,14 +59,14 @@ namespace
|
||||
{
|
||||
|
||||
// note: in xmloff this name is used to indicate usage of own data
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.InternalDataProvider" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.InternalDataProvider";
|
||||
|
||||
static const OUString lcl_aCategoriesRangeName( "categories" );
|
||||
static const OUString lcl_aCategoriesLevelRangeNamePrefix( "categoriesL " ); //L <-> level
|
||||
static const OUString lcl_aCategoriesPointRangeNamePrefix( "categoriesP " ); //P <-> point
|
||||
static const OUString lcl_aCategoriesRoleName( "categories" );
|
||||
static const OUString lcl_aLabelRangePrefix( "label " );
|
||||
static const OUString lcl_aCompleteRange( "all" );
|
||||
static const char lcl_aCategoriesRangeName[] = "categories";
|
||||
static const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
|
||||
static const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
|
||||
static const char lcl_aCategoriesRoleName[] = "categories";
|
||||
static const char lcl_aLabelRangePrefix[] = "label ";
|
||||
static const char lcl_aCompleteRange[] = "all";
|
||||
|
||||
typedef ::std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
|
||||
lcl_tSequenceMap;
|
||||
@@ -780,7 +780,7 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments(
|
||||
{
|
||||
Sequence< beans::PropertyValue > aArguments( 4 );
|
||||
aArguments[0] = beans::PropertyValue(
|
||||
"CellRangeRepresentation", -1, uno::makeAny( lcl_aCompleteRange ),
|
||||
"CellRangeRepresentation", -1, uno::makeAny( OUString(lcl_aCompleteRange) ),
|
||||
beans::PropertyState_DIRECT_VALUE );
|
||||
aArguments[1] = beans::PropertyValue(
|
||||
"DataRowSource", -1, uno::makeAny(
|
||||
@@ -821,7 +821,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa
|
||||
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
|
||||
{
|
||||
// label
|
||||
sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
|
||||
sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
|
||||
return createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::number( nIndex ));
|
||||
}
|
||||
else if ( aRangeRepresentation == "last" )
|
||||
@@ -868,7 +868,7 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt
|
||||
}
|
||||
else if( aRange.match( lcl_aLabelRangePrefix ))
|
||||
{
|
||||
sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
|
||||
sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
|
||||
bResult = (nIndex < (m_bDataInColumns ? m_aInternalData.getColumnCount(): m_aInternalData.getRowCount()));
|
||||
}
|
||||
else
|
||||
@@ -887,7 +887,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
|
||||
|
||||
if( aRange.match( lcl_aLabelRangePrefix ) )
|
||||
{
|
||||
sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
|
||||
sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
|
||||
vector< uno::Any > aComplexLabel = m_bDataInColumns
|
||||
? m_aInternalData.getComplexColumnLabel( nIndex )
|
||||
: m_aInternalData.getComplexRowLabel( nIndex );
|
||||
@@ -896,7 +896,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
|
||||
}
|
||||
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
|
||||
{
|
||||
sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesPointRangeNamePrefix.getLength() ).toInt32();
|
||||
sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesPointRangeNamePrefix) ).toInt32();
|
||||
vector< uno::Any > aComplexCategory = m_bDataInColumns
|
||||
? m_aInternalData.getComplexRowLabel( nPointIndex )
|
||||
: m_aInternalData.getComplexColumnLabel( nPointIndex );
|
||||
@@ -905,7 +905,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
|
||||
}
|
||||
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
|
||||
{
|
||||
sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength() ).toInt32();
|
||||
sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix) ).toInt32();
|
||||
vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
|
||||
if( nLevel < lcl_getInnerLevelCount( aCategories ) )
|
||||
{
|
||||
@@ -960,7 +960,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
|
||||
vector< uno::Any > aNewVector( ContainerHelper::SequenceToVector(aNewData) );
|
||||
if( aRange.match( lcl_aLabelRangePrefix ) )
|
||||
{
|
||||
sal_uInt32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
|
||||
sal_uInt32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
|
||||
if( m_bDataInColumns )
|
||||
m_aInternalData.setComplexColumnLabel( nIndex, aNewVector );
|
||||
else
|
||||
@@ -968,7 +968,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
|
||||
}
|
||||
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
|
||||
{
|
||||
sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32();
|
||||
sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
|
||||
if( m_bDataInColumns )
|
||||
m_aInternalData.setComplexRowLabel( nPointIndex, aNewVector );
|
||||
else
|
||||
@@ -976,7 +976,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
|
||||
}
|
||||
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
|
||||
{
|
||||
sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32();
|
||||
sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
|
||||
vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
|
||||
|
||||
//ensure equal length
|
||||
@@ -1204,7 +1204,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
|
||||
}
|
||||
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
|
||||
{
|
||||
sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
|
||||
sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
|
||||
aRange.aUpperLeft.bIsEmpty = false;
|
||||
aRange.aLowerRight.bIsEmpty = true;
|
||||
if( m_bDataInColumns )
|
||||
@@ -1265,7 +1265,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
|
||||
if( !aRange.aLowerRight.bIsEmpty &&
|
||||
( aRange.aUpperLeft.nColumn != aRange.aLowerRight.nColumn ) &&
|
||||
( aRange.aUpperLeft.nRow != aRange.aLowerRight.nRow ) )
|
||||
return lcl_aCompleteRange;
|
||||
return OUString(lcl_aCompleteRange);
|
||||
|
||||
// attention: this data provider has the limitation that it stores
|
||||
// internally if data comes from columns or rows. It is intended for
|
||||
@@ -1276,7 +1276,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
|
||||
if( m_bDataInColumns )
|
||||
{
|
||||
if( aRange.aUpperLeft.nColumn == 0 )
|
||||
return lcl_aCategoriesRangeName;
|
||||
return OUString(lcl_aCategoriesRangeName);
|
||||
if( aRange.aUpperLeft.nRow == 0 )
|
||||
return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nColumn - 1 );
|
||||
|
||||
@@ -1285,7 +1285,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
|
||||
|
||||
// data in rows
|
||||
if( aRange.aUpperLeft.nRow == 0 )
|
||||
return lcl_aCategoriesRangeName;
|
||||
return OUString(lcl_aCategoriesRangeName);
|
||||
if( aRange.aUpperLeft.nColumn == 0 )
|
||||
return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nRow - 1 );
|
||||
|
||||
@@ -1549,7 +1549,7 @@ Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static()
|
||||
return aServices;
|
||||
}
|
||||
|
||||
APPHELPER_XSERVICEINFO_IMPL( InternalDataProvider, lcl_aServiceName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( InternalDataProvider, OUString(lcl_aServiceName) );
|
||||
|
||||
} // namespace chart
|
||||
|
||||
|
||||
@@ -46,12 +46,11 @@ using namespace ::com::sun::star::chart2;
|
||||
using ::com::sun::star::uno::Reference;
|
||||
using ::com::sun::star::uno::Any;
|
||||
|
||||
static OUString m_aMultiClick( "MultiClick" );
|
||||
static OUString m_aDragMethodEquals( "DragMethod=" );
|
||||
static OUString m_aDragParameterEquals( "DragParameter=" );
|
||||
static OUString m_aProtocol( "CID/" );
|
||||
static OUString m_aEmptyString;
|
||||
static OUString m_aPieSegmentDragMethodServiceName( "PieSegmentDraging" );
|
||||
static const char m_aMultiClick[] = "MultiClick";
|
||||
static const char m_aDragMethodEquals[] = "DragMethod=";
|
||||
static const char m_aDragParameterEquals[] = "DragParameter=";
|
||||
static const char m_aProtocol[] = "CID/";
|
||||
static const OUString m_aPieSegmentDragMethodServiceName("PieSegmentDraging");
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -507,7 +506,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierForParticles(
|
||||
|
||||
OUStringBuffer aRet( m_aProtocol );
|
||||
aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
|
||||
if(aRet.getLength()>m_aProtocol.getLength())
|
||||
if(aRet.getLength() > (sal_Int32)strlen(m_aProtocol))
|
||||
aRet.appendAscii("/");
|
||||
|
||||
if(!rParentParticle.isEmpty())
|
||||
@@ -525,18 +524,16 @@ OUString ObjectIdentifier::createParticleForDiagram(
|
||||
const Reference< XDiagram >& /*xDiagram*/
|
||||
, ChartModel& /*xChartModel*/ )
|
||||
{
|
||||
static OUString aRet("D=0");
|
||||
//todo: if more than one diagram is implemeted, add the correct diagram index here
|
||||
return aRet;
|
||||
return OUString("D=0");
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createParticleForDiagram(
|
||||
const Reference< XDiagram >& /*xDiagram*/
|
||||
, const Reference< frame::XModel >& /*xChartModel*/ )
|
||||
{
|
||||
static OUString aRet("D=0");
|
||||
//todo: if more than one diagram is implemeted, add the correct diagram index here
|
||||
return aRet;
|
||||
return OUString("D=0");
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createParticleForCoordinateSystem(
|
||||
@@ -698,7 +695,7 @@ OUString ObjectIdentifier::createClassifiedIdentifier(
|
||||
, const OUString& rParticleID )//e.g. SeriesID
|
||||
{
|
||||
return createClassifiedIdentifierWithParent(
|
||||
eObjectType, rParticleID, m_aEmptyString );
|
||||
eObjectType, rParticleID, OUString() );
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
@@ -714,7 +711,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
|
||||
|
||||
OUStringBuffer aRet( m_aProtocol );
|
||||
aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
|
||||
if(aRet.getLength()>m_aProtocol.getLength())
|
||||
if(aRet.getLength() > (sal_Int32)strlen(m_aProtocol))
|
||||
aRet.appendAscii("/");
|
||||
aRet.append(rParentPartical);
|
||||
if(!rParentPartical.isEmpty())
|
||||
@@ -896,7 +893,7 @@ bool ObjectIdentifier::isMultiClickObject( const OUString& rClassifiedIdentifier
|
||||
//was selected before;
|
||||
|
||||
//!!!!! by definition the name of a MultiClickObject starts with "CID/MultiClick:"
|
||||
bool bRet = rClassifiedIdentifier.match( m_aMultiClick, m_aProtocol.getLength() );
|
||||
bool bRet = rClassifiedIdentifier.match( m_aMultiClick, strlen(m_aProtocol) );
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
|
||||
if( ! xProp.is())
|
||||
return;
|
||||
|
||||
static const OUString aRefSizeName( "ReferencePageSize" );
|
||||
static const char aRefSizeName[] = "ReferencePageSize";
|
||||
|
||||
try
|
||||
{
|
||||
@@ -168,7 +168,7 @@ void ReferenceSizeProvider::getAutoResizeFromPropSet(
|
||||
const Reference< beans::XPropertySet > & xProp,
|
||||
ReferenceSizeProvider::AutoResizeState & rInOutState )
|
||||
{
|
||||
static const OUString aRefSizeName( "ReferencePageSize" );
|
||||
static const char aRefSizeName[] = "ReferencePageSize";
|
||||
AutoResizeState eSingleState = AUTO_RESIZE_UNKNOWN;
|
||||
|
||||
if( xProp.is())
|
||||
|
||||
@@ -55,17 +55,15 @@ bool RegressionCurveCalculator::isLinearScaling(
|
||||
// no scaling means linear
|
||||
if( !xScaling.is())
|
||||
return true;
|
||||
static OUString aLinScalingServiceName( "com.sun.star.chart2.LinearScaling" );
|
||||
uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY );
|
||||
return (xServiceName.is() && xServiceName->getServiceName().equals( aLinScalingServiceName ));
|
||||
return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LinearScaling" ));
|
||||
}
|
||||
|
||||
bool RegressionCurveCalculator::isLogarithmicScaling(
|
||||
const Reference< chart2::XScaling > & xScaling )
|
||||
{
|
||||
static OUString aLogScalingServiceName( "com.sun.star.chart2.LogarithmicScaling" );
|
||||
uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY );
|
||||
return (xServiceName.is() && xServiceName->getServiceName().equals( aLogScalingServiceName ));
|
||||
return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LogarithmicScaling" ));
|
||||
}
|
||||
|
||||
void RegressionCurveCalculator::setRegressionProperties(
|
||||
|
||||
@@ -45,8 +45,8 @@ using ::osl::MutexGuard;
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aImplementationName( "com.sun.star.comp.chart2.RegressionEquation" );
|
||||
static const OUString lcl_aServiceName( "com.sun.star.chart2.RegressionEquation" );
|
||||
static const char lcl_aImplementationName[] = "com.sun.star.comp.chart2.RegressionEquation";
|
||||
static const char lcl_aServiceName[] = "com.sun.star.chart2.RegressionEquation";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -315,7 +315,7 @@ uno::Sequence< OUString > RegressionEquation::getSupportedServiceNames_Static()
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, lcl_aImplementationName );
|
||||
APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, OUString(lcl_aImplementationName) );
|
||||
|
||||
using impl::RegressionEquation_Base;
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName_Logarithmic( "com.sun.star.chart2.LogarithmicScaling" );
|
||||
static const OUString lcl_aServiceName_Exponential( "com.sun.star.chart2.ExponentialScaling" );
|
||||
static const OUString lcl_aServiceName_Linear( "com.sun.star.chart2.LinearScaling" );
|
||||
static const OUString lcl_aServiceName_Power( "com.sun.star.chart2.PowerScaling" );
|
||||
static const char lcl_aServiceName_Logarithmic[] = "com.sun.star.chart2.LogarithmicScaling";
|
||||
static const char lcl_aServiceName_Exponential[] = "com.sun.star.chart2.ExponentialScaling";
|
||||
static const char lcl_aServiceName_Linear[] = "com.sun.star.chart2.LinearScaling";
|
||||
static const char lcl_aServiceName_Power[] = "com.sun.star.chart2.PowerScaling";
|
||||
|
||||
}
|
||||
|
||||
@@ -53,8 +53,7 @@ LogarithmicScaling::~LogarithmicScaling()
|
||||
{
|
||||
}
|
||||
|
||||
double SAL_CALL
|
||||
LogarithmicScaling::doScaling( double value )
|
||||
double SAL_CALL LogarithmicScaling::doScaling( double value )
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
double fResult;
|
||||
@@ -65,27 +64,27 @@ LogarithmicScaling::doScaling( double value )
|
||||
return fResult;
|
||||
}
|
||||
|
||||
uno::Reference< XScaling > SAL_CALL
|
||||
LogarithmicScaling::getInverseScaling()
|
||||
uno::Reference< XScaling > SAL_CALL LogarithmicScaling::getInverseScaling()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return new ExponentialScaling( m_fBase );
|
||||
}
|
||||
|
||||
OUString SAL_CALL
|
||||
LogarithmicScaling::getServiceName()
|
||||
OUString SAL_CALL LogarithmicScaling::getServiceName()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return lcl_aServiceName_Logarithmic;
|
||||
return OUString(lcl_aServiceName_Logarithmic);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > LogarithmicScaling::getSupportedServiceNames_Static()
|
||||
{
|
||||
return uno::Sequence< OUString >( & lcl_aServiceName_Logarithmic, 1 );
|
||||
uno::Sequence< OUString > aSeq(1);
|
||||
aSeq.getArray()[0] = lcl_aServiceName_Logarithmic;
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( LogarithmicScaling, lcl_aServiceName_Logarithmic )
|
||||
APPHELPER_XSERVICEINFO_IMPL( LogarithmicScaling, OUString(lcl_aServiceName_Logarithmic) )
|
||||
|
||||
ExponentialScaling::ExponentialScaling( const uno::Reference< uno::XComponentContext > & xContext ) :
|
||||
m_fBase( 10.0 ),
|
||||
@@ -102,8 +101,7 @@ ExponentialScaling::~ExponentialScaling()
|
||||
{
|
||||
}
|
||||
|
||||
double SAL_CALL
|
||||
ExponentialScaling::doScaling( double value )
|
||||
double SAL_CALL ExponentialScaling::doScaling( double value )
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
double fResult;
|
||||
@@ -114,27 +112,27 @@ ExponentialScaling::doScaling( double value )
|
||||
return fResult;
|
||||
}
|
||||
|
||||
uno::Reference< XScaling > SAL_CALL
|
||||
ExponentialScaling::getInverseScaling()
|
||||
uno::Reference< XScaling > SAL_CALL ExponentialScaling::getInverseScaling()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return new LogarithmicScaling( m_fBase );
|
||||
}
|
||||
|
||||
OUString SAL_CALL
|
||||
ExponentialScaling::getServiceName()
|
||||
OUString SAL_CALL ExponentialScaling::getServiceName()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return lcl_aServiceName_Exponential;
|
||||
return OUString(lcl_aServiceName_Exponential);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > ExponentialScaling::getSupportedServiceNames_Static()
|
||||
{
|
||||
return uno::Sequence< OUString >( & lcl_aServiceName_Exponential, 1 );
|
||||
uno::Sequence< OUString > aSeq(1);
|
||||
aSeq.getArray()[0] = lcl_aServiceName_Exponential;
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( ExponentialScaling, lcl_aServiceName_Exponential )
|
||||
APPHELPER_XSERVICEINFO_IMPL( ExponentialScaling, OUString(lcl_aServiceName_Exponential) )
|
||||
|
||||
LinearScaling::LinearScaling( const uno::Reference< uno::XComponentContext > & xContext ) :
|
||||
m_fSlope( 1.0 ),
|
||||
@@ -172,20 +170,21 @@ uno::Reference< XScaling > SAL_CALL
|
||||
return new LinearScaling( 1.0 / m_fSlope, m_fOffset / m_fSlope );
|
||||
}
|
||||
|
||||
OUString SAL_CALL
|
||||
LinearScaling::getServiceName()
|
||||
OUString SAL_CALL LinearScaling::getServiceName()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return lcl_aServiceName_Linear;
|
||||
return OUString(lcl_aServiceName_Linear);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > LinearScaling::getSupportedServiceNames_Static()
|
||||
{
|
||||
return uno::Sequence< OUString >( & lcl_aServiceName_Linear, 1 );
|
||||
uno::Sequence< OUString > aSeq(1);
|
||||
aSeq.getArray()[0] = lcl_aServiceName_Linear;
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( LinearScaling, lcl_aServiceName_Linear )
|
||||
APPHELPER_XSERVICEINFO_IMPL( LinearScaling, OUString(lcl_aServiceName_Linear) )
|
||||
|
||||
PowerScaling::PowerScaling( const uno::Reference< uno::XComponentContext > & xContext ) :
|
||||
m_fExponent( 10.0 ),
|
||||
@@ -225,16 +224,18 @@ uno::Reference< XScaling > SAL_CALL
|
||||
PowerScaling::getServiceName()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return lcl_aServiceName_Power;
|
||||
return OUString(lcl_aServiceName_Power);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > PowerScaling::getSupportedServiceNames_Static()
|
||||
{
|
||||
return uno::Sequence< OUString >( & lcl_aServiceName_Power, 1 );
|
||||
uno::Sequence< OUString > aSeq(1);
|
||||
aSeq.getArray()[0] = lcl_aServiceName_Power;
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( PowerScaling, lcl_aServiceName_Power )
|
||||
APPHELPER_XSERVICEINFO_IMPL( PowerScaling, OUString(lcl_aServiceName_Power) )
|
||||
|
||||
} //namespace chart
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ using ::chart::impl::UncachedDataSequence_Base;
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString lcl_aServiceName( "com.sun.star.comp.chart.UncachedDataSequence" );
|
||||
static const char lcl_aServiceName[] = "com.sun.star.comp.chart.UncachedDataSequence";
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -156,7 +156,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL UncachedDataSequence::getPropertyS
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, lcl_aServiceName )
|
||||
APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, OUString(lcl_aServiceName) )
|
||||
|
||||
// ________ XNumericalDataSequence ________
|
||||
Sequence< double > SAL_CALL UncachedDataSequence::getNumericalData()
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString lcl_aServiceName_DateScaling( "com.sun.star.chart2.DateScaling" );
|
||||
static const OUString lcl_aServiceName_InverseDateScaling( "com.sun.star.chart2.InverseDateScaling" );
|
||||
static const char lcl_aServiceName_DateScaling[] = "com.sun.star.chart2.DateScaling";
|
||||
static const char lcl_aServiceName_InverseDateScaling[] = "com.sun.star.chart2.InverseDateScaling";
|
||||
|
||||
static const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic
|
||||
}
|
||||
@@ -100,16 +100,18 @@ uno::Reference< XScaling > SAL_CALL DateScaling::getInverseScaling()
|
||||
OUString SAL_CALL DateScaling::getServiceName()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return lcl_aServiceName_DateScaling;
|
||||
return OUString(lcl_aServiceName_DateScaling);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > DateScaling::getSupportedServiceNames_Static()
|
||||
{
|
||||
return uno::Sequence< OUString >( & lcl_aServiceName_DateScaling, 1 );
|
||||
uno::Sequence< OUString > aSeq(1);
|
||||
aSeq.getArray()[0] = lcl_aServiceName_DateScaling;
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( DateScaling, lcl_aServiceName_DateScaling )
|
||||
APPHELPER_XSERVICEINFO_IMPL( DateScaling, OUString(lcl_aServiceName_DateScaling) )
|
||||
|
||||
InverseDateScaling::InverseDateScaling( const Date& rNullDate, sal_Int32 nTimeUnit, bool bShifted )
|
||||
: m_aNullDate( rNullDate )
|
||||
@@ -179,16 +181,18 @@ uno::Reference< XScaling > SAL_CALL InverseDateScaling::getInverseScaling()
|
||||
OUString SAL_CALL InverseDateScaling::getServiceName()
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return lcl_aServiceName_InverseDateScaling;
|
||||
return OUString(lcl_aServiceName_InverseDateScaling);
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > InverseDateScaling::getSupportedServiceNames_Static()
|
||||
{
|
||||
return uno::Sequence< OUString >( & lcl_aServiceName_InverseDateScaling, 1 );
|
||||
uno::Sequence< OUString > aSeq( 1 );
|
||||
aSeq.getArray()[0] = lcl_aServiceName_InverseDateScaling;
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
|
||||
APPHELPER_XSERVICEINFO_IMPL( InverseDateScaling, lcl_aServiceName_InverseDateScaling )
|
||||
APPHELPER_XSERVICEINFO_IMPL( InverseDateScaling, OUString(lcl_aServiceName_InverseDateScaling) )
|
||||
|
||||
} //namespace chart
|
||||
|
||||
|
||||
@@ -129,14 +129,14 @@ namespace comphelper
|
||||
|
||||
namespace
|
||||
{
|
||||
void lcl_replaceParameter( OUString& _inout_Message, const OUString& _rPlaceHolder, const OUString& _rReplacement )
|
||||
void lcl_replaceParameter( OUString& _inout_Message, const char* _rPlaceHolder, const OUString& _rReplacement )
|
||||
{
|
||||
sal_Int32 nPlaceholderPosition = _inout_Message.indexOf( _rPlaceHolder );
|
||||
sal_Int32 nPlaceholderPosition = _inout_Message.indexOfAsciiL( _rPlaceHolder, strlen(_rPlaceHolder) );
|
||||
OSL_ENSURE( nPlaceholderPosition >= 0, "lcl_replaceParameter: placeholder not found!" );
|
||||
if ( nPlaceholderPosition < 0 )
|
||||
return;
|
||||
|
||||
_inout_Message = _inout_Message.replaceAt( nPlaceholderPosition, _rPlaceHolder.getLength(), _rReplacement );
|
||||
_inout_Message = _inout_Message.replaceAt( nPlaceholderPosition, strlen(_rPlaceHolder), _rReplacement );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,32 +147,24 @@ namespace comphelper
|
||||
const OptionalString& _rArgument3, const OptionalString& _rArgument4,
|
||||
const OptionalString& _rArgument5, const OptionalString& _rArgument6 ) const
|
||||
{
|
||||
// (if OUString had an indexOfAscii, we could save those ugly statics ...)
|
||||
static OUString sPH1( "$1$" );
|
||||
static OUString sPH2( "$2$" );
|
||||
static OUString sPH3( "$3$" );
|
||||
static OUString sPH4( "$4$" );
|
||||
static OUString sPH5( "$5$" );
|
||||
static OUString sPH6( "$6$" );
|
||||
|
||||
OUString sMessage( _rMessage );
|
||||
if ( !!_rArgument1 )
|
||||
lcl_replaceParameter( sMessage, sPH1, *_rArgument1 );
|
||||
lcl_replaceParameter( sMessage, "$1$", *_rArgument1 );
|
||||
|
||||
if ( !!_rArgument2 )
|
||||
lcl_replaceParameter( sMessage, sPH2, *_rArgument2 );
|
||||
lcl_replaceParameter( sMessage, "$2$", *_rArgument2 );
|
||||
|
||||
if ( !!_rArgument3 )
|
||||
lcl_replaceParameter( sMessage, sPH3, *_rArgument3 );
|
||||
lcl_replaceParameter( sMessage, "$3$", *_rArgument3 );
|
||||
|
||||
if ( !!_rArgument4 )
|
||||
lcl_replaceParameter( sMessage, sPH4, *_rArgument4 );
|
||||
lcl_replaceParameter( sMessage, "$4$", *_rArgument4 );
|
||||
|
||||
if ( !!_rArgument5 )
|
||||
lcl_replaceParameter( sMessage, sPH5, *_rArgument5 );
|
||||
lcl_replaceParameter( sMessage, "$5$", *_rArgument5 );
|
||||
|
||||
if ( !!_rArgument6 )
|
||||
lcl_replaceParameter( sMessage, sPH6, *_rArgument6 );
|
||||
lcl_replaceParameter( sMessage, "$6$", *_rArgument6 );
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -67,8 +67,7 @@ css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumb
|
||||
css::uno::Reference<css::beans::XPropertySet> xFormat( xFormats->getByKey(nKey));
|
||||
if (xFormat.is())
|
||||
{
|
||||
static OUString PROPERTY_DECIMALS( "Decimals" );
|
||||
return xFormat->getPropertyValue(PROPERTY_DECIMALS);
|
||||
return xFormat->getPropertyValue( "Decimals" );
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace connectivity
|
||||
if ( sStmt.startsWith("INSERT") )
|
||||
{
|
||||
sStatement = m_sGeneratedValueStatement;
|
||||
static const OUString sColumn("$column");
|
||||
static const OUString sTable("$table");
|
||||
static const char sColumn[] = "$column";
|
||||
static const char sTable[] = "$table";
|
||||
sal_Int32 nIndex = 0;
|
||||
nIndex = sStatement.indexOf(sColumn,nIndex);
|
||||
if ( -1 != nIndex )
|
||||
@@ -49,7 +49,7 @@ namespace connectivity
|
||||
|
||||
nIntoIndex = 0;
|
||||
OUString sTableName = sStmt.getToken(0,' ',nIntoIndex);
|
||||
sStatement = sStatement.replaceAt(nIndex,sTable.getLength(),sTableName);
|
||||
sStatement = sStatement.replaceAt(nIndex, strlen(sTable), sTableName);
|
||||
}
|
||||
}
|
||||
return sStatement;
|
||||
|
||||
@@ -288,10 +288,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
|
||||
// and again a special treatment, this time for percent formats
|
||||
if ((NumberFormat::NUMBER == nRealUsedTypeClass) && (NumberFormat::PERCENT == nTypeClass))
|
||||
{ // formatting should be "percent", but the String provides just a simple number -> adjust
|
||||
OUString sExpanded(rString);
|
||||
static OUString s_sPercentSymbol( "%" );
|
||||
// need a method to add a sal_Unicode to a string, 'til then we use a static string
|
||||
sExpanded += s_sPercentSymbol;
|
||||
OUString sExpanded = rString + "%";
|
||||
fValue = xFormatter->convertStringToNumber(nKeyToUse, sExpanded);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace
|
||||
if ( aPropertiesNode.isValid() )
|
||||
{
|
||||
uno::Sequence< OUString > aStringSeq;
|
||||
static const OUString s_sValue("/Value");
|
||||
static const char s_sValue[] = "/Value";
|
||||
const uno::Sequence< OUString > aProperties = aPropertiesNode.getNodeNames();
|
||||
const OUString* pPropertiesIter = aProperties.getConstArray();
|
||||
const OUString* pPropertiesEnd = pPropertiesIter + aProperties.getLength();
|
||||
@@ -97,7 +97,7 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx
|
||||
{
|
||||
if ( !m_aInstalled.isValid() )
|
||||
{
|
||||
static const OUString s_sNodeName("org.openoffice.Office.DataAccess.Drivers/Installed"); ///Installed
|
||||
static const char s_sNodeName[] = "org.openoffice.Office.DataAccess.Drivers/Installed"; ///Installed
|
||||
m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,14 +122,10 @@ namespace connectivity
|
||||
Reference<XMultiServiceFactory> xFac(_xConnection,UNO_QUERY);
|
||||
if ( xFac.is() )
|
||||
{
|
||||
static const OUString s_sTableRename("TableRenameServiceName");
|
||||
m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableRename)),UNO_QUERY);
|
||||
static const OUString s_sTableAlteration("TableAlterationServiceName");
|
||||
m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableAlteration)),UNO_QUERY);
|
||||
static const OUString s_sKeyAlteration("KeyAlterationServiceName");
|
||||
m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sKeyAlteration)),UNO_QUERY);
|
||||
static const OUString s_sIndexAlteration("IndexAlterationServiceName");
|
||||
m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sIndexAlteration)),UNO_QUERY);
|
||||
m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"TableRenameServiceName")),UNO_QUERY);
|
||||
m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"TableAlterationServiceName")),UNO_QUERY);
|
||||
m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"KeyAlterationServiceName")),UNO_QUERY);
|
||||
m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"IndexAlterationServiceName")),UNO_QUERY);
|
||||
}
|
||||
}
|
||||
catch(const Exception&)
|
||||
|
||||
@@ -32,12 +32,7 @@ namespace dbtools
|
||||
using namespace ::com::sun::star::sdbc;
|
||||
using namespace ::com::sun::star::lang;
|
||||
|
||||
|
||||
static const OUString& getActiveConnectionPropertyName()
|
||||
{
|
||||
static const OUString s_sActiveConnectionPropertyName( "ActiveConnection" );
|
||||
return s_sActiveConnectionPropertyName;
|
||||
}
|
||||
static const char ACTIVE_CONNECTION_PROPERTY_NAME[] = "ActiveConnection";
|
||||
|
||||
|
||||
//= OAutoConnectionDisposer
|
||||
@@ -56,7 +51,7 @@ namespace dbtools
|
||||
|
||||
try
|
||||
{
|
||||
xProps->setPropertyValue( getActiveConnectionPropertyName(), makeAny( _rxConnection ) );
|
||||
xProps->setPropertyValue( ACTIVE_CONNECTION_PROPERTY_NAME, makeAny( _rxConnection ) );
|
||||
m_xOriginalConnection = _rxConnection;
|
||||
startPropertyListening( xProps );
|
||||
}
|
||||
@@ -71,7 +66,7 @@ namespace dbtools
|
||||
{
|
||||
try
|
||||
{
|
||||
_rxRowSet->addPropertyChangeListener( getActiveConnectionPropertyName(), this );
|
||||
_rxRowSet->addPropertyChangeListener( ACTIVE_CONNECTION_PROPERTY_NAME, this );
|
||||
m_bPropertyListening = true;
|
||||
}
|
||||
catch( const Exception& )
|
||||
@@ -91,7 +86,7 @@ namespace dbtools
|
||||
OSL_ENSURE( _rxEventSource.is(), "OAutoConnectionDisposer::stopPropertyListening: invalid event source (no XPropertySet)!" );
|
||||
if ( _rxEventSource.is() )
|
||||
{
|
||||
_rxEventSource->removePropertyChangeListener( getActiveConnectionPropertyName(), this );
|
||||
_rxEventSource->removePropertyChangeListener( ACTIVE_CONNECTION_PROPERTY_NAME, this );
|
||||
m_bPropertyListening = false;
|
||||
}
|
||||
}
|
||||
@@ -135,7 +130,7 @@ namespace dbtools
|
||||
|
||||
void SAL_CALL OAutoConnectionDisposer::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException, std::exception)
|
||||
{
|
||||
if ( _rEvent.PropertyName.equals( getActiveConnectionPropertyName() ) )
|
||||
if ( _rEvent.PropertyName == ACTIVE_CONNECTION_PROPERTY_NAME )
|
||||
{ // somebody set a new ActiveConnection
|
||||
|
||||
Reference< XConnection > xNewConnection;
|
||||
|
||||
@@ -694,15 +694,15 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
|
||||
Reference< XRow > xCurrentRow(xPrivileges, UNO_QUERY);
|
||||
|
||||
const OUString sUserWorkingFor = _xMetaData->getUserName();
|
||||
static const OUString sSELECT( "SELECT" );
|
||||
static const OUString sINSERT( "INSERT" );
|
||||
static const OUString sUPDATE( "UPDATE" );
|
||||
static const OUString sDELETE( "DELETE" );
|
||||
static const OUString sREAD( "READ" );
|
||||
static const OUString sCREATE( "CREATE" );
|
||||
static const OUString sALTER( "ALTER" );
|
||||
static const OUString sREFERENCE( "REFERENCE" );
|
||||
static const OUString sDROP( "DROP" );
|
||||
static const char sSELECT[] = "SELECT";
|
||||
static const char sINSERT[] = "INSERT";
|
||||
static const char sUPDATE[] = "UPDATE";
|
||||
static const char sDELETE[] = "DELETE";
|
||||
static const char sREAD[] = "READ";
|
||||
static const char sCREATE[] = "CREATE";
|
||||
static const char sALTER[] = "ALTER";
|
||||
static const char sREFERENCE[] = "REFERENCE";
|
||||
static const char sDROP[] = "DROP";
|
||||
|
||||
if ( xCurrentRow.is() )
|
||||
{
|
||||
@@ -800,9 +800,8 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
|
||||
}
|
||||
catch(const SQLException& e)
|
||||
{
|
||||
static OUString sNotSupportedState( "IM001" );
|
||||
// some drivers don't support any privileges so we assume that we are allowed to do all we want :-)
|
||||
if(e.SQLState == sNotSupportedState)
|
||||
if(e.SQLState == "IM001")
|
||||
nPrivileges |= Privilege::DROP |
|
||||
Privilege::REFERENCE |
|
||||
Privilege::ALTER |
|
||||
@@ -965,20 +964,17 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour
|
||||
}
|
||||
OUString lcl_getReportEngines()
|
||||
{
|
||||
static OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines");
|
||||
return s_sNodeName;
|
||||
return OUString("org.openoffice.Office.DataAccess/ReportEngines");
|
||||
}
|
||||
|
||||
OUString lcl_getDefaultReportEngine()
|
||||
{
|
||||
static OUString s_sNodeName("DefaultReportEngine");
|
||||
return s_sNodeName;
|
||||
return OUString("DefaultReportEngine");
|
||||
}
|
||||
|
||||
OUString lcl_getReportEngineNames()
|
||||
{
|
||||
static OUString s_sNodeName("ReportEngineNames");
|
||||
return s_sNodeName;
|
||||
return OUString("ReportEngineNames");
|
||||
}
|
||||
|
||||
OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB)
|
||||
|
||||
@@ -156,8 +156,8 @@ namespace dbtools
|
||||
)
|
||||
)
|
||||
{
|
||||
static const OUString sSingleQuote( "'" );
|
||||
static const OUString sDoubleQuote( "''" );
|
||||
static const char sSingleQuote[] = "'";
|
||||
static const char sDoubleQuote[] = "''";
|
||||
|
||||
sal_Int32 nIndex = -1;
|
||||
sal_Int32 nTemp = 0;
|
||||
@@ -304,8 +304,8 @@ namespace dbtools
|
||||
if ( bValidQuotedText )
|
||||
{
|
||||
sValue = sValue.copy( 1, sValue.getLength() - 2 );
|
||||
static const OUString sSingleQuote( "'" );
|
||||
static const OUString sDoubleQuote( "''" );
|
||||
static const char sSingleQuote[] = "'";
|
||||
static const char sDoubleQuote[] = "''";
|
||||
|
||||
sal_Int32 nIndex = -1;
|
||||
sal_Int32 nTemp = 0;
|
||||
|
||||
@@ -48,16 +48,8 @@ void SAL_CALL OPoolTimer::onShot()
|
||||
{
|
||||
m_pPool->invalidatePooledConnections();
|
||||
}
|
||||
namespace
|
||||
{
|
||||
|
||||
static const OUString& getTimeoutNodeName()
|
||||
{
|
||||
static OUString s_sNodeName( "Timeout" );
|
||||
return s_sNodeName;
|
||||
}
|
||||
|
||||
}
|
||||
static const char TIMEOUT_NODENAME[] = "Timeout";
|
||||
|
||||
//= OConnectionPool
|
||||
|
||||
@@ -78,9 +70,9 @@ OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver,
|
||||
|
||||
Reference<XPropertySet> xProp(m_xDriverNode,UNO_QUERY);
|
||||
if(xProp.is())
|
||||
xProp->addPropertyChangeListener(getTimeoutNodeName(),this);
|
||||
xProp->addPropertyChangeListener(TIMEOUT_NODENAME,this);
|
||||
|
||||
OPoolCollection::getNodeValue(getTimeoutNodeName(),m_xDriverNode) >>= m_nALiveCount;
|
||||
OPoolCollection::getNodeValue(TIMEOUT_NODENAME, m_xDriverNode) >>= m_nALiveCount;
|
||||
calculateTimeOuts();
|
||||
|
||||
m_xInvalidator = new OPoolTimer(this,::salhelper::TTimeValue(m_nTimeOut,0));
|
||||
@@ -161,7 +153,7 @@ void OConnectionPool::clear(bool _bDispose)
|
||||
xComponent->removeEventListener(this);
|
||||
Reference< XPropertySet > xProp(m_xDriverNode, UNO_QUERY);
|
||||
if (xProp.is())
|
||||
xProp->removePropertyChangeListener(getTimeoutNodeName(),this);
|
||||
xProp->removePropertyChangeListener(TIMEOUT_NODENAME, this);
|
||||
|
||||
m_xDriverNode.clear();
|
||||
m_xDriver.clear();
|
||||
@@ -302,7 +294,7 @@ Reference< XConnection> OConnectionPool::getPooledConnection(TConnectionMap::ite
|
||||
|
||||
void SAL_CALL OConnectionPool::propertyChange( const PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if(getTimeoutNodeName() == evt.PropertyName)
|
||||
if(TIMEOUT_NODENAME == evt.PropertyName)
|
||||
{
|
||||
evt.NewValue >>= m_nALiveCount;
|
||||
calculateTimeOuts();
|
||||
|
||||
@@ -42,34 +42,29 @@ using namespace ::osl;
|
||||
using namespace connectivity;
|
||||
|
||||
|
||||
static const OUString& getConnectionPoolNodeName()
|
||||
static OUString getConnectionPoolNodeName()
|
||||
{
|
||||
static OUString s_sNodeName( "org.openoffice.Office.DataAccess/ConnectionPool" );
|
||||
return s_sNodeName;
|
||||
return OUString( "org.openoffice.Office.DataAccess/ConnectionPool" );
|
||||
}
|
||||
|
||||
static const OUString& getEnablePoolingNodeName()
|
||||
static OUString getEnablePoolingNodeName()
|
||||
{
|
||||
static OUString s_sNodeName( "EnablePooling" );
|
||||
return s_sNodeName;
|
||||
return OUString( "EnablePooling" );
|
||||
}
|
||||
|
||||
static const OUString& getDriverNameNodeName()
|
||||
static OUString getDriverNameNodeName()
|
||||
{
|
||||
static OUString s_sNodeName( "DriverName" );
|
||||
return s_sNodeName;
|
||||
return OUString( "DriverName" );
|
||||
}
|
||||
|
||||
static const OUString& getDriverSettingsNodeName()
|
||||
static OUString getDriverSettingsNodeName()
|
||||
{
|
||||
static OUString s_sNodeName( "DriverSettings" );
|
||||
return s_sNodeName;
|
||||
return OUString( "DriverSettings" );
|
||||
}
|
||||
|
||||
static const OUString& getEnableNodeName()
|
||||
static OUString getEnableNodeName()
|
||||
{
|
||||
static OUString s_sNodeName( "Enable" );
|
||||
return s_sNodeName;
|
||||
return OUString( "Enable" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ void OConnection::buildTypeInfo() throw( SQLException)
|
||||
if ( bOk )
|
||||
{
|
||||
// HACK for access
|
||||
static const OUString s_sVarChar("VarChar");
|
||||
static const char s_sVarChar[] = "VarChar";
|
||||
do
|
||||
{
|
||||
sal_Int32 nPos = 1;
|
||||
|
||||
@@ -142,11 +142,10 @@ static CellContentType lcl_GetContentOrResultType( const Reference<XCell>& xCell
|
||||
CellContentType eCellType = xCell->getType();
|
||||
if ( eCellType == CellContentType_FORMULA )
|
||||
{
|
||||
static const OUString s_sFormulaResultType("FormulaResultType");
|
||||
Reference<XPropertySet> xProp( xCell, UNO_QUERY );
|
||||
try
|
||||
{
|
||||
xProp->getPropertyValue( s_sFormulaResultType ) >>= eCellType; // type of formula result
|
||||
xProp->getPropertyValue( "FormulaResultType" ) >>= eCellType; // type of formula result
|
||||
}
|
||||
catch (UnknownPropertyException&)
|
||||
{
|
||||
@@ -258,10 +257,9 @@ static void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Refe
|
||||
sal_Int16 nNumType = NumberFormat::NUMBER;
|
||||
try
|
||||
{
|
||||
static OUString s_NumberFormat("NumberFormat");
|
||||
sal_Int32 nKey = 0;
|
||||
|
||||
if ( xProp->getPropertyValue( s_NumberFormat ) >>= nKey )
|
||||
if ( xProp->getPropertyValue( "NumberFormat" ) >>= nKey )
|
||||
{
|
||||
const Reference<XPropertySet> xFormat = xFormats->getByKey( nKey );
|
||||
if ( xFormat.is() )
|
||||
|
||||
@@ -374,9 +374,8 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
bool bReadOnly = false;
|
||||
static OUString sReadOnly( "IsReadOnly" );
|
||||
::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
|
||||
aFile.getPropertyValue(sReadOnly) >>= bReadOnly;
|
||||
aFile.getPropertyValue("IsReadOnly") >>= bReadOnly;
|
||||
|
||||
return bReadOnly;
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName
|
||||
OUString sName;
|
||||
OUString sExt;
|
||||
INetURLObject aURL;
|
||||
static const OUString s_sSeparator("/");
|
||||
static const char s_sSeparator[] = "/";
|
||||
xDir->beforeFirst();
|
||||
while(xDir->next())
|
||||
{
|
||||
@@ -1149,7 +1149,7 @@ bool ODbaseTable::CreateImpl()
|
||||
return true;
|
||||
}
|
||||
|
||||
void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const OUString& _sColumnName)
|
||||
void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId, const OUString& _sColumnName)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
|
||||
void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
|
||||
{
|
||||
OSQLColumns::Vector::const_iterator aIter;
|
||||
static const OUString aName("Name");
|
||||
static const char aName[] = "Name";
|
||||
|
||||
for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter)
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
|
||||
// check if any type is given
|
||||
// when no types are given then we have to return all tables e.g. TABLE
|
||||
|
||||
static const OUString aTable("TABLE");
|
||||
static const char aTable[] = "TABLE";
|
||||
|
||||
bool bTableFound = true;
|
||||
sal_Int32 nLength = types.getLength();
|
||||
@@ -296,7 +296,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
|
||||
}
|
||||
if(bNewRow)
|
||||
{
|
||||
aRow.push_back(new ORowSetValueDecorator(aTable));
|
||||
aRow.push_back(new ORowSetValueDecorator(OUString(aTable)));
|
||||
aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
|
||||
|
||||
aRows.push_back(aRow);
|
||||
@@ -499,8 +499,7 @@ OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, Runt
|
||||
|
||||
OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
|
||||
{
|
||||
static const OUString sQuote("\"");
|
||||
return sQuote;
|
||||
return OUString("\"");
|
||||
}
|
||||
|
||||
OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException, std::exception)
|
||||
@@ -853,8 +852,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL
|
||||
|
||||
OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException, std::exception)
|
||||
{
|
||||
static const OUString aValue( "sdbc:file:" );
|
||||
return aValue;
|
||||
return OUString( "sdbc:file:" );
|
||||
}
|
||||
|
||||
OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException, std::exception)
|
||||
|
||||
@@ -1034,7 +1034,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
|
||||
uno::Reference< XResultSet > xResultSet = pResultSet;
|
||||
uno::Reference< XStatement > statement = m_pConnection->createStatement();
|
||||
|
||||
static const OUString wld("%");
|
||||
static const char wld[] = "%";
|
||||
OUStringBuffer queryBuf(
|
||||
"SELECT "
|
||||
"priv.RDB$RELATION_NAME, " // 1 Table name
|
||||
@@ -1295,7 +1295,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
|
||||
uno::Reference< XResultSet > xResultSet = pResultSet;
|
||||
uno::Reference< XStatement > statement = m_pConnection->createStatement();
|
||||
|
||||
static const OUString wld("%");
|
||||
static const char wld[] = "%";
|
||||
OUStringBuffer queryBuf(
|
||||
"SELECT "
|
||||
"RDB$RELATION_NAME, "
|
||||
@@ -1662,7 +1662,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
|
||||
|
||||
// TODO: column specific privileges are included, we may need
|
||||
// to have WHERE RDB$FIELD_NAME = NULL or similar.
|
||||
static const OUString wld("%");
|
||||
static const char wld[] = "%";
|
||||
OUStringBuffer queryBuf(
|
||||
"SELECT "
|
||||
"priv.RDB$RELATION_NAME, " // 1
|
||||
|
||||
@@ -332,14 +332,12 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
|
||||
if(io_nPrecisions)
|
||||
{
|
||||
io_nType = DataType::DECIMAL;
|
||||
static const OUString s_sDECIMAL("DECIMAL");
|
||||
o_sTypeName = s_sDECIMAL;
|
||||
o_sTypeName = "DECIMAL";
|
||||
}
|
||||
else
|
||||
{
|
||||
io_nType = DataType::DOUBLE;
|
||||
static const OUString s_sDOUBLE("DOUBLE");
|
||||
o_sTypeName = s_sDOUBLE;
|
||||
o_sTypeName = "DOUBLE";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -356,33 +354,21 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
|
||||
{
|
||||
case NUMBERFORMAT_DATE:
|
||||
io_nType = DataType::DATE;
|
||||
{
|
||||
static const OUString s_sDATE("DATE");
|
||||
o_sTypeName = s_sDATE;
|
||||
}
|
||||
o_sTypeName = "DATE";
|
||||
break;
|
||||
case NUMBERFORMAT_DATETIME:
|
||||
io_nType = DataType::TIMESTAMP;
|
||||
{
|
||||
static const OUString s_sTIMESTAMP("TIMESTAMP");
|
||||
o_sTypeName = s_sTIMESTAMP;
|
||||
}
|
||||
o_sTypeName = "TIMESTAMP";
|
||||
break;
|
||||
case NUMBERFORMAT_TIME:
|
||||
io_nType = DataType::TIME;
|
||||
{
|
||||
static const OUString s_sTIME("TIME");
|
||||
o_sTypeName = s_sTIME;
|
||||
}
|
||||
o_sTypeName = "TIME";
|
||||
break;
|
||||
default:
|
||||
io_nType = DataType::VARCHAR;
|
||||
io_nPrecisions = 0; // nyi: Data can be longer!
|
||||
io_nScales = 0;
|
||||
{
|
||||
static const OUString s_sVARCHAR("VARCHAR");
|
||||
o_sTypeName = s_sVARCHAR;
|
||||
}
|
||||
o_sTypeName = "VARCHAR";
|
||||
};
|
||||
nFlags |= ColumnSearch::CHAR;
|
||||
}
|
||||
@@ -477,7 +463,7 @@ OUString OFlatTable::getEntry()
|
||||
|
||||
INetURLObject aURL;
|
||||
xDir->beforeFirst();
|
||||
static const OUString s_sSeparator("/");
|
||||
static const char s_sSeparator[] = "/";
|
||||
while(xDir->next())
|
||||
{
|
||||
sName = xRow->getString(1);
|
||||
|
||||
@@ -53,8 +53,8 @@ void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStrin
|
||||
void OHCatalog::refreshTables()
|
||||
{
|
||||
TStringVector aVector;
|
||||
static const OUString s_sTableTypeView("VIEW");
|
||||
static const OUString s_sTableTypeTable("TABLE");
|
||||
static const char s_sTableTypeView[] = "VIEW";
|
||||
static const char s_sTableTypeTable[] = "TABLE";
|
||||
|
||||
Sequence< OUString > sTableTypes(2);
|
||||
sTableTypes[0] = s_sTableTypeView;
|
||||
|
||||
@@ -51,9 +51,9 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
|
||||
OUString sCatalog,sSchema,sTable;
|
||||
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
|
||||
|
||||
static const OUString s_sTableTypeView("VIEW");
|
||||
static const OUString s_sTableTypeTable("TABLE");
|
||||
static const OUString s_sAll("%");
|
||||
static const char s_sTableTypeView[] = "VIEW";
|
||||
static const char s_sTableTypeTable[] = "TABLE";
|
||||
static const char s_sAll[] = "%";
|
||||
|
||||
Sequence< OUString > sTableTypes(3);
|
||||
sTableTypes[0] = s_sTableTypeView;
|
||||
|
||||
@@ -119,16 +119,16 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In
|
||||
|
||||
if ( xRes.is() )
|
||||
{
|
||||
static const OUString sSELECT( "SELECT" );
|
||||
static const OUString sINSERT( "INSERT" );
|
||||
static const OUString sUPDATE( "UPDATE" );
|
||||
static const OUString sDELETE( "DELETE" );
|
||||
static const OUString sREAD( "READ" );
|
||||
static const OUString sCREATE( "CREATE" );
|
||||
static const OUString sALTER( "ALTER" );
|
||||
static const OUString sREFERENCE( "REFERENCE" );
|
||||
static const OUString sDROP( "DROP" );
|
||||
static const OUString sYes( "YES" );
|
||||
static const char sSELECT [] = "SELECT";
|
||||
static const char sINSERT [] = "INSERT";
|
||||
static const char sUPDATE [] = "UPDATE";
|
||||
static const char sDELETE [] = "DELETE";
|
||||
static const char sREAD [] = "READ";
|
||||
static const char sCREATE [] = "CREATE";
|
||||
static const char sALTER [] = "ALTER";
|
||||
static const char sREFERENCE[] = "REFERENCE";
|
||||
static const char sDROP [] = "DROP";
|
||||
static const char sYes [] = "YES";
|
||||
|
||||
nRightsWithGrant = nRights = 0;
|
||||
|
||||
|
||||
@@ -758,7 +758,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
|
||||
|
||||
OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass)
|
||||
{
|
||||
static const OUString s_sNodeName("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths");
|
||||
static const char s_sNodeName[] = "org.openoffice.Office.DataAccess/JDBC/DriverClassPaths";
|
||||
::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
|
||||
m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
|
||||
OUString sURL;
|
||||
|
||||
@@ -51,9 +51,7 @@ KabDatabaseMetaData::~KabDatabaseMetaData()
|
||||
|
||||
const OUString & KabDatabaseMetaData::getAddressBookTableName()
|
||||
{
|
||||
static const OUString aAddressBookTableName
|
||||
(OUString::createFromAscii( i18n("Address Book") ));
|
||||
|
||||
static const OUString aAddressBookTableName("Address Book");
|
||||
return aAddressBookTableName;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ KabResultSetMetaData::~KabResultSetMetaData()
|
||||
void KabResultSetMetaData::setKabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
|
||||
{
|
||||
OSQLColumns::Vector::const_iterator aIter;
|
||||
static const OUString aName("Name");
|
||||
static const char aName[] = "Name";
|
||||
|
||||
for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter)
|
||||
{
|
||||
|
||||
@@ -778,7 +778,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw(
|
||||
Reference< XResultSet > xRef = pResult;
|
||||
|
||||
static ODatabaseMetaDataResultSet::ORows aRows;
|
||||
static const OUString aTable("TABLE");
|
||||
static const char aTable[] = "TABLE";
|
||||
|
||||
if (aRows.empty())
|
||||
{
|
||||
@@ -963,7 +963,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables(
|
||||
// check whether we have tables in the requested types
|
||||
// for the moment, we answer only the "TABLE" table type
|
||||
// when no types are given at all, we return all the tables
|
||||
static const OUString aTable("TABLE");
|
||||
static const char aTable[] = "TABLE";
|
||||
bool bTableFound = false;
|
||||
const OUString* p = types.getConstArray(),
|
||||
* pEnd = p + types.getLength();
|
||||
|
||||
@@ -44,7 +44,7 @@ MacabResultSetMetaData::~MacabResultSetMetaData()
|
||||
void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
|
||||
{
|
||||
OSQLColumns::Vector::const_iterator aIter;
|
||||
static const OUString aName("Name");
|
||||
static const char aName[] = "Name";
|
||||
MacabRecords *aRecords;
|
||||
MacabHeader *aHeader;
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TS
|
||||
void OMySQLCatalog::refreshTables()
|
||||
{
|
||||
TStringVector aVector;
|
||||
static const OUString s_sTableTypeView("VIEW");
|
||||
static const OUString s_sTableTypeTable("TABLE");
|
||||
static const OUString s_sAll("%");
|
||||
static const char s_sTableTypeView[] = "VIEW";
|
||||
static const char s_sTableTypeTable[] = "TABLE";
|
||||
static const char s_sAll[] = "%";
|
||||
|
||||
Sequence< OUString > sTableTypes(3);
|
||||
sTableTypes[0] = s_sTableTypeView;
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace connectivity
|
||||
OUString sAdd;
|
||||
if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() )
|
||||
{
|
||||
static const OUString s_sCharSetOp("useUnicode=true&");
|
||||
static const char s_sCharSetOp[] = "useUnicode=true&";
|
||||
if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) )
|
||||
{
|
||||
sAdd = s_sCharSetOp;
|
||||
|
||||
@@ -196,7 +196,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
|
||||
::dbtools::OPropertyMap& rProp = OMetaConnection::getPropMap();
|
||||
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType;
|
||||
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType;
|
||||
// and precsions and scale
|
||||
// and precisions and scale
|
||||
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec;
|
||||
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION))>>= nNewPrec;
|
||||
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale;
|
||||
@@ -229,7 +229,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
|
||||
OUString sTypeName;
|
||||
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sTypeName;
|
||||
|
||||
static OUString s_sAutoIncrement("auto_increment");
|
||||
static const char s_sAutoIncrement[] = "auto_increment";
|
||||
if ( bAutoIncrement )
|
||||
{
|
||||
if ( sTypeName.indexOf(s_sAutoIncrement) == -1 )
|
||||
@@ -308,8 +308,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName,
|
||||
|
||||
OUString OMySQLTable::getTypeCreatePattern() const
|
||||
{
|
||||
static const OUString s_sCreatePattern("(M,D)");
|
||||
return s_sCreatePattern;
|
||||
return OUString("(M,D)");
|
||||
}
|
||||
|
||||
void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName)
|
||||
|
||||
@@ -51,9 +51,9 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
|
||||
OUString sCatalog,sSchema,sTable;
|
||||
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
|
||||
|
||||
static const OUString s_sTableTypeView("VIEW");
|
||||
static const OUString s_sTableTypeTable("TABLE");
|
||||
static const OUString s_sAll("%");
|
||||
static const char s_sTableTypeView[] = "VIEW";
|
||||
static const char s_sTableTypeTable[] = "TABLE";
|
||||
static const char s_sAll[] = "%";
|
||||
|
||||
Sequence< OUString > sTableTypes(3);
|
||||
sTableTypes[0] = s_sTableTypeView;
|
||||
@@ -164,15 +164,15 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName)
|
||||
OUString OTables::adjustSQL(const OUString& _sSql)
|
||||
{
|
||||
OUString sSQL = _sSql;
|
||||
static const OUString s_sUNSIGNED("UNSIGNED");
|
||||
static const char s_sUNSIGNED[] = "UNSIGNED";
|
||||
sal_Int32 nIndex = sSQL.indexOf(s_sUNSIGNED);
|
||||
while(nIndex != -1 )
|
||||
{
|
||||
sal_Int32 nParen = sSQL.indexOf(')',nIndex);
|
||||
sal_Int32 nPos = nIndex + s_sUNSIGNED.getLength();
|
||||
sal_Int32 nPos = nIndex + strlen(s_sUNSIGNED);
|
||||
OUString sNewUnsigned( sSQL.copy(nPos,nParen - nPos + 1));
|
||||
sSQL = sSQL.replaceAt(nIndex,s_sUNSIGNED.getLength()+sNewUnsigned.getLength(),sNewUnsigned + s_sUNSIGNED);
|
||||
nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + s_sUNSIGNED.getLength()+sNewUnsigned.getLength());
|
||||
sSQL = sSQL.replaceAt(nIndex, strlen(s_sUNSIGNED) + sNewUnsigned.getLength(), sNewUnsigned + s_sUNSIGNED);
|
||||
nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + strlen(s_sUNSIGNED) + sNewUnsigned.getLength());
|
||||
}
|
||||
return sSQL;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ OUString OTables::adjustSQL(const OUString& _sSql)
|
||||
void OTables::createTable( const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
|
||||
static const OUString s_sCreatePattern("(M,D)");
|
||||
static const char s_sCreatePattern[] = "(M,D)";
|
||||
const OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern));
|
||||
Reference< XStatement > xStmt = xConnection->createStatement( );
|
||||
if ( xStmt.is() )
|
||||
|
||||
@@ -119,16 +119,16 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I
|
||||
|
||||
if ( xRes.is() )
|
||||
{
|
||||
static const OUString sSELECT( "SELECT" );
|
||||
static const OUString sINSERT( "INSERT" );
|
||||
static const OUString sUPDATE( "UPDATE" );
|
||||
static const OUString sDELETE( "DELETE" );
|
||||
static const OUString sREAD( "READ" );
|
||||
static const OUString sCREATE( "CREATE" );
|
||||
static const OUString sALTER( "ALTER" );
|
||||
static const OUString sREFERENCE( "REFERENCES" );
|
||||
static const OUString sDROP( "DROP" );
|
||||
static const OUString sYes( "YES" );
|
||||
static const char sSELECT [] = "SELECT";
|
||||
static const char sINSERT [] = "INSERT";
|
||||
static const char sUPDATE [] = "UPDATE";
|
||||
static const char sDELETE [] = "DELETE";
|
||||
static const char sREAD [] = "READ";
|
||||
static const char sCREATE [] = "CREATE";
|
||||
static const char sALTER [] = "ALTER";
|
||||
static const char sREFERENCE[] = "REFERENCES";
|
||||
static const char sDROP [] = "DROP";
|
||||
static const char sYes [] = "YES";
|
||||
|
||||
nRightsWithGrant = nRights = 0;
|
||||
|
||||
|
||||
@@ -76,14 +76,7 @@ namespace pq_sdbc_driver
|
||||
|
||||
OUString DriverGetImplementationName()
|
||||
{
|
||||
static OUString *p;
|
||||
if (! p )
|
||||
{
|
||||
MutexGuard guard( osl::Mutex::getGlobalMutex() );
|
||||
static OUString instance( "org.openoffice.comp.connectivity.pq.Driver.noext" );
|
||||
p = &instance;
|
||||
}
|
||||
return *p;
|
||||
return OUString( "org.openoffice.comp.connectivity.pq.Driver.noext" );
|
||||
}
|
||||
|
||||
Sequence< OUString > DriverGetSupportedServiceNames()
|
||||
|
||||
@@ -262,9 +262,9 @@ namespace
|
||||
{
|
||||
OUString sComposedName;
|
||||
|
||||
static const OUString s_sTableTypeView("VIEW");
|
||||
static const OUString s_sTableTypeTable("TABLE");
|
||||
static const OUString s_sWildcard( "%" );
|
||||
static const char s_sTableTypeView[] = "VIEW";
|
||||
static const char s_sTableTypeTable[] = "TABLE";
|
||||
static const char s_sWildcard[] = "%" ;
|
||||
|
||||
// we want all catalogues, all schemas, all tables
|
||||
Sequence< OUString > sTableTypes(3);
|
||||
|
||||
@@ -78,14 +78,14 @@ using namespace com::sun::star;
|
||||
|
||||
|
||||
|
||||
static OUString MODULEPROP_SHORTNAME ("ooSetupFactoryShortName" );
|
||||
static OUString MODULEPROP_UINAME ("ooSetupFactoryUIName" );
|
||||
static OUString CMDPROP_UINAME ("Name" );
|
||||
static const char MODULEPROP_SHORTNAME [] = "ooSetupFactoryShortName";
|
||||
static const char MODULEPROP_UINAME [] = "ooSetupFactoryUIName";
|
||||
static const char CMDPROP_UINAME [] = "Name";
|
||||
|
||||
static OUString FOLDERNAME_UICONFIG ("Configurations2" );
|
||||
static const char FOLDERNAME_UICONFIG [] = "Configurations2";
|
||||
|
||||
static OUString MEDIATYPE_PROPNAME ("MediaType" );
|
||||
static OUString MEDIATYPE_UICONFIG ("application/vnd.sun.xml.ui.configuration");
|
||||
static const char MEDIATYPE_PROPNAME [] = "MediaType";
|
||||
static const char MEDIATYPE_UICONFIG [] = "application/vnd.sun.xml.ui.configuration";
|
||||
|
||||
|
||||
static const sal_uInt16 KEYCODE_ARRAY[] =
|
||||
@@ -1354,7 +1354,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl)
|
||||
OUString sMediaType;
|
||||
xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType;
|
||||
if (sMediaType.isEmpty())
|
||||
xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG));
|
||||
xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(OUString(MEDIATYPE_UICONFIG)));
|
||||
|
||||
css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( m_xContext );
|
||||
xCfgMgr2->setStorage(xUIConfig);
|
||||
|
||||
@@ -75,14 +75,14 @@ void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference< ::com:
|
||||
m_xDoc = xModel;
|
||||
}
|
||||
|
||||
static OUString CMDURL_SPART (".uno:StyleApply?Style:string=");
|
||||
static OUString CMDURL_FPART2 ("&FamilyName:string=");
|
||||
static const char CMDURL_SPART [] = ".uno:StyleApply?Style:string=";
|
||||
static const char CMDURL_FPART2[] = "&FamilyName:string=";
|
||||
|
||||
static OUString CMDURL_STYLEPROT_ONLY (".uno:StyleApply?");
|
||||
static OUString CMDURL_SPART_ONLY ("Style:string=");
|
||||
static OUString CMDURL_FPART_ONLY ("FamilyName:string=");
|
||||
static const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
|
||||
static const char CMDURL_SPART_ONLY [] = "Style:string=";
|
||||
static const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
|
||||
|
||||
static OUString STYLEPROP_UINAME ("DisplayName");
|
||||
static const char STYLEPROP_UINAME[] = "DisplayName";
|
||||
|
||||
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
|
||||
{
|
||||
@@ -96,9 +96,9 @@ OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUSt
|
||||
|
||||
bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle)
|
||||
{
|
||||
static sal_Int32 LEN_STYLEPROT = CMDURL_STYLEPROT_ONLY.getLength();
|
||||
static sal_Int32 LEN_SPART = CMDURL_SPART_ONLY.getLength();
|
||||
static sal_Int32 LEN_FPART = CMDURL_FPART_ONLY.getLength();
|
||||
static const sal_Int32 LEN_STYLEPROT = strlen(CMDURL_STYLEPROT_ONLY);
|
||||
static const sal_Int32 LEN_SPART = strlen(CMDURL_SPART_ONLY);
|
||||
static const sal_Int32 LEN_FPART = strlen(CMDURL_FPART_ONLY);
|
||||
|
||||
if (!aStyle.sCommand.startsWith(CMDURL_STYLEPROT_ONLY))
|
||||
return false;
|
||||
@@ -205,7 +205,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
|
||||
|
||||
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& sFamily)
|
||||
{
|
||||
static OUString PROP_UINAME ("DisplayName");
|
||||
static const char PROP_UINAME[] = "DisplayName";
|
||||
|
||||
css::uno::Sequence< OUString > lStyleNames;
|
||||
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW);
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
static OUString aVndSunStarUNO( "vnd.sun.star.UNO:" );
|
||||
static OUString aVndSunStarScript( "vnd.sun.star.script:" );
|
||||
static const char aVndSunStarUNO[] = "vnd.sun.star.UNO:";
|
||||
static const char aVndSunStarScript[] = "vnd.sun.star.script:";
|
||||
|
||||
_SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
|
||||
: pAssignPB(NULL)
|
||||
@@ -464,13 +464,11 @@ void IconLBoxString::Paint(
|
||||
OUString aPureMethod;
|
||||
if( bUNO )
|
||||
{
|
||||
sal_Int32 nBegin = aVndSunStarUNO.getLength();
|
||||
aPureMethod = aURL.copy( nBegin );
|
||||
aPureMethod = aURL.copy( strlen(aVndSunStarUNO) );
|
||||
}
|
||||
else
|
||||
{
|
||||
sal_Int32 nBegin = aVndSunStarScript.getLength();
|
||||
aPureMethod = aURL.copy( nBegin );
|
||||
aPureMethod = aURL.copy( strlen(aVndSunStarScript) );
|
||||
aPureMethod = aPureMethod.copy( 0, aPureMethod.indexOf( '?' ) );
|
||||
}
|
||||
|
||||
@@ -868,8 +866,7 @@ AssignComponentDialog::AssignComponentDialog( vcl::Window * pParent, const OUStr
|
||||
OUString aMethodName;
|
||||
if( maURL.startsWith( aVndSunStarUNO ) )
|
||||
{
|
||||
sal_Int32 nBegin = aVndSunStarUNO.getLength();
|
||||
aMethodName = maURL.copy( nBegin );
|
||||
aMethodName = maURL.copy( strlen(aVndSunStarUNO) );
|
||||
}
|
||||
mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
|
||||
}
|
||||
|
||||
@@ -856,7 +856,7 @@ void TPGalleryThemeProperties::FillFilterList()
|
||||
}
|
||||
|
||||
// media filters
|
||||
static const OUString aWildcard( "*." );
|
||||
static const char aWildcard[] = "*.";
|
||||
::avmedia::FilterNameVector aFilters;
|
||||
::avmedia::MediaWindow::getMediaFilters( aFilters );
|
||||
|
||||
|
||||
@@ -37,45 +37,39 @@ namespace offapp
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
|
||||
static const OUString& getConnectionPoolNodeName()
|
||||
static OUString getConnectionPoolNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("org.openoffice.Office.DataAccess/ConnectionPool" );
|
||||
return s_sNodeName;
|
||||
return OUString("org.openoffice.Office.DataAccess/ConnectionPool" );
|
||||
}
|
||||
|
||||
|
||||
static const OUString& getEnablePoolingNodeName()
|
||||
static OUString getEnablePoolingNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("EnablePooling");
|
||||
return s_sNodeName;
|
||||
return OUString("EnablePooling");
|
||||
}
|
||||
|
||||
|
||||
static const OUString& getDriverSettingsNodeName()
|
||||
static OUString getDriverSettingsNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("DriverSettings");
|
||||
return s_sNodeName;
|
||||
return OUString("DriverSettings");
|
||||
}
|
||||
|
||||
|
||||
static const OUString& getDriverNameNodeName()
|
||||
static OUString getDriverNameNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("DriverName");
|
||||
return s_sNodeName;
|
||||
return OUString("DriverName");
|
||||
}
|
||||
|
||||
|
||||
static const OUString& getEnableNodeName()
|
||||
static OUString getEnableNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("Enable");
|
||||
return s_sNodeName;
|
||||
return OUString("Enable");
|
||||
}
|
||||
|
||||
|
||||
static const OUString& getTimeoutNodeName()
|
||||
static OUString getTimeoutNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("Timeout");
|
||||
return s_sNodeName;
|
||||
return OUString("Timeout");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -987,12 +987,11 @@ struct LanguageConfig_Impl
|
||||
static bool bLanguageCurrentDoc_Impl = false;
|
||||
|
||||
// some things we'll need...
|
||||
static const OUString sAccessSrvc("com.sun.star.configuration.ConfigurationAccess");
|
||||
static const OUString sAccessUpdSrvc("com.sun.star.configuration.ConfigurationUpdateAccess");
|
||||
static const OUString sInstalledLocalesPath("org.openoffice.Setup/Office/InstalledLocales");
|
||||
static OUString sUserLocalePath("org.openoffice.Office.Linguistic/General");
|
||||
//static const OUString sUserLocalePath("org.openoffice.Office/Linguistic");
|
||||
static const OUString sUserLocaleKey("UILocale");
|
||||
static const char sAccessSrvc[] = "com.sun.star.configuration.ConfigurationAccess";
|
||||
static const char sAccessUpdSrvc[] = "com.sun.star.configuration.ConfigurationUpdateAccess";
|
||||
static const char sInstalledLocalesPath[] = "org.openoffice.Setup/Office/InstalledLocales";
|
||||
static const char sUserLocalePath[] = "org.openoffice.Office.Linguistic/General";
|
||||
static const char sUserLocaleKey[] = "UILocale";
|
||||
static Sequence< OUString > seqInstalledLanguages;
|
||||
|
||||
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
|
||||
@@ -1059,7 +1058,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
|
||||
Reference< XNameAccess > theNameAccess;
|
||||
|
||||
// find out which locales are currently installed and add them to the listbox
|
||||
theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sInstalledLocalesPath)));
|
||||
theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sInstalledLocalesPath))));
|
||||
theNameAccess = Reference< XNameAccess > (
|
||||
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs ), UNO_QUERY_THROW );
|
||||
seqInstalledLanguages = theNameAccess->getElementNames();
|
||||
@@ -1078,7 +1077,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
|
||||
|
||||
// find out whether the user has a specific locale specified
|
||||
Sequence< Any > theArgs2(1);
|
||||
theArgs2[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sUserLocalePath)));
|
||||
theArgs2[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sUserLocalePath))));
|
||||
theNameAccess = Reference< XNameAccess > (
|
||||
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs2 ), UNO_QUERY_THROW );
|
||||
if (theNameAccess->hasByName(sUserLocaleKey))
|
||||
@@ -1236,7 +1235,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
|
||||
com::sun::star::configuration::theDefaultProvider::get(
|
||||
comphelper::getProcessComponentContext()));
|
||||
Sequence< Any > theArgs(1);
|
||||
theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sUserLocalePath)));
|
||||
theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sUserLocalePath))));
|
||||
Reference< XPropertySet >xProp(
|
||||
theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW );
|
||||
if ( !m_sUserLocaleValue.equals(aLangString))
|
||||
|
||||
@@ -157,9 +157,9 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti
|
||||
|
||||
// set values and column names
|
||||
OUStringBuffer aValues(" VALUES ( ");
|
||||
static OUString aPara("?,");
|
||||
static const char aPara[] = "?,";
|
||||
OUString aQuote = getIdentifierQuoteString();
|
||||
static OUString aComma(",");
|
||||
static const char aComma[] = ",";
|
||||
sal_Int32 i = 1;
|
||||
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rInsertRow->get().begin()+1;
|
||||
connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end();
|
||||
@@ -227,8 +227,8 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
|
||||
|
||||
OUString aColumnName;
|
||||
|
||||
static OUString aPara("?,");
|
||||
static OUString aAnd(" AND ");
|
||||
static const char aPara[] = "?,";
|
||||
static const char aAnd[] = " AND ";
|
||||
|
||||
OUString aQuote = getIdentifierQuoteString();
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto
|
||||
}
|
||||
}
|
||||
|
||||
static const OUString sAll("%");
|
||||
static const char sAll[] = "%";
|
||||
Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
|
||||
Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace
|
||||
{
|
||||
void appendOneKeyColumnClause( const OUString &tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
|
||||
{
|
||||
static const OUString s_sDot(".");
|
||||
static const char s_sDot[] = ".";
|
||||
OUString fullName;
|
||||
if (tblName.isEmpty())
|
||||
fullName = colName;
|
||||
@@ -255,7 +255,7 @@ OUStringBuffer OKeySet::createKeyFilter()
|
||||
{
|
||||
connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aIter = m_aKeyIter->second.first->get().begin();
|
||||
|
||||
static const OUString aAnd(" AND ");
|
||||
static const char aAnd[] = " AND ";
|
||||
const OUString aQuote = getIdentifierQuoteString();
|
||||
OUStringBuffer aFilter;
|
||||
// create the where clause
|
||||
@@ -471,9 +471,9 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
|
||||
|
||||
// list all columns that should be set
|
||||
const OUString aQuote = getIdentifierQuoteString();
|
||||
static OUString aAnd(" AND ");
|
||||
static OUString aOr(" OR ");
|
||||
static OUString aEqual(" = ?");
|
||||
static const char aAnd[] = " AND ";
|
||||
static const char aOr[] = " OR ";
|
||||
static const char aEqual[] = " = ?";
|
||||
|
||||
// use keys for exact positioning
|
||||
Reference<XNameAccess> xKeyColumns = getKeyColumns();
|
||||
@@ -486,7 +486,7 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
|
||||
{
|
||||
aCondition.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + aEqual + aAnd);
|
||||
}
|
||||
aCondition.setLength(aCondition.getLength() - aAnd.getLength());
|
||||
aCondition.setLength(aCondition.getLength() - strlen(aAnd));
|
||||
// sCon is (parenthesised) the condition to locate ONE row
|
||||
// e.g. ( colName1 = ? AND colName2 = ? AND colName3 = ? )
|
||||
const OUString sCon( aCondition.makeStringAndClear() );
|
||||
@@ -728,9 +728,9 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
|
||||
|
||||
// set values and column names
|
||||
OUStringBuffer aValues(" VALUES ( ");
|
||||
static OUString aPara("?,");
|
||||
static const char aPara[] = "?,";
|
||||
OUString aQuote = getIdentifierQuoteString();
|
||||
static OUString aComma(",");
|
||||
static const char aComma[] = ",";
|
||||
|
||||
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
|
||||
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
|
||||
@@ -967,7 +967,7 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
|
||||
|
||||
// list all columns that should be set
|
||||
OUString aQuote = getIdentifierQuoteString();
|
||||
static OUString aAnd(" AND ");
|
||||
static const char aAnd[] = " AND ";
|
||||
|
||||
// use keys and indexes for exact positioning
|
||||
Reference<XNameAccess> xKeyColumns = getKeyColumns();
|
||||
|
||||
@@ -179,7 +179,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
|
||||
if ( m_aJoinedKeyColumns.empty() )
|
||||
throw SQLException();
|
||||
// list all columns that should be set
|
||||
static OUString s_sPara(" = ?");
|
||||
static const char s_sPara[] = " = ?";
|
||||
OUString aQuote = getIdentifierQuoteString();
|
||||
|
||||
::std::map< OUString,bool > aResultSetChanged;
|
||||
@@ -223,8 +223,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
|
||||
if( aKeyConditions.empty() )
|
||||
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
|
||||
|
||||
static const OUString s_sUPDATE("UPDATE ");
|
||||
static const OUString s_sSET(" SET ");
|
||||
static const char s_sUPDATE[] = "UPDATE ";
|
||||
static const char s_sSET[] = " SET ";
|
||||
|
||||
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
|
||||
|
||||
@@ -291,8 +291,8 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
|
||||
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
|
||||
|
||||
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
|
||||
static const OUString s_sINSERT("INSERT INTO ");
|
||||
static const OUString s_sVALUES(") VALUES ( ");
|
||||
static const char s_sINSERT[] = "INSERT INTO ";
|
||||
static const char s_sVALUES[] = ") VALUES ( ";
|
||||
TSQLStatements::iterator aSqlIter = aSql.begin();
|
||||
TSQLStatements::iterator aSqlEnd = aSql.end();
|
||||
for(;aSqlIter != aSqlEnd ; ++aSqlIter)
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace dbaccess
|
||||
try
|
||||
{
|
||||
Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW);
|
||||
static const OUString s_sViewAccess("ViewAccessServiceName");
|
||||
static const char s_sViewAccess[] = "ViewAccessServiceName";
|
||||
m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,s_sViewAccess)),UNO_QUERY);
|
||||
}
|
||||
catch(const Exception& )
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
static OUString sPictures( "Pictures" );
|
||||
static const char sPictures[] = "Pictures";
|
||||
|
||||
// base documents seem to have a different behaviour to other documents, the
|
||||
// root storage contents at least seem to be re-used over different saves, thus if there is a
|
||||
|
||||
@@ -52,22 +52,19 @@ namespace dbaccess
|
||||
using ::com::sun::star::sdb::DatabaseRegistrationEvent;
|
||||
using ::com::sun::star::uno::XAggregation;
|
||||
|
||||
static const OUString& getConfigurationRootPath()
|
||||
static OUString getConfigurationRootPath()
|
||||
{
|
||||
static OUString s_sNodeName("org.openoffice.Office.DataAccess/RegisteredNames");
|
||||
return s_sNodeName;
|
||||
return OUString("org.openoffice.Office.DataAccess/RegisteredNames");
|
||||
}
|
||||
|
||||
const OUString& getLocationNodeName()
|
||||
static OUString getLocationNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("Location");
|
||||
return s_sNodeName;
|
||||
return OUString("Location");
|
||||
}
|
||||
|
||||
const OUString& getNameNodeName()
|
||||
static OUString getNameNodeName()
|
||||
{
|
||||
static OUString s_sNodeName("Name");
|
||||
return s_sNodeName;
|
||||
return OUString("Name");
|
||||
}
|
||||
|
||||
// DatabaseRegistrations - declaration
|
||||
|
||||
@@ -218,7 +218,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
|
||||
bool bNew = sPersistentName.isEmpty();
|
||||
if ( bNew )
|
||||
{
|
||||
const static OUString sBaseName("Obj");
|
||||
static const char sBaseName[] = "Obj";
|
||||
|
||||
sPersistentName = sBaseName;
|
||||
sPersistentName += OUString::number(rDefinitions.size() + 1);
|
||||
|
||||
@@ -1365,7 +1365,7 @@ bool ODocumentDefinition::saveAs()
|
||||
try
|
||||
{
|
||||
Reference< XStorage> xStorage = getContainerStorage();
|
||||
const static OUString sBaseName("Obj");
|
||||
static const char sBaseName[] = "Obj";
|
||||
|
||||
OUString sPersistentName = ::dbtools::createUniqueName(xStorage,sBaseName);
|
||||
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
|
||||
|
||||
@@ -293,7 +293,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::cre
|
||||
osl::MutexGuard g(m_aMutex);
|
||||
uno::Reference< chart2::data::XDataSequence > xData = m_xInternal->createDataSequenceByRangeRepresentation(_sRangeRepresentation);
|
||||
uno::Reference<beans::XPropertySet> xProp(xData,uno::UNO_QUERY);
|
||||
const static OUString s_sNumberFormatKey("NumberFormatKey");
|
||||
static const char s_sNumberFormatKey[] = "NumberFormatKey";
|
||||
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(s_sNumberFormatKey) )
|
||||
{
|
||||
xProp->setPropertyValue(s_sNumberFormatKey,impl_getNumberFormatKey_nothrow(_sRangeRepresentation));
|
||||
|
||||
@@ -298,17 +298,17 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL ) const
|
||||
OUString ODsnTypeCollection::getEmbeddedDatabase() const
|
||||
{
|
||||
OUString sEmbeddedDatabaseURL;
|
||||
static const OUString s_sNodeName("org.openoffice.Office.DataAccess"); ///Installed
|
||||
static const char s_sNodeName[] = "org.openoffice.Office.DataAccess"; ///Installed
|
||||
const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
|
||||
if ( aInstalled.isValid() )
|
||||
{
|
||||
if ( aInstalled.hasByName("EmbeddedDatabases/DefaultEmbeddedDatabase/Value") )
|
||||
{
|
||||
static const OUString s_sValue("EmbeddedDatabases/DefaultEmbeddedDatabase/Value");
|
||||
static const char s_sValue[] = "EmbeddedDatabases/DefaultEmbeddedDatabase/Value";
|
||||
|
||||
aInstalled.getNodeValue(s_sValue) >>= sEmbeddedDatabaseURL;
|
||||
if ( !sEmbeddedDatabaseURL.isEmpty() )
|
||||
aInstalled.getNodeValue(s_sValue + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
|
||||
aInstalled.getNodeValue(OUString(s_sValue) + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
|
||||
}
|
||||
}
|
||||
if ( sEmbeddedDatabaseURL.isEmpty() )
|
||||
|
||||
@@ -106,23 +106,9 @@ namespace dbaccess
|
||||
return true;
|
||||
}
|
||||
|
||||
static const OUString& lcl_getRecoveryDataSubStorageName()
|
||||
{
|
||||
static const OUString s_sRecDataStorName( "recovery" );
|
||||
return s_sRecDataStorName;
|
||||
}
|
||||
static const char sRecoveryDataSubStorageName[] = "recovery";
|
||||
|
||||
static const OUString& lcl_getObjectMapStreamName()
|
||||
{
|
||||
static const OUString s_sObjectMapStreamName( "storage-component-map.ini" );
|
||||
return s_sObjectMapStreamName;
|
||||
}
|
||||
|
||||
static const OUString& lcl_getMapStreamEncodingName()
|
||||
{
|
||||
static const OUString s_sMapStreamEncodingName( "UTF-8" );
|
||||
return s_sMapStreamEncodingName;
|
||||
}
|
||||
static const char sObjectMapStreamName[] = "storage-component-map.ini";
|
||||
|
||||
static void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
|
||||
const MapStringToCompDesc& i_mapStorageToCompDesc )
|
||||
@@ -131,7 +117,7 @@ namespace dbaccess
|
||||
// nothing to do
|
||||
return;
|
||||
|
||||
StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, lcl_getObjectMapStreamName() );
|
||||
StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, sObjectMapStreamName );
|
||||
|
||||
aTextOutput.writeLine( "[storages]" );
|
||||
|
||||
@@ -171,17 +157,17 @@ namespace dbaccess
|
||||
MapStringToCompDesc& o_mapStorageToObjectName )
|
||||
{
|
||||
ENSURE_OR_THROW( i_rStorage.is(), "invalid storage" );
|
||||
if ( !i_rStorage->hasByName( lcl_getObjectMapStreamName() ) )
|
||||
if ( !i_rStorage->hasByName( sObjectMapStreamName ) )
|
||||
{ // nothing to do, though suspicious
|
||||
OSL_FAIL( "lcl_readObjectMap_throw: if there's no map file, then there's expected to be no storage, too!" );
|
||||
return;
|
||||
}
|
||||
|
||||
Reference< XStream > xIniStream( i_rStorage->openStreamElement(
|
||||
lcl_getObjectMapStreamName(), ElementModes::READ ), UNO_SET_THROW );
|
||||
sObjectMapStreamName, ElementModes::READ ), UNO_SET_THROW );
|
||||
|
||||
Reference< XTextInputStream2 > xTextInput = TextInputStream::create( i_rxContext );
|
||||
xTextInput->setEncoding( lcl_getMapStreamEncodingName() );
|
||||
xTextInput->setEncoding( "UTF-8" );
|
||||
xTextInput->setInputStream( xIniStream->getInputStream() );
|
||||
|
||||
OUString sCurrentSection;
|
||||
@@ -258,9 +244,9 @@ namespace dbaccess
|
||||
ENSURE_OR_THROW( i_rTargetStorage.is(), "invalid document storage" );
|
||||
|
||||
// create a sub storage for recovery data
|
||||
if ( i_rTargetStorage->hasByName( lcl_getRecoveryDataSubStorageName() ) )
|
||||
i_rTargetStorage->removeElement( lcl_getRecoveryDataSubStorageName() );
|
||||
Reference< XStorage > xRecoveryStorage = i_rTargetStorage->openStorageElement( lcl_getRecoveryDataSubStorageName(), ElementModes::READWRITE );
|
||||
if ( i_rTargetStorage->hasByName( sRecoveryDataSubStorageName ) )
|
||||
i_rTargetStorage->removeElement( sRecoveryDataSubStorageName );
|
||||
Reference< XStorage > xRecoveryStorage = i_rTargetStorage->openStorageElement( sRecoveryDataSubStorageName, ElementModes::READWRITE );
|
||||
|
||||
// store recovery data for open sub components of the given controller(s)
|
||||
if ( !i_rControllers.empty() )
|
||||
@@ -312,12 +298,12 @@ namespace dbaccess
|
||||
ENSURE_OR_THROW( i_rDocumentStorage.is(), "illegal document storage" );
|
||||
Reference< XDatabaseDocumentUI > xDocumentUI( i_rTargetController, UNO_QUERY_THROW );
|
||||
|
||||
if ( !i_rDocumentStorage->hasByName( lcl_getRecoveryDataSubStorageName() ) )
|
||||
if ( !i_rDocumentStorage->hasByName( sRecoveryDataSubStorageName ) )
|
||||
// that's allowed
|
||||
return;
|
||||
|
||||
// the "recovery" sub storage
|
||||
Reference< XStorage > xRecoveryStorage = i_rDocumentStorage->openStorageElement( lcl_getRecoveryDataSubStorageName(), ElementModes::READ );
|
||||
Reference< XStorage > xRecoveryStorage = i_rDocumentStorage->openStorageElement( sRecoveryDataSubStorageName, ElementModes::READ );
|
||||
|
||||
// read the map from sub storages to object names
|
||||
MapCompTypeToCompDescs aMapCompDescs;
|
||||
@@ -385,7 +371,7 @@ namespace dbaccess
|
||||
// now that we successfully recovered, removed the "recovery" sub storage
|
||||
try
|
||||
{
|
||||
i_rDocumentStorage->removeElement( lcl_getRecoveryDataSubStorageName() );
|
||||
i_rDocumentStorage->removeElement( sRecoveryDataSubStorageName );
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
||||
@@ -49,21 +49,7 @@ namespace dbaccess
|
||||
Reference< XTextOutputStream2 > xTextOutput;
|
||||
};
|
||||
|
||||
// helper
|
||||
namespace
|
||||
{
|
||||
static const OUString& lcl_getTextStreamEncodingName()
|
||||
{
|
||||
static const OUString s_sMapStreamEncodingName( "UTF-8" );
|
||||
return s_sMapStreamEncodingName;
|
||||
}
|
||||
|
||||
static const OUString& lcl_getLineFeed()
|
||||
{
|
||||
static const OUString s_sLineFeed( '\n' );
|
||||
return s_sLineFeed;
|
||||
}
|
||||
}
|
||||
static const char sLineFeed[] = "\n";
|
||||
|
||||
// StorageTextOutputStream
|
||||
StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext,
|
||||
@@ -74,7 +60,7 @@ namespace dbaccess
|
||||
,m_pData( new StorageTextOutputStream_Data )
|
||||
{
|
||||
m_pData->xTextOutput = TextOutputStream::create( i_rContext );
|
||||
m_pData->xTextOutput->setEncoding( lcl_getTextStreamEncodingName() );
|
||||
m_pData->xTextOutput->setEncoding( "UTF-8" );
|
||||
m_pData->xTextOutput->setOutputStream( getOutputStream() );
|
||||
}
|
||||
|
||||
@@ -85,12 +71,12 @@ namespace dbaccess
|
||||
void StorageTextOutputStream::writeLine( const OUString& i_rLine )
|
||||
{
|
||||
m_pData->xTextOutput->writeString( i_rLine );
|
||||
m_pData->xTextOutput->writeString( lcl_getLineFeed() );
|
||||
m_pData->xTextOutput->writeString( sLineFeed );
|
||||
}
|
||||
|
||||
void StorageTextOutputStream::writeLine()
|
||||
{
|
||||
m_pData->xTextOutput->writeString( lcl_getLineFeed() );
|
||||
m_pData->xTextOutput->writeString( sLineFeed );
|
||||
}
|
||||
|
||||
} // namespace dbaccess
|
||||
|
||||
@@ -81,30 +81,24 @@ namespace dbaccess
|
||||
// helper
|
||||
namespace
|
||||
{
|
||||
static const OUString& lcl_getComponentStorageBaseName( const SubComponentType i_eType )
|
||||
static OUString lcl_getComponentStorageBaseName( const SubComponentType i_eType )
|
||||
{
|
||||
static const OUString s_sFormBaseName( "form" );
|
||||
static const OUString s_sReportBaseName( "report" );
|
||||
static const OUString s_sTableBaseName( "table" );
|
||||
static const OUString s_sQueryBaseName( "query" );
|
||||
|
||||
switch ( i_eType )
|
||||
{
|
||||
case FORM:
|
||||
return s_sFormBaseName;
|
||||
return OUString("form");
|
||||
case REPORT:
|
||||
return s_sReportBaseName;
|
||||
return OUString("report");
|
||||
case TABLE:
|
||||
return s_sTableBaseName;
|
||||
return OUString("table");
|
||||
case QUERY:
|
||||
return s_sQueryBaseName;
|
||||
return OUString("query");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
OSL_FAIL( "lcl_getComponentStorageBaseName: unimplemented case!" );
|
||||
static const OUString s_sFallback;
|
||||
return s_sFallback;
|
||||
return OUString();
|
||||
}
|
||||
|
||||
static SubComponentType lcl_databaseObjectToSubComponentType( const sal_Int32 i_nObjectType )
|
||||
@@ -166,17 +160,8 @@ namespace dbaccess
|
||||
return xCommandProcessor;
|
||||
}
|
||||
|
||||
static const OUString& lcl_getSettingsStreamName()
|
||||
{
|
||||
static const OUString s_sStatementStreamName( "settings.xml" );
|
||||
return s_sStatementStreamName;
|
||||
}
|
||||
|
||||
static const OUString& lcl_getCurrentQueryDesignName()
|
||||
{
|
||||
static const OUString s_sQuerySettingsName( "ooo:current-query-design" );
|
||||
return s_sQuerySettingsName;
|
||||
}
|
||||
static const char sSettingsStreamName[] = "settings.xml";
|
||||
static const char sCurrentQueryDesignName[] = "ooo:current-query-design";
|
||||
}
|
||||
|
||||
// SettingsExportContext
|
||||
@@ -362,31 +347,24 @@ namespace dbaccess
|
||||
// SubComponentRecovery
|
||||
const OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType )
|
||||
{
|
||||
static const OUString s_sFormsStorageName( "forms" );
|
||||
static const OUString s_sReportsStorageName( "reports" );
|
||||
static const OUString s_sTablesStorageName( "tables" );
|
||||
static const OUString s_sQueriesStorageName( "queries" );
|
||||
static const OUString s_sRelationsStorageName( "relations" );
|
||||
|
||||
switch ( i_eType )
|
||||
{
|
||||
case FORM:
|
||||
return s_sFormsStorageName;
|
||||
return OUString("forms");
|
||||
case REPORT:
|
||||
return s_sReportsStorageName;
|
||||
return OUString("reports");
|
||||
case TABLE:
|
||||
return s_sTablesStorageName;
|
||||
return OUString("tables");
|
||||
case QUERY:
|
||||
return s_sQueriesStorageName;
|
||||
return OUString("queries");
|
||||
case RELATION_DESIGN:
|
||||
return s_sRelationsStorageName;
|
||||
return OUString("relations");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
OSL_FAIL( "SubComponentRecovery::getComponentsStorageName: unimplemented case!" );
|
||||
static const OUString s_sFallback;
|
||||
return s_sFallback;
|
||||
return OUString();
|
||||
}
|
||||
|
||||
void SubComponentRecovery::saveToRecoveryStorage( const Reference< XStorage >& i_rRecoveryStorage,
|
||||
@@ -498,7 +476,7 @@ namespace dbaccess
|
||||
OSL_VERIFY( xDesignerProps->getPropertyValue( "CurrentQueryDesign" ) >>= aCurrentQueryDesign );
|
||||
|
||||
// write the query design
|
||||
StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, lcl_getSettingsStreamName() );
|
||||
StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, sSettingsStreamName );
|
||||
SettingsExportContext aSettingsExportContext( m_rContext, aDesignOutput );
|
||||
|
||||
const OUString sWhitespace( " " );
|
||||
@@ -507,7 +485,7 @@ namespace dbaccess
|
||||
aDesignOutput.ignorableWhitespace( sWhitespace );
|
||||
|
||||
XMLSettingsExportHelper aSettingsExporter( aSettingsExportContext );
|
||||
aSettingsExporter.exportAllSettings( aCurrentQueryDesign, lcl_getCurrentQueryDesignName() );
|
||||
aSettingsExporter.exportAllSettings( aCurrentQueryDesign, sCurrentQueryDesignName );
|
||||
|
||||
aDesignOutput.ignorableWhitespace( sWhitespace );
|
||||
aDesignOutput.endElement();
|
||||
@@ -579,13 +557,13 @@ namespace dbaccess
|
||||
Reference< XComponent > xSubComponent;
|
||||
|
||||
// first read the settings query design settings from the storage
|
||||
StorageXMLInputStream aDesignInput( m_rContext, i_rRecoveryStorage, lcl_getSettingsStreamName() );
|
||||
StorageXMLInputStream aDesignInput( m_rContext, i_rRecoveryStorage, sSettingsStreamName );
|
||||
|
||||
::rtl::Reference< SettingsDocumentHandler > pDocHandler( new SettingsDocumentHandler );
|
||||
aDesignInput.import( pDocHandler.get() );
|
||||
|
||||
const ::comphelper::NamedValueCollection& rSettings( pDocHandler->getSettings() );
|
||||
const Any aCurrentQueryDesign = rSettings.get( lcl_getCurrentQueryDesignName() );
|
||||
const Any aCurrentQueryDesign = rSettings.get( sCurrentQueryDesignName );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
Sequence< PropertyValue > aQueryDesignLayout;
|
||||
OSL_VERIFY( aCurrentQueryDesign >>= aQueryDesignLayout );
|
||||
|
||||
@@ -168,32 +168,22 @@ namespace dbmm
|
||||
|
||||
namespace
|
||||
{
|
||||
static const OUString& lcl_getScriptsStorageName()
|
||||
{
|
||||
static const OUString s_sScriptsStorageName( "Scripts" );
|
||||
return s_sScriptsStorageName;
|
||||
}
|
||||
static const char sScriptsStorageName[] = "Scripts";
|
||||
|
||||
static const OUString& lcl_getScriptsSubStorageName( const ScriptType _eType )
|
||||
static OUString lcl_getScriptsSubStorageName( const ScriptType _eType )
|
||||
{
|
||||
static const OUString s_sBeanShell ( "beanshell" );
|
||||
static const OUString s_sJavaScript( "javascript" );
|
||||
static const OUString s_sPython ( "python" ); // TODO: is this correct?
|
||||
static const OUString s_sJava ( "java" );
|
||||
|
||||
switch ( _eType )
|
||||
{
|
||||
case eBeanShell: return s_sBeanShell;
|
||||
case eJavaScript: return s_sJavaScript;
|
||||
case ePython: return s_sPython;
|
||||
case eJava: return s_sJava;
|
||||
case eBeanShell: return OUString("beanshell");
|
||||
case eJavaScript: return OUString("javascript");
|
||||
case ePython: return OUString("python"); // TODO: is this correct?
|
||||
case eJava: return OUString("java");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
OSL_FAIL( "lcl_getScriptsSubStorageName: illegal type!" );
|
||||
static OUString s_sEmpty;
|
||||
return s_sEmpty;
|
||||
return OUString();
|
||||
}
|
||||
|
||||
static bool lcl_getScriptTypeFromLanguage( const OUString& _rLanguage, ScriptType& _out_rScriptType )
|
||||
@@ -650,15 +640,15 @@ namespace dbmm
|
||||
|
||||
// the "Scripts" storage exist, or if it does not (yet) exist and we are in write mode
|
||||
// => open the storage
|
||||
if ( ( xDocStorage->hasByName( lcl_getScriptsStorageName() )
|
||||
&& xDocStorage->isStorageElement( lcl_getScriptsStorageName() )
|
||||
if ( ( xDocStorage->hasByName( sScriptsStorageName )
|
||||
&& xDocStorage->isStorageElement( sScriptsStorageName )
|
||||
)
|
||||
|| !xDocStorage->hasByName( lcl_getScriptsStorageName() )
|
||||
|| !xDocStorage->hasByName( sScriptsStorageName )
|
||||
)
|
||||
{
|
||||
m_xScriptsStorage.set(
|
||||
xDocStorage->openStorageElement(
|
||||
lcl_getScriptsStorageName(), ElementModes::READWRITE
|
||||
sScriptsStorageName, ElementModes::READWRITE
|
||||
),
|
||||
UNO_QUERY_THROW
|
||||
);
|
||||
@@ -725,7 +715,7 @@ namespace dbmm
|
||||
{
|
||||
Reference< XStorageBasedDocument > xStorageDoc( _rxDocument, UNO_QUERY_THROW );
|
||||
Reference< XStorage > xDocStorage( xStorageDoc->getDocumentStorage(), UNO_QUERY_THROW );
|
||||
xDocStorage->removeElement( lcl_getScriptsStorageName() );
|
||||
xDocStorage->removeElement( sScriptsStorageName );
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
||||
@@ -138,35 +138,29 @@ namespace dbaxml
|
||||
{
|
||||
// possible types we can write (either because we recognize them directly or because we convert _rValue
|
||||
// into one of these types)
|
||||
static const OUString s_sTypeBoolean ("boolean");
|
||||
static const OUString s_sTypeShort ("short");
|
||||
static const OUString s_sTypeInteger ("int");
|
||||
static const OUString s_sTypeLong ("long");
|
||||
static const OUString s_sTypeDouble ("double");
|
||||
static const OUString s_sTypeString ("string");
|
||||
|
||||
// handle the type description
|
||||
switch (_rType.getTypeClass())
|
||||
{
|
||||
case TypeClass_STRING:
|
||||
return s_sTypeString;
|
||||
return OUString("string");
|
||||
case TypeClass_DOUBLE:
|
||||
return s_sTypeDouble;
|
||||
return OUString("double");
|
||||
case TypeClass_BOOLEAN:
|
||||
return s_sTypeBoolean;
|
||||
return OUString("boolean");
|
||||
case TypeClass_BYTE:
|
||||
case TypeClass_SHORT:
|
||||
return s_sTypeShort;
|
||||
return OUString("short");
|
||||
case TypeClass_LONG:
|
||||
return s_sTypeInteger;
|
||||
return OUString("int");
|
||||
case TypeClass_HYPER:
|
||||
return s_sTypeLong;
|
||||
return OUString("long");
|
||||
case TypeClass_ENUM:
|
||||
return s_sTypeInteger;
|
||||
return OUString("int");
|
||||
|
||||
default:
|
||||
OSL_FAIL( "lcl_implGetPropertyXMLType: unsupported value type!" );
|
||||
return s_sTypeDouble;
|
||||
return OUString("double");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user