loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
ccfd8e9d09
commit
042033f1e6
@ -478,7 +478,7 @@ bool EmbedMedia(uno::Reference<frame::XModel> const& xModel,
|
||||
}
|
||||
|
||||
bool CreateMediaTempFile(uno::Reference<io::XInputStream> const& xInStream,
|
||||
OUString& o_rTempFileURL, const OUString& rDesiredExtension)
|
||||
OUString& o_rTempFileURL, std::u16string_view rDesiredExtension)
|
||||
{
|
||||
OUString tempFileURL;
|
||||
::osl::FileBase::RC const err =
|
||||
@ -489,7 +489,7 @@ bool CreateMediaTempFile(uno::Reference<io::XInputStream> const& xInStream,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!rDesiredExtension.isEmpty())
|
||||
if (!rDesiredExtension.empty())
|
||||
{
|
||||
OUString newTempFileURL = tempFileURL + rDesiredExtension;
|
||||
if (osl::File::move(tempFileURL, newTempFileURL) != osl::FileBase::E_None)
|
||||
|
@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> BasctlDialogsTest::createDialogByID(sal_uInt32 /*nID*/
|
||||
void BasctlDialogsTest::openAnyDialog()
|
||||
{
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("basctl/qa/unit/data/basctl-dialogs-test.txt");
|
||||
processDialogBatchFile(u"basctl/qa/unit/data/basctl-dialogs-test.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(BasctlDialogsTest);
|
||||
|
@ -429,9 +429,9 @@ bool SbTreeListBox::FindRootEntry( const ScriptDocument& rDocument, LibraryLocat
|
||||
return false;
|
||||
}
|
||||
|
||||
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName )
|
||||
OUString CreateMgrAndLibStr( std::u16string_view rMgrName, std::u16string_view rLibName )
|
||||
{
|
||||
return "[" + rMgrName + "]." + rLibName;
|
||||
return OUString::Concat("[") + rMgrName + "]." + rLibName;
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,10 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <strings.hrc>
|
||||
#include <helpids.h>
|
||||
#include <iderid.hxx>
|
||||
@ -692,36 +696,36 @@ LibInfo::Item::Item (
|
||||
m_eCurrentType(eCurrentType)
|
||||
{ }
|
||||
|
||||
static bool QueryDel(const OUString& rName, const OUString &rStr, weld::Widget* pParent)
|
||||
static bool QueryDel(std::u16string_view rName, const OUString &rStr, weld::Widget* pParent)
|
||||
{
|
||||
OUString aName = "\'" + rName + "\'";
|
||||
OUString aName = OUString::Concat("\'") + rName + "\'";
|
||||
OUString aQuery = rStr.replaceAll("XX", aName);
|
||||
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pParent,
|
||||
VclMessageType::Question, VclButtonsType::YesNo, aQuery));
|
||||
return (xQueryBox->run() == RET_YES);
|
||||
}
|
||||
|
||||
bool QueryDelMacro( const OUString& rName, weld::Widget* pParent )
|
||||
bool QueryDelMacro( std::u16string_view rName, weld::Widget* pParent )
|
||||
{
|
||||
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
|
||||
}
|
||||
|
||||
bool QueryReplaceMacro( const OUString& rName, weld::Widget* pParent )
|
||||
bool QueryReplaceMacro( std::u16string_view rName, weld::Widget* pParent )
|
||||
{
|
||||
return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
|
||||
}
|
||||
|
||||
bool QueryDelDialog( const OUString& rName, weld::Widget* pParent )
|
||||
bool QueryDelDialog( std::u16string_view rName, weld::Widget* pParent )
|
||||
{
|
||||
return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
|
||||
}
|
||||
|
||||
bool QueryDelLib( const OUString& rName, bool bRef, weld::Widget* pParent )
|
||||
bool QueryDelLib( std::u16string_view rName, bool bRef, weld::Widget* pParent )
|
||||
{
|
||||
return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent );
|
||||
}
|
||||
|
||||
bool QueryDelModule( const OUString& rName, weld::Widget* pParent )
|
||||
bool QueryDelModule( std::u16string_view rName, weld::Widget* pParent )
|
||||
{
|
||||
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
|
||||
}
|
||||
|
@ -17,6 +17,10 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <localizationmgr.hxx>
|
||||
|
||||
#include <basidesh.hxx>
|
||||
@ -146,7 +150,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
|
||||
Any aDialogCtrl;
|
||||
aDialogCtrl <<= xDialog;
|
||||
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
|
||||
OUString(), m_xStringResourceManager, xDummyStringResolver, eMode );
|
||||
std::u16string_view(), m_xStringResourceManager, xDummyStringResolver, eMode );
|
||||
|
||||
// Handle all controls
|
||||
Sequence< OUString > aNames = xDialog->getElementNames();
|
||||
@ -166,7 +170,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
|
||||
|
||||
|
||||
static OUString implCreatePureResourceId
|
||||
( const OUString& aDialogName, const OUString& aCtrlName,
|
||||
( std::u16string_view aDialogName, std::u16string_view aCtrlName,
|
||||
const OUString& aPropName,
|
||||
const Reference< XStringResourceManager >& xStringResourceManager )
|
||||
{
|
||||
@ -175,7 +179,7 @@ static OUString implCreatePureResourceId
|
||||
+ aDot
|
||||
+ aDialogName
|
||||
+ aDot;
|
||||
if( !aCtrlName.isEmpty() )
|
||||
if( !aCtrlName.empty() )
|
||||
{
|
||||
aPureIdStr += aCtrlName + aDot;
|
||||
}
|
||||
@ -187,7 +191,7 @@ static OUString implCreatePureResourceId
|
||||
// anyway only one language should exist when calling this method then,
|
||||
// either the first one for mode SET_IDS or the last one for mode RESET_IDS
|
||||
sal_Int32 LocalizationMgr::implHandleControlResourceProperties
|
||||
(const Any& rControlAny, const OUString& aDialogName, const OUString& aCtrlName,
|
||||
(const Any& rControlAny, std::u16string_view aDialogName, std::u16string_view aCtrlName,
|
||||
const Reference< XStringResourceManager >& xStringResourceManager,
|
||||
const Reference< XStringResourceResolver >& xSourceStringResolver, HandleResourceMode eMode )
|
||||
{
|
||||
@ -791,7 +795,7 @@ static DialogWindow* FindDialogWindowForEditor( DlgEditor const * pEditor )
|
||||
|
||||
|
||||
void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor const * pEditor,
|
||||
const Any& rControlAny, const OUString& aCtrlName )
|
||||
const Any& rControlAny, std::u16string_view aCtrlName )
|
||||
{
|
||||
// Get library for DlgEditor
|
||||
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
|
||||
@ -821,7 +825,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor const *
|
||||
}
|
||||
|
||||
void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor const * pEditor,
|
||||
const css::uno::Any& rControlAny, const OUString& aNewCtrlName )
|
||||
const css::uno::Any& rControlAny, std::u16string_view aNewCtrlName )
|
||||
{
|
||||
// Get library for DlgEditor
|
||||
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
|
||||
@ -849,7 +853,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor const *
|
||||
|
||||
|
||||
void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor const * pEditor,
|
||||
const Any& rControlAny, const OUString& aCtrlName )
|
||||
const Any& rControlAny, std::u16string_view aCtrlName )
|
||||
{
|
||||
// Get library for DlgEditor
|
||||
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
|
||||
@ -875,7 +879,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor
|
||||
}
|
||||
|
||||
void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName,
|
||||
const OUString& aDlgName, const Reference< container::XNameContainer >& xDialogModel )
|
||||
std::u16string_view aDlgName, const Reference< container::XNameContainer >& xDialogModel )
|
||||
{
|
||||
// Get library
|
||||
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
|
||||
@ -894,7 +898,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
|
||||
aDialogCtrl <<= xDialogModel;
|
||||
Reference< XStringResourceResolver > xDummyStringResolver;
|
||||
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
|
||||
OUString(), xStringResourceManager,
|
||||
std::u16string_view(), xStringResourceManager,
|
||||
xDummyStringResolver, SET_IDS );
|
||||
}
|
||||
|
||||
@ -903,7 +907,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
|
||||
}
|
||||
|
||||
void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName,
|
||||
const OUString& aDlgName, const Reference< container::XNameContainer >& xDialogModel )
|
||||
std::u16string_view aDlgName, const Reference< container::XNameContainer >& xDialogModel )
|
||||
{
|
||||
// Get library
|
||||
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
|
||||
@ -916,7 +920,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
|
||||
aDialogCtrl <<= xDialogModel;
|
||||
Reference< XStringResourceResolver > xDummyStringResolver;
|
||||
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
|
||||
OUString(), xStringResourceManager,
|
||||
std::u16string_view(), xStringResourceManager,
|
||||
xDummyStringResolver, RENAME_DIALOG_IDS );
|
||||
|
||||
// Handle all controls
|
||||
@ -934,7 +938,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
|
||||
}
|
||||
|
||||
void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName,
|
||||
const OUString& aDlgName, const Reference< container::XNameContainer >& xDialogModel )
|
||||
std::u16string_view aDlgName, const Reference< container::XNameContainer >& xDialogModel )
|
||||
{
|
||||
// Get library
|
||||
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
|
||||
@ -947,7 +951,7 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument,
|
||||
aDialogCtrl <<= xDialogModel;
|
||||
Reference< XStringResourceResolver > xDummyStringResolver;
|
||||
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
|
||||
OUString(), xStringResourceManager,
|
||||
std::u16string_view(), xStringResourceManager,
|
||||
xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE );
|
||||
|
||||
// Handle all controls
|
||||
@ -1019,7 +1023,7 @@ void LocalizationMgr::setResourceIDsForDialog( const Reference< container::XName
|
||||
}
|
||||
|
||||
void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor const * pEditor,
|
||||
const Any& rControlAny, const OUString& aCtrlName,
|
||||
const Any& rControlAny, std::u16string_view aCtrlName,
|
||||
const Reference< XStringResourceResolver >& xSourceStringResolver )
|
||||
{
|
||||
// Get library for DlgEditor
|
||||
@ -1046,7 +1050,8 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor const * pEdi
|
||||
}
|
||||
|
||||
void LocalizationMgr::copyResourceForDroppedDialog( const Reference< container::XNameContainer >& xDialogModel,
|
||||
const OUString& aDialogName, const Reference< XStringResourceManager >& xStringResourceManager,
|
||||
std::u16string_view aDialogName,
|
||||
const Reference< XStringResourceManager >& xStringResourceManager,
|
||||
const Reference< XStringResourceResolver >& xSourceStringResolver )
|
||||
{
|
||||
if( !xStringResourceManager.is() )
|
||||
@ -1056,7 +1061,7 @@ void LocalizationMgr::copyResourceForDroppedDialog( const Reference< container::
|
||||
Any aDialogCtrl;
|
||||
aDialogCtrl <<= xDialogModel;
|
||||
implHandleControlResourceProperties( aDialogCtrl, aDialogName,
|
||||
OUString(), xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
|
||||
std::u16string_view(), xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
|
||||
|
||||
// Handle all controls
|
||||
Sequence< OUString > aNames = xDialogModel->getElementNames();
|
||||
|
@ -133,7 +133,7 @@ void Shell::CopyDialogResources(
|
||||
OUString const& rSourceLibName,
|
||||
ScriptDocument const& rDestDoc,
|
||||
OUString const& rDestLibName,
|
||||
OUString const& rDlgName
|
||||
std::u16string_view rDlgName
|
||||
)
|
||||
{
|
||||
if ( !io_xISP.is() )
|
||||
@ -906,7 +906,7 @@ LibDialog::~LibDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void LibDialog::SetStorageName( const OUString& rName )
|
||||
void LibDialog::SetStorageName( std::u16string_view rName )
|
||||
{
|
||||
OUString aName = IDEResId(RID_STR_FILENAME) + rName;
|
||||
m_xStorageFrame->set_label(aName);
|
||||
|
@ -19,6 +19,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <bastype2.hxx>
|
||||
#include <tools/solar.h>
|
||||
#include <vcl/weld.hxx>
|
||||
@ -94,7 +98,7 @@ public:
|
||||
explicit LibDialog(weld::Window* pParent);
|
||||
virtual ~LibDialog() override;
|
||||
|
||||
void SetStorageName( const OUString& rName );
|
||||
void SetStorageName( std::u16string_view rName );
|
||||
|
||||
weld::TreeView& GetLibBox() { return *m_xLibBox; }
|
||||
bool IsReference() const { return m_xReferenceBox->get_active(); }
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <vcl/scrbar.hxx>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
class SfxViewFactory;
|
||||
class SdrView;
|
||||
@ -197,7 +198,7 @@ public:
|
||||
static void CopyDialogResources(
|
||||
css::uno::Reference< css::io::XInputStreamProvider >& io_xISP,
|
||||
const ScriptDocument& rSourceDoc, const OUString& rSourceLibName, const ScriptDocument& rDestDoc,
|
||||
const OUString& rDestLibName, const OUString& rDlgName );
|
||||
const OUString& rDestLibName, std::u16string_view rDlgName );
|
||||
|
||||
static void InvalidateControlSlots();
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <vcl/dockwin.hxx>
|
||||
#include <vcl/weld.hxx>
|
||||
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
|
||||
class SbModule;
|
||||
@ -288,14 +289,14 @@ private:
|
||||
};
|
||||
|
||||
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines );
|
||||
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName );
|
||||
OUString CreateMgrAndLibStr( std::u16string_view rMgrName, std::u16string_view rLibName );
|
||||
sal_uInt32 CalcLineCount( SvStream& rStream );
|
||||
|
||||
bool QueryReplaceMacro( const OUString& rName, weld::Widget* pParent );
|
||||
bool QueryDelMacro( const OUString& rName, weld::Widget* pParent );
|
||||
bool QueryDelDialog( const OUString& rName, weld::Widget* pParent );
|
||||
bool QueryDelModule( const OUString& rName, weld::Widget* pParent );
|
||||
bool QueryDelLib( const OUString& rName, bool bRef, weld::Widget* pParent );
|
||||
bool QueryReplaceMacro( std::u16string_view rName, weld::Widget* pParent );
|
||||
bool QueryDelMacro( std::u16string_view rName, weld::Widget* pParent );
|
||||
bool QueryDelDialog( std::u16string_view rName, weld::Widget* pParent );
|
||||
bool QueryDelModule( std::u16string_view rName, weld::Widget* pParent );
|
||||
bool QueryDelLib( std::u16string_view rName, bool bRef, weld::Widget* pParent );
|
||||
bool QueryPassword(weld::Widget* pDialogParent, const css::uno::Reference< css::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false);
|
||||
|
||||
class ModuleInfoHelper
|
||||
|
@ -19,6 +19,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "scriptdocument.hxx"
|
||||
|
||||
#include <com/sun/star/resource/XStringResourceManager.hpp>
|
||||
@ -51,8 +55,8 @@ class LocalizationMgr
|
||||
COPY_RESOURCES
|
||||
};
|
||||
static sal_Int32 implHandleControlResourceProperties(const css::uno::Any& rControlAny,
|
||||
const OUString& aDialogName,
|
||||
const OUString& aCtrlName,
|
||||
std::u16string_view aDialogName,
|
||||
std::u16string_view aCtrlName,
|
||||
const css::uno::Reference< css::resource::XStringResourceManager >& xStringResourceManager,
|
||||
const css::uno::Reference< css::resource::XStringResourceResolver >& xSourceStringResolver,
|
||||
HandleResourceMode eMode );
|
||||
@ -95,21 +99,21 @@ public:
|
||||
void handleBasicStopped();
|
||||
|
||||
static void setControlResourceIDsForNewEditorObject(DlgEditor const * pEditor,
|
||||
const css::uno::Any& rControlAny, const OUString& aCtrlName);
|
||||
const css::uno::Any& rControlAny, std::u16string_view aCtrlName);
|
||||
|
||||
static void renameControlResourceIDsForEditorObject(DlgEditor const * pEditor,
|
||||
const css::uno::Any& rControlAny, const OUString& aNewCtrlName);
|
||||
const css::uno::Any& rControlAny, std::u16string_view aNewCtrlName);
|
||||
|
||||
static void deleteControlResourceIDsForDeletedEditorObject(DlgEditor const * pEditor,
|
||||
const css::uno::Any& rControlAny, const OUString& aCtrlName);
|
||||
const css::uno::Any& rControlAny, std::u16string_view aCtrlName);
|
||||
|
||||
static void setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
|
||||
static void setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName, std::u16string_view aDlgName,
|
||||
const css::uno::Reference< css::container::XNameContainer >& xDialogModel );
|
||||
|
||||
static void renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
|
||||
static void renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName, std::u16string_view aDlgName,
|
||||
const css::uno::Reference< css::container::XNameContainer >& xDialogModel );
|
||||
|
||||
static void removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
|
||||
static void removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName, std::u16string_view aDlgName,
|
||||
const css::uno::Reference< css::container::XNameContainer >& xDialogModel );
|
||||
|
||||
static css::uno::Reference< css::resource::XStringResourceManager >
|
||||
@ -125,12 +129,12 @@ public:
|
||||
const css::uno::Reference< css::resource::XStringResourceManager >& xStringResourceManager );
|
||||
|
||||
static void copyResourcesForPastedEditorObject( DlgEditor const * pEditor,
|
||||
const css::uno::Any& rControlAny, const OUString& aCtrlName,
|
||||
const css::uno::Any& rControlAny, std::u16string_view aCtrlName,
|
||||
const css::uno::Reference< css::resource::XStringResourceResolver >& xSourceStringResolver );
|
||||
|
||||
static void copyResourceForDroppedDialog(
|
||||
const css::uno::Reference< css::container::XNameContainer >& xDialogModel,
|
||||
const OUString& aDialogName,
|
||||
std::u16string_view aDialogName,
|
||||
const css::uno::Reference< css::resource::XStringResourceManager >& xStringResourceManager,
|
||||
const css::uno::Reference< css::resource::XStringResourceResolver >& xSourceStringResolver );
|
||||
|
||||
|
@ -130,7 +130,7 @@ void Coverage::process_directory(const OUString& sDirName)
|
||||
|
||||
void Coverage::Coverage_Iterator()
|
||||
{
|
||||
OUString sDirName = m_directories.getURLFromSrc("/basic/qa/basic_coverage/");
|
||||
OUString sDirName = m_directories.getURLFromSrc(u"/basic/qa/basic_coverage/");
|
||||
|
||||
CPPUNIT_ASSERT(!sDirName.isEmpty());
|
||||
process_directory(sDirName); // any files in the root test dir are run in test harness default locale ( en-US )
|
||||
|
@ -145,7 +145,7 @@ void VBATest::testMiscVBAFunctions()
|
||||
#endif
|
||||
"win32compatb.vb" // same methods, different signatures.
|
||||
};
|
||||
OUString sMacroPathURL = m_directories.getURLFromSrc("/basic/qa/vba_tests/");
|
||||
OUString sMacroPathURL = m_directories.getURLFromSrc(u"/basic/qa/vba_tests/");
|
||||
OUString sMacroUtilsURL = sMacroPathURL + "_test_asserts.vb";
|
||||
// Some test data expects the uk locale
|
||||
LanguageTag aLocale(LANGUAGE_ENGLISH_UK);
|
||||
|
@ -83,6 +83,7 @@
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
|
||||
#include <com/sun/star/reflection/XConstantsTypeDescription.hpp>
|
||||
@ -4179,7 +4180,7 @@ class ModuleInvocationProxy : public WeakImplHelper< XInvocation, XComponent >
|
||||
::comphelper::OInterfaceContainerHelper2 m_aListeners;
|
||||
|
||||
public:
|
||||
ModuleInvocationProxy( OUString const & aPrefix, SbxObjectRef const & xScopeObj );
|
||||
ModuleInvocationProxy( std::u16string_view aPrefix, SbxObjectRef const & xScopeObj );
|
||||
|
||||
// XInvocation
|
||||
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() override;
|
||||
@ -4201,9 +4202,9 @@ public:
|
||||
|
||||
}
|
||||
|
||||
ModuleInvocationProxy::ModuleInvocationProxy( OUString const & aPrefix, SbxObjectRef const & xScopeObj )
|
||||
ModuleInvocationProxy::ModuleInvocationProxy( std::u16string_view aPrefix, SbxObjectRef const & xScopeObj )
|
||||
: m_aMutex()
|
||||
, m_aPrefix( aPrefix + "_" )
|
||||
, m_aPrefix( OUString::Concat(aPrefix) + "_" )
|
||||
, m_xScopeObj( xScopeObj )
|
||||
, m_aListeners( m_aMutex )
|
||||
{
|
||||
@ -4381,7 +4382,8 @@ void SAL_CALL ModuleInvocationProxy::removeEventListener( const Reference< XEven
|
||||
|
||||
|
||||
Reference< XInterface > createComListener( const Any& aControlAny, const OUString& aVBAType,
|
||||
const OUString& aPrefix, const SbxObjectRef& xScopeObj )
|
||||
std::u16string_view aPrefix,
|
||||
const SbxObjectRef& xScopeObj )
|
||||
{
|
||||
Reference< XInterface > xRet;
|
||||
|
||||
|
@ -379,7 +379,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
|
||||
|
||||
css::uno::Reference< css::uno::XInterface > createComListener( const css::uno::Any& aControlAny,
|
||||
const OUString& aVBAType,
|
||||
const OUString& aPrefix,
|
||||
std::u16string_view aPrefix,
|
||||
const SbxObjectRef& xScopeObj );
|
||||
|
||||
bool checkUnoObjectType(SbUnoObject& refVal, const OUString& aClass);
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
namespace basic
|
||||
{
|
||||
@ -571,8 +572,8 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj,
|
||||
}
|
||||
}
|
||||
|
||||
static void createVariableURL( OUString& rStr, const OUString& rLibName,
|
||||
const OUString& rInfoFileName, bool bUser )
|
||||
static void createVariableURL( OUString& rStr, std::u16string_view rLibName,
|
||||
std::u16string_view rInfoFileName, bool bUser )
|
||||
{
|
||||
if( bUser )
|
||||
{
|
||||
@ -582,7 +583,7 @@ static void createVariableURL( OUString& rStr, const OUString& rLibName,
|
||||
{
|
||||
rStr = "$(INST)/" LIBO_SHARE_FOLDER "/basic/";
|
||||
}
|
||||
rStr += rLibName + "/" + rInfoFileName + ".xlb/";
|
||||
rStr += OUString::Concat(rLibName) + "/" + rInfoFileName + ".xlb/";
|
||||
}
|
||||
|
||||
void SfxLibraryContainer::init( const OUString& rInitialDocumentURL, const uno::Reference< embed::XStorage >& rxInitialStorage )
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <propertysethelper.hxx>
|
||||
#include <com/sun/star/beans/PropertyVetoException.hpp>
|
||||
#include <com/sun/star/beans/UnknownPropertyException.hpp>
|
||||
@ -29,18 +31,18 @@ namespace canvas
|
||||
{
|
||||
namespace
|
||||
{
|
||||
void throwUnknown( const OUString& aPropertyName )
|
||||
void throwUnknown( std::u16string_view aPropertyName )
|
||||
{
|
||||
throw beans::UnknownPropertyException(
|
||||
"PropertySetHelper: property " +
|
||||
OUString::Concat("PropertySetHelper: property ") +
|
||||
aPropertyName + " not found."
|
||||
);
|
||||
}
|
||||
|
||||
void throwVeto( const OUString& aPropertyName )
|
||||
void throwVeto( std::u16string_view aPropertyName )
|
||||
{
|
||||
throw beans::PropertyVetoException(
|
||||
"PropertySetHelper: property " +
|
||||
OUString::Concat("PropertySetHelper: property ") +
|
||||
aPropertyName + " access was vetoed." );
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ void PivotChartTest::testRoundtrip()
|
||||
|
||||
std::vector<double> aReference2 { 101879.458079, 178636.929704, 314626.484864 };
|
||||
|
||||
load("/chart2/qa/extras/data/ods/", "PivotChartRoundTrip.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "PivotChartRoundTrip.ods");
|
||||
|
||||
xChartDoc = getPivotChartDocFromSheet(1, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -371,7 +371,7 @@ void PivotChartTest::testChangePivotTable()
|
||||
uno::Sequence<uno::Any> xSequence;
|
||||
Reference<chart2::XChartDocument> xChartDoc;
|
||||
|
||||
load("/chart2/qa/extras/data/ods/", "PivotTableExample.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "PivotTableExample.ods");
|
||||
|
||||
// Check we have the Pivot Table
|
||||
OUString sPivotTableName("DataPilot1");
|
||||
|
@ -64,7 +64,7 @@ private:
|
||||
void Chart2TrendCalculators::setUp()
|
||||
{
|
||||
ChartTest::setUp();
|
||||
load("/chart2/qa/extras/data/ods/", "trend_calculators.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "trend_calculators.ods");
|
||||
}
|
||||
|
||||
void Chart2TrendCalculators::tearDown()
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
|
||||
#include <fstream>
|
||||
#include <string_view>
|
||||
|
||||
#if defined(X86)
|
||||
#define INT_EPS 2.1
|
||||
@ -50,7 +51,7 @@
|
||||
else \
|
||||
{ \
|
||||
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(#aActual), OUString(OUString::number(aActual))); \
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(u ## #aActual), OUString(OUString::number(aActual))); \
|
||||
}
|
||||
|
||||
#define CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aActual, EPS_) \
|
||||
@ -59,7 +60,7 @@
|
||||
else \
|
||||
{ \
|
||||
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpectedDouble(#aActual), aActual, EPS_); \
|
||||
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpectedDouble(u ## #aActual), aActual, EPS_); \
|
||||
}
|
||||
|
||||
#define CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aActual) \
|
||||
@ -68,7 +69,7 @@
|
||||
else \
|
||||
{ \
|
||||
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(#aActual), aActual.trim()); \
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(u ## #aActual), aActual.trim()); \
|
||||
}
|
||||
|
||||
#define CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aActual, EPS_) \
|
||||
@ -77,7 +78,7 @@
|
||||
else \
|
||||
{ \
|
||||
OUString expectedTransform; \
|
||||
if (!readAndCheckTransformation (aActual, #aActual, EPS_, expectedTransform)) \
|
||||
if (!readAndCheckTransformation (aActual, u ## #aActual, EPS_, expectedTransform)) \
|
||||
{ \
|
||||
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), expectedTransform, transformationToOneLineString(aActual)); \
|
||||
@ -143,7 +144,7 @@ protected:
|
||||
CPPUNIT_FAIL("verify method must be overridden");
|
||||
}
|
||||
|
||||
OUString readExpected(const OUString& sCheck)
|
||||
OUString readExpected(std::u16string_view sCheck)
|
||||
{
|
||||
assert(!m_bDumpMode);
|
||||
assert(m_aReferenceFile.is_open());
|
||||
@ -152,7 +153,7 @@ protected:
|
||||
OString sAssertMessage =
|
||||
"The reference file does not contain the right content. Maybe it needs an update:"
|
||||
+ OUStringToOString(m_sTestFileName, RTL_TEXTENCODING_UTF8);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString("// " + sCheck), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString(OUString::Concat("// ") + sCheck), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
|
||||
getline(m_aReferenceFile, sTemp);
|
||||
return OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8);
|
||||
}
|
||||
@ -165,7 +166,7 @@ protected:
|
||||
m_aDumpFile << sActualValue.trim() << "\n"; // Write out the checked value, will be used as reference later
|
||||
}
|
||||
|
||||
void readNote(const OUString& sNote)
|
||||
void readNote(std::u16string_view sNote)
|
||||
{
|
||||
assert(!m_bDumpMode);
|
||||
assert(m_aReferenceFile.is_open());
|
||||
@ -174,7 +175,7 @@ protected:
|
||||
OString sAssertMessage =
|
||||
"The reference file does not contain the right content. Maybe it needs an update:"
|
||||
+ OUStringToOString(m_sTestFileName, RTL_TEXTENCODING_UTF8);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString("/// " + sNote), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString(OUString::Concat("/// ") + sNote), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
|
||||
}
|
||||
|
||||
void writeNote(const OUString& sNote)
|
||||
@ -184,7 +185,7 @@ protected:
|
||||
m_aDumpFile << "/// " << sNote << "\n";
|
||||
}
|
||||
|
||||
double readExpectedDouble(const OUString& sCheck)
|
||||
double readExpectedDouble(std::u16string_view sCheck)
|
||||
{
|
||||
OUString sExpected = readExpected(sCheck);
|
||||
return sExpected.toDouble();
|
||||
@ -195,7 +196,7 @@ protected:
|
||||
writeActual(transformationToOneLineString(rTransform), sCheck);
|
||||
}
|
||||
|
||||
bool readAndCheckTransformation(const drawing::HomogenMatrix3& rTransform, const OUString& sCheck, const double fEPS, OUString& rExpectedTransform)
|
||||
bool readAndCheckTransformation(const drawing::HomogenMatrix3& rTransform, std::u16string_view sCheck, const double fEPS, OUString& rExpectedTransform)
|
||||
{
|
||||
rExpectedTransform = readExpected(sCheck); // Reference transformation string
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -181,7 +181,7 @@ static OString OU2O(std::u16string_view sOUSource)
|
||||
void Chart2GeometryTest::testTdf135184RoundLineCap()
|
||||
{
|
||||
// It tests chart area, data series line and regression-curve line.
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@ -208,7 +208,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap()
|
||||
void Chart2GeometryTest::testTdf135184RoundLineCap2()
|
||||
{
|
||||
// It tests legend, data series sector and title.
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@ -237,7 +237,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2()
|
||||
void Chart2GeometryTest::testTdf135184RoundLineCap3()
|
||||
{
|
||||
// It tests chart area, data series line and regression-curve line.
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@ -254,7 +254,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3()
|
||||
void Chart2GeometryTest::testTdf135184RoundLineCap4()
|
||||
{
|
||||
// It tests legend, data series sector and title.
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@ -270,7 +270,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
|
||||
{
|
||||
// chart area with color gradient and solid transparency
|
||||
// Without the patch the transparency was lost in saved pptx file.
|
||||
load("/chart2/qa/extras/data/odp/", "tdf128345_ChartArea_CG_TS.odp");
|
||||
load(u"/chart2/qa/extras/data/odp/", "tdf128345_ChartArea_CG_TS.odp");
|
||||
|
||||
// Make sure the chart area has a transparency in gradient stops in saved pptx file.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
|
||||
@ -289,7 +289,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
|
||||
// Make sure chart area has transparency when pptx document is opened and resaved as odp.
|
||||
// As of Aug 2020, the import generates a transparency gradient. When import is changed to
|
||||
// generate solid transparency, the test needs to be adapted.
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf128345_ChartArea_CG_TS.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf128345_ChartArea_CG_TS.pptx");
|
||||
|
||||
// Find transparency gradient name
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
|
||||
@ -322,7 +322,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
|
||||
{
|
||||
// chart wall with solid color and transparency gradient
|
||||
// Without the patch the transparency was lost.
|
||||
load("/chart2/qa/extras/data/odp/", "tdf128345_ChartWall_CS_TG.odp");
|
||||
load(u"/chart2/qa/extras/data/odp/", "tdf128345_ChartWall_CS_TG.odp");
|
||||
|
||||
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
|
||||
@ -340,7 +340,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
|
||||
{
|
||||
// This works on the file, which was exported from file tdf128345_ChartWall_CS_TG.odp to pptx.
|
||||
// Make sure chart wall has transparency when pptx document is resaved as odp.
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf128345_ChartWall_CS_TG.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf128345_ChartWall_CS_TG.pptx");
|
||||
|
||||
// Find transparency gradient name
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
|
||||
@ -371,7 +371,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
|
||||
{
|
||||
// legend with solid color and transparency gradient
|
||||
// Without the patch the transparency was lost.
|
||||
load("/chart2/qa/extras/data/odp/", "tdf128345_Legend_CS_TG_axial.odp");
|
||||
load(u"/chart2/qa/extras/data/odp/", "tdf128345_Legend_CS_TG_axial.odp");
|
||||
|
||||
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
|
||||
@ -391,7 +391,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
|
||||
{
|
||||
// This works on the file, which was exported from file tdf128345_Legend_CS_TG_axial.odp to pptx.
|
||||
// Error was, that in case of axial not the middle value was taken but start and end value.
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf128345_Legend_CS_TG_axial.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf128345_Legend_CS_TG_axial.pptx");
|
||||
|
||||
// Find transparency gradient name
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
|
||||
@ -422,7 +422,7 @@ void Chart2GeometryTest::testTdf135366LabelOnSeries()
|
||||
{
|
||||
// Error was, that the fill and line properties of a <chart:data-label> were not
|
||||
// imported at all. Here they should be at the series.
|
||||
load("/chart2/qa/extras/data/ods/", "tdf135366_data_label_series.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "tdf135366_data_label_series.ods");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
|
||||
@ -460,7 +460,7 @@ void Chart2GeometryTest::testTdf135366LabelOnPoint()
|
||||
{
|
||||
// Error was, that the fill and line properties of a <chart:data-label> were not
|
||||
// imported at all. Here they should be at point 2.
|
||||
load("/chart2/qa/extras/data/odt/", "tdf135366_data_label_point.odt");
|
||||
load(u"/chart2/qa/extras/data/odt/", "tdf135366_data_label_point.odt");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
|
||||
@ -507,7 +507,7 @@ void Chart2GeometryTest::testTdf135366LabelExport()
|
||||
// Error was, that line and fill properties were not exported as
|
||||
// graphic-properties of a <chart:data-label> element, but only
|
||||
// as loext chart-properties of the <chart:data-point> element.
|
||||
load("/chart2/qa/extras/data/odt/", "tdf135366_data_label_export.odt");
|
||||
load(u"/chart2/qa/extras/data/odt/", "tdf135366_data_label_export.odt");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "writer8");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
@ -535,7 +535,7 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
|
||||
SvtSaveOptions aSaveOpt;
|
||||
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(aSaveOpt.GetODFDefaultVersion());
|
||||
aSaveOpt.SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf135366_CustomLabelText.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf135366_CustomLabelText.pptx");
|
||||
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
|
||||
CPPUNIT_ASSERT(pXmlDoc);
|
||||
|
||||
|
@ -304,7 +304,7 @@ private:
|
||||
// split method up into smaller chunks for more detailed tests
|
||||
void Chart2ImportTest::Fdo60083()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "fdo60083.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "fdo60083.ods");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -353,7 +353,7 @@ void Chart2ImportTest::Fdo60083()
|
||||
|
||||
void Chart2ImportTest::testErrorBarRange()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "error_bar_range.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "error_bar_range.ods");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -382,7 +382,7 @@ void Chart2ImportTest::testErrorBarRange()
|
||||
|
||||
void Chart2ImportTest::testErrorBarFormatting()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -423,7 +423,7 @@ void Chart2ImportTest::testSteppedLines()
|
||||
chart2::CurveStyle_STEP_CENTER_Y
|
||||
};
|
||||
|
||||
load("/chart2/qa/extras/data/ods/", "stepped_lines.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "stepped_lines.ods");
|
||||
for(sal_Int32 nSheet = 0; nSheet < MAXSHEET; ++nSheet)
|
||||
{
|
||||
uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet( nSheet, mxComponent );
|
||||
@ -451,7 +451,7 @@ static uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< ch
|
||||
|
||||
void Chart2ImportTest::testODSChartSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "chart.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "chart.ods");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
|
||||
uno::Sequence < OUString > seriesList = getChartColumnDescriptions( xChart1Doc);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
|
||||
@ -462,7 +462,7 @@ void Chart2ImportTest::testODSChartSeries()
|
||||
|
||||
void Chart2ImportTest::testXLSXChartSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "chart.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "chart.xlsx");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
|
||||
uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc );
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
|
||||
@ -473,7 +473,7 @@ void Chart2ImportTest::testXLSXChartSeries()
|
||||
|
||||
void Chart2ImportTest::testXLSChartSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xls/", "chart.xls");
|
||||
load(u"/chart2/qa/extras/data/xls/", "chart.xls");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
|
||||
uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc );
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
|
||||
@ -484,7 +484,7 @@ void Chart2ImportTest::testXLSChartSeries()
|
||||
|
||||
void Chart2ImportTest::testODTChartSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/odt/", "chart.odt");
|
||||
load(u"/chart2/qa/extras/data/odt/", "chart.odt");
|
||||
uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
|
||||
@ -494,7 +494,7 @@ void Chart2ImportTest::testODTChartSeries()
|
||||
|
||||
void Chart2ImportTest::testDOCChartSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/doc/", "chart.doc");
|
||||
load(u"/chart2/qa/extras/data/doc/", "chart.doc");
|
||||
uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
|
||||
@ -503,7 +503,7 @@ void Chart2ImportTest::testDOCChartSeries()
|
||||
|
||||
void Chart2ImportTest::testDOCXChartSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "chart.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "chart.docx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -519,7 +519,7 @@ void Chart2ImportTest::testDOCXChartSeries()
|
||||
|
||||
void Chart2ImportTest::testDOCXChartEmptySeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "tdf125337.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf125337.docx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -545,7 +545,7 @@ void Chart2ImportTest::testDOCXChartEmptySeries()
|
||||
|
||||
void Chart2ImportTest::testDOCXChartValuesSize()
|
||||
{
|
||||
load( "/chart2/qa/extras/data/docx/", "bubblechart.docx" );
|
||||
load( u"/chart2/qa/extras/data/docx/", "bubblechart.docx" );
|
||||
Reference<chart2::XChartDocument> xChartDoc( getChartDocFromWriter(0), uno::UNO_QUERY );
|
||||
CPPUNIT_ASSERT( xChartDoc.is() );
|
||||
|
||||
@ -567,7 +567,7 @@ void Chart2ImportTest::testDOCXChartValuesSize()
|
||||
void Chart2ImportTest::testPPTChartSeries()
|
||||
{
|
||||
//test chart series names for ppt
|
||||
uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions("/chart2/qa/extras/data/ppt/", "chart.ppt");
|
||||
uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(u"/chart2/qa/extras/data/ppt/", "chart.ppt");
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
|
||||
@ -578,7 +578,7 @@ void Chart2ImportTest::testPPTChartSeries()
|
||||
void Chart2ImportTest::testPPTXChartSeries()
|
||||
{
|
||||
//test chart series names for pptx
|
||||
load("/chart2/qa/extras/data/pptx/", "chart.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "chart.pptx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -595,7 +595,7 @@ void Chart2ImportTest::testPPTXChartSeries()
|
||||
void Chart2ImportTest::testPPTXSparseChartSeries()
|
||||
{
|
||||
//test chart series sparse data for pptx
|
||||
load("/chart2/qa/extras/data/pptx/", "sparse-chart.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "sparse-chart.pptx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -616,7 +616,7 @@ void Chart2ImportTest::testPPTXSparseChartSeries()
|
||||
|
||||
void Chart2ImportTest::testPPTXHiddenDataSeries()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "stacked-bar-chart-hidden-series.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "stacked-bar-chart-hidden-series.pptx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -655,7 +655,7 @@ void Chart2ImportTest::testPPTXHiddenDataSeries()
|
||||
|
||||
void Chart2ImportTest::testPPTXPercentageNumberFormats()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "percentage-number-formats.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "percentage-number-formats.pptx");
|
||||
|
||||
// 1st chart
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
@ -720,7 +720,7 @@ void Chart2ImportTest::testPPTXPercentageNumberFormats()
|
||||
|
||||
void Chart2ImportTest::testPieChartLabelsNumFormat()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdfPieNumFormat.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdfPieNumFormat.xlsx");
|
||||
uno::Reference< chart::XChartDocument > xChartDoc(getChartCompFromSheet(0, mxComponent), UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
// test data point labels format
|
||||
@ -732,7 +732,7 @@ void Chart2ImportTest::testPieChartLabelsNumFormat()
|
||||
|
||||
void Chart2ImportTest::testPPTXStackedNonStackedYAxis()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "stacked-non-stacked-mix-y-axis.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "stacked-non-stacked-mix-y-axis.pptx");
|
||||
|
||||
// 1st chart is a normal stacked column.
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
@ -792,7 +792,7 @@ void Chart2ImportTest::testPPTXStackedNonStackedYAxis()
|
||||
void Chart2ImportTest::testODPChartSeries()
|
||||
{
|
||||
//test chart series names for odp
|
||||
uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions("/chart2/qa/extras/data/odp/", "chart.odp");
|
||||
uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(u"/chart2/qa/extras/data/odp/", "chart.odp");
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
|
||||
@ -801,7 +801,7 @@ void Chart2ImportTest::testODPChartSeries()
|
||||
|
||||
void Chart2ImportTest::testBnc864396()
|
||||
{
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW);
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
|
||||
|
||||
uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
|
||||
@ -816,7 +816,7 @@ void Chart2ImportTest::testBnc864396()
|
||||
|
||||
void Chart2ImportTest::testBnc889755()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 6), uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
|
||||
|
||||
@ -844,7 +844,7 @@ void Chart2ImportTest::testBnc889755()
|
||||
|
||||
void Chart2ImportTest::testBnc882383()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "bnc882383.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "bnc882383.pptx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY_THROW);
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
CPPUNIT_ASSERT(xDataSeries.is());
|
||||
@ -857,7 +857,7 @@ void Chart2ImportTest::testBnc882383()
|
||||
|
||||
void Chart2ImportTest::testTransparancyGradientValue()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf128732.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf128732.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@ -880,7 +880,7 @@ void Chart2ImportTest::testTransparancyGradientValue()
|
||||
|
||||
void Chart2ImportTest::testSimpleStrictXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -891,7 +891,7 @@ void Chart2ImportTest::testSimpleStrictXLSX()
|
||||
|
||||
void Chart2ImportTest::testDelayedCellImport()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
|
||||
Reference< chart2::data::XDataSequence > xDataSeq =
|
||||
getDataSequenceFromDocByRole(xChartDoc, u"values-x");
|
||||
@ -902,7 +902,7 @@ void Chart2ImportTest::testDelayedCellImport()
|
||||
|
||||
void Chart2ImportTest::testFlatODSStackedColumnChart()
|
||||
{
|
||||
load("/chart2/qa/extras/data/fods/", "stacked-column-chart.fods");
|
||||
load(u"/chart2/qa/extras/data/fods/", "stacked-column-chart.fods");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -919,7 +919,7 @@ void Chart2ImportTest::testFlatODSStackedColumnChart()
|
||||
|
||||
void Chart2ImportTest::testFdo78080()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "fdo78080.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "fdo78080.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -930,7 +930,7 @@ void Chart2ImportTest::testFdo78080()
|
||||
|
||||
void Chart2ImportTest::testTdf127811()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf127811.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf127811.pptx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -949,7 +949,7 @@ void Chart2ImportTest::testTdf127811()
|
||||
|
||||
void Chart2ImportTest::testTdf86624()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "tdf86624.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "tdf86624.ods");
|
||||
uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent);
|
||||
uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY);
|
||||
uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend();
|
||||
@ -960,7 +960,7 @@ void Chart2ImportTest::testTdf86624()
|
||||
|
||||
void Chart2ImportTest::testTdf105517()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf105517.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf105517.pptx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -988,7 +988,7 @@ void Chart2ImportTest::testTdf105517()
|
||||
|
||||
void Chart2ImportTest::testTdf106217()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf106217.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf106217.pptx");
|
||||
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0, 0);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -1011,7 +1011,7 @@ void Chart2ImportTest::testTdf106217()
|
||||
void Chart2ImportTest::testTdf108021()
|
||||
{
|
||||
// Tdf108021 : To check TextBreak value is true.
|
||||
load("/chart2/qa/extras/data/ods/", "tdf108021.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "tdf108021.ods");
|
||||
uno::Reference< chart::XDiagram > mxDiagram;
|
||||
uno::Reference< beans::XPropertySet > xAxisProp;
|
||||
bool bTextBreak = false;
|
||||
@ -1029,7 +1029,7 @@ void Chart2ImportTest::testTdf108021()
|
||||
void Chart2ImportTest::testTdf100084()
|
||||
{
|
||||
// The test file was created with IBM Cognos, make sure there is a diagram.
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
Reference<beans::XPropertySet> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY);
|
||||
@ -1038,7 +1038,7 @@ void Chart2ImportTest::testTdf100084()
|
||||
|
||||
void Chart2ImportTest::testTdf124817()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf124817.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf124817.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1066,7 +1066,7 @@ void Chart2ImportTest::testTdf124817()
|
||||
|
||||
void Chart2ImportTest::testTdf126033()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1083,7 +1083,7 @@ void Chart2ImportTest::testTdf126033()
|
||||
|
||||
void Chart2ImportTest::testTransparentBackground(OUString const & filename)
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", filename);
|
||||
load(u"/chart2/qa/extras/data/xlsx/", filename);
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1110,7 +1110,7 @@ void Chart2ImportTest::testFdo54361_1()
|
||||
|
||||
void Chart2ImportTest::testAutoBackgroundXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "chart-auto-background.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "chart-auto-background.xlsx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1127,7 +1127,7 @@ void Chart2ImportTest::testAutoBackgroundXLSX()
|
||||
|
||||
void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "chart-area-style-border.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "chart-area-style-border.xlsx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1147,7 +1147,7 @@ void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
|
||||
|
||||
void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1164,7 +1164,7 @@ void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
|
||||
|
||||
void Chart2ImportTest::testChartHatchFillXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "chart-hatch-fill.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "chart-hatch-fill.xlsx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1206,7 +1206,7 @@ void Chart2ImportTest::testChartHatchFillXLSX()
|
||||
|
||||
void Chart2ImportTest::testAxisTextRotationXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1244,7 +1244,7 @@ void Chart2ImportTest::testTextCanOverlapXLSX()
|
||||
void Chart2ImportTest::testTextBreakXLSX()
|
||||
{
|
||||
// tdf#122091: To check textbreak value is true in case of 0° degree of Axis label rotation.
|
||||
load("/chart2/qa/extras/data/xlsx/", "chart_label_text_break.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "chart_label_text_break.xlsx");
|
||||
uno::Reference< chart::XDiagram > mxDiagram;
|
||||
uno::Reference< beans::XPropertySet > xAxisProp;
|
||||
bool textBreak = false;
|
||||
@ -1262,7 +1262,7 @@ void Chart2ImportTest::testTextBreakXLSX()
|
||||
|
||||
void Chart2ImportTest::testNumberFormatsXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "number-formats.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "number-formats.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1311,7 +1311,7 @@ void Chart2ImportTest::testNumberFormatsXLSX()
|
||||
|
||||
void Chart2ImportTest::testNumberFormatsDOCX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "tdf132174.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf132174.docx");
|
||||
{
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1332,7 +1332,7 @@ void Chart2ImportTest::testNumberFormatsDOCX()
|
||||
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource);
|
||||
}
|
||||
|
||||
load("/chart2/qa/extras/data/docx/", "tdf136650.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf136650.docx");
|
||||
{
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1356,7 +1356,7 @@ void Chart2ImportTest::testNumberFormatsDOCX()
|
||||
|
||||
void Chart2ImportTest::testPercentageNumberFormatsDOCX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "tdf133632.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf133632.docx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -1376,7 +1376,7 @@ void Chart2ImportTest::testPercentageNumberFormatsDOCX()
|
||||
|
||||
void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1388,7 +1388,7 @@ void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX()
|
||||
|
||||
void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "autotitledel_2013.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2013.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1400,7 +1400,7 @@ void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1414,7 +1414,7 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX()
|
||||
|
||||
void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2013.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2013.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -1428,7 +1428,7 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testSmoothDefaultValue2007XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1446,7 +1446,7 @@ void Chart2ImportTest::testSmoothDefaultValue2007XLSX()
|
||||
|
||||
void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1464,7 +1464,7 @@ void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testTrendlineDefaultValue2007XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "trendline2007.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "trendline2007.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1490,7 +1490,7 @@ void Chart2ImportTest::testTrendlineDefaultValue2007XLSX()
|
||||
|
||||
void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "trendline.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "trendline.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1516,7 +1516,7 @@ void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1531,7 +1531,7 @@ void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
|
||||
|
||||
void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "vary_color.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "vary_color.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1546,7 +1546,7 @@ void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "plotVisOnly.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "plotVisOnly.xlsx");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
|
||||
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
|
||||
uno::Any aAny = xPropSet->getPropertyValue("IncludeHiddenCells");
|
||||
@ -1558,7 +1558,7 @@ void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testRAngAxDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "rAngAx.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "rAngAx.xlsx");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
|
||||
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
|
||||
uno::Any aAny = xPropSet->getPropertyValue("RightAngledAxes");
|
||||
@ -1570,7 +1570,7 @@ void Chart2ImportTest::testRAngAxDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
|
||||
@ -1585,7 +1585,7 @@ void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "minorTickMark.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "minorTickMark.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
|
||||
@ -1600,7 +1600,7 @@ void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
|
||||
|
||||
void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "axis_title_default_rotation.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "axis_title_default_rotation.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0);
|
||||
@ -1617,7 +1617,7 @@ void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
|
||||
|
||||
void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1);
|
||||
@ -1634,7 +1634,7 @@ void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
|
||||
|
||||
void Chart2ImportTest::testAxisTitleRotationXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "axis_title_rotated.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "axis_title_rotated.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
{
|
||||
@ -1666,7 +1666,7 @@ void Chart2ImportTest::testAxisTitleRotationXLSX()
|
||||
|
||||
void Chart2ImportTest::testAxisTitlePositionDOCX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
|
||||
uno::Reference< chart::XDiagram > mxDiagram;
|
||||
uno::Reference< drawing::XShape > xAxisTitle;
|
||||
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0);
|
||||
@ -1698,7 +1698,7 @@ void Chart2ImportTest::testAxisTitlePositionDOCX()
|
||||
|
||||
void Chart2ImportTest::testCombinedChartAttachedAxisXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "testCombinedChartAxis.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "testCombinedChartAxis.xlsx");
|
||||
Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
// First series
|
||||
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 0);
|
||||
@ -1723,7 +1723,7 @@ void Chart2ImportTest::testCombinedChartAttachedAxisXLSX()
|
||||
}
|
||||
|
||||
void Chart2ImportTest::testInternalDataProvider() {
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/odp/", "chart.odp"), uno::UNO_QUERY_THROW);
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/odp/", "chart.odp"), uno::UNO_QUERY_THROW);
|
||||
const uno::Reference< chart2::data::XDataProvider >& rxDataProvider = xChartDoc->getDataProvider();
|
||||
|
||||
// Parse 42 array
|
||||
@ -1769,7 +1769,7 @@ void Chart2ImportTest::testInternalDataProvider() {
|
||||
|
||||
void Chart2ImportTest::testTdf90510()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xls/", "piechart_outside.xls");
|
||||
load(u"/chart2/qa/extras/data/xls/", "piechart_outside.xls");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
|
||||
Reference<beans::XPropertySet> xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW );
|
||||
uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" );
|
||||
@ -1781,7 +1781,7 @@ void Chart2ImportTest::testTdf90510()
|
||||
|
||||
void Chart2ImportTest::testTdf109858()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
|
||||
|
||||
// test data point labels position
|
||||
@ -1801,7 +1801,7 @@ void Chart2ImportTest::testTdf109858()
|
||||
|
||||
void Chart2ImportTest::testTdf130105()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "barchart_outend.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "barchart_outend.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@ -1817,13 +1817,13 @@ void Chart2ImportTest::testTdf130105()
|
||||
|
||||
void Chart2ImportTest::testTdf111173()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf111173.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf111173.xlsx");
|
||||
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
|
||||
}
|
||||
|
||||
void Chart2ImportTest::testTdf122226()
|
||||
{
|
||||
load( "/chart2/qa/extras/data/docx/", "testTdf122226.docx" );
|
||||
load( u"/chart2/qa/extras/data/docx/", "testTdf122226.docx" );
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT( xChartDoc.is() );
|
||||
|
||||
@ -1841,7 +1841,7 @@ void Chart2ImportTest::testTdf122226()
|
||||
|
||||
void Chart2ImportTest::testTdf115107()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1932,7 +1932,7 @@ void Chart2ImportTest::testTdf115107()
|
||||
|
||||
void Chart2ImportTest::testTdf115107_2()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -1987,7 +1987,7 @@ void Chart2ImportTest::testTdf115107_2()
|
||||
|
||||
void Chart2ImportTest::testTdf116163()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -2052,7 +2052,7 @@ void Chart2ImportTest::testTdf116163()
|
||||
|
||||
void Chart2ImportTest::testTdf48041()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf48041.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf48041.pptx");
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -2102,7 +2102,7 @@ void Chart2ImportTest::testTdf48041()
|
||||
|
||||
void Chart2ImportTest::testTdf121205()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf121205.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf121205.pptx");
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
|
||||
uno::Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW);
|
||||
@ -2115,7 +2115,7 @@ void Chart2ImportTest::testTdf121205()
|
||||
|
||||
void Chart2ImportTest::testTdf114179()
|
||||
{
|
||||
load( "/chart2/qa/extras/data/docx/", "testTdf114179.docx" );
|
||||
load( u"/chart2/qa/extras/data/docx/", "testTdf114179.docx" );
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT( xChartDoc.is() );
|
||||
css::uno::Reference<chart2::XDiagram> xDiagram;
|
||||
@ -2129,7 +2129,7 @@ void Chart2ImportTest::testTdf114179()
|
||||
|
||||
void Chart2ImportTest::testTdf124243()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "tdf124243.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf124243.docx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -2146,7 +2146,7 @@ void Chart2ImportTest::testTdf124243()
|
||||
|
||||
void Chart2ImportTest::testTdf127393()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf127393.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf127393.pptx");
|
||||
|
||||
// 1st chart
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
@ -2173,7 +2173,7 @@ void Chart2ImportTest::testTdf127393()
|
||||
|
||||
void Chart2ImportTest::testTdf128733()
|
||||
{
|
||||
load("/chart2/qa/extras/data/odt/", "tdf128733.odt");
|
||||
load(u"/chart2/qa/extras/data/odt/", "tdf128733.odt");
|
||||
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -2188,7 +2188,7 @@ void Chart2ImportTest::testTdf128733()
|
||||
|
||||
void Chart2ImportTest::testTdf128432()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "tdf128432.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "tdf128432.ods");
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -2203,7 +2203,7 @@ void Chart2ImportTest::testTdf128432()
|
||||
|
||||
void Chart2ImportTest::testTdf128627()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf128627.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf128627.xlsx");
|
||||
// Test ShiftedCategoryPosition for Radar Chart
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
@ -2218,7 +2218,7 @@ void Chart2ImportTest::testTdf128627()
|
||||
|
||||
void Chart2ImportTest::testTdf128634()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf128634.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf128634.xlsx");
|
||||
// Test ShiftedCategoryPosition for 3D Charts
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
@ -2233,7 +2233,7 @@ void Chart2ImportTest::testTdf128634()
|
||||
|
||||
void Chart2ImportTest::testTdf130657()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf130657.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf130657.xlsx");
|
||||
// Test ShiftedCategoryPosition for charts which is not contain a "crossbetween" OOXML tag.
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
@ -2261,7 +2261,7 @@ void checkDataLabelProperties(const Reference<chart2::XDataSeries>& xDataSeries,
|
||||
|
||||
void Chart2ImportTest::testDeletedDataLabel()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "deleted_data_labels.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "deleted_data_labels.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
|
||||
Reference<chart2::XDataSeries> xDataSeries0 = getDataSeriesFromDoc(xChartDoc, 0);
|
||||
CPPUNIT_ASSERT(xDataSeries0.is());
|
||||
@ -2277,7 +2277,7 @@ void Chart2ImportTest::testDeletedDataLabel()
|
||||
|
||||
void Chart2ImportTest::testDataPointInheritedColorDOCX()
|
||||
{
|
||||
load( "/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx" );
|
||||
load( u"/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx" );
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT( xChartDoc.is() );
|
||||
css::uno::Reference<chart2::XDiagram> xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW);
|
||||
@ -2291,7 +2291,7 @@ void Chart2ImportTest::testDataPointInheritedColorDOCX()
|
||||
|
||||
void Chart2ImportTest::testExternalStrRefsXLSX()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -2304,7 +2304,7 @@ void Chart2ImportTest::testExternalStrRefsXLSX()
|
||||
|
||||
void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
|
||||
load(u"/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -2316,7 +2316,7 @@ void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS()
|
||||
|
||||
void Chart2ImportTest::testSimpleCategoryAxis()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "testSimpleCategoryAxis.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "testSimpleCategoryAxis.docx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -2343,7 +2343,7 @@ void Chart2ImportTest::testSimpleCategoryAxis()
|
||||
|
||||
void Chart2ImportTest::testMultilevelCategoryAxis()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "testMultilevelCategoryAxis.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "testMultilevelCategoryAxis.docx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -2371,7 +2371,7 @@ void Chart2ImportTest::testMultilevelCategoryAxis()
|
||||
|
||||
void Chart2ImportTest::testXaxisValues()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "tdf124083.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf124083.docx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
|
||||
@ -2387,7 +2387,7 @@ void Chart2ImportTest::testXaxisValues()
|
||||
|
||||
void Chart2ImportTest::testTdf123504()
|
||||
{
|
||||
load("/chart2/qa/extras/data/ods/", "pie_chart_100_and_0.ods");
|
||||
load(u"/chart2/qa/extras/data/ods/", "pie_chart_100_and_0.ods");
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
UNO_QUERY_THROW);
|
||||
|
||||
@ -2419,7 +2419,7 @@ void Chart2ImportTest::testTdf123504()
|
||||
void Chart2ImportTest::testTdf122765()
|
||||
{
|
||||
// The horizontal position of the slices was wrong.
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf122765.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf122765.pptx");
|
||||
Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 0);
|
||||
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
|
||||
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
|
||||
@ -2442,7 +2442,7 @@ void Chart2ImportTest::testTdf123206CustomLabelField()
|
||||
// File contains the deprecated "custom-label-field" attribute of the
|
||||
// "data-point" element. It should be interpreted and stored as a data point
|
||||
// property.
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/odp/", "tdf123206.odp"), uno::UNO_QUERY_THROW);
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/odp/", "tdf123206.odp"), uno::UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
|
||||
@ -2457,7 +2457,7 @@ void Chart2ImportTest::testTdf123206CustomLabelField()
|
||||
|
||||
void Chart2ImportTest::testTdf125444PercentageCustomLabel()
|
||||
{
|
||||
load("/chart2/qa/extras/data/pptx/", "tdf125444.pptx");
|
||||
load(u"/chart2/qa/extras/data/pptx/", "tdf125444.pptx");
|
||||
|
||||
// 1st chart
|
||||
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
|
||||
@ -2477,7 +2477,7 @@ void Chart2ImportTest::testTdf125444PercentageCustomLabel()
|
||||
void Chart2ImportTest::testDataPointLabelCustomPos()
|
||||
{
|
||||
// test CustomLabelPosition on Bar chart
|
||||
load("/chart2/qa/extras/data/xlsx/", "testDataPointLabelCustomPos.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "testDataPointLabelCustomPos.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@ -2499,7 +2499,7 @@ void Chart2ImportTest::testDataPointLabelCustomPos()
|
||||
void Chart2ImportTest::testTdf130032()
|
||||
{
|
||||
// test CustomLabelPosition on Line chart
|
||||
load("/chart2/qa/extras/data/xlsx/", "testTdf130032.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "testTdf130032.xlsx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@ -2521,7 +2521,7 @@ void Chart2ImportTest::testTdf130032()
|
||||
void Chart2ImportTest::testTdf134978()
|
||||
{
|
||||
// test CustomLabelPosition on Pie chart
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
|
||||
@ -2539,7 +2539,7 @@ void Chart2ImportTest::testTdf134978()
|
||||
|
||||
void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf119138-missing-autotitledeleted.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf119138-missing-autotitledeleted.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
|
||||
@ -2550,7 +2550,7 @@ void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted()
|
||||
|
||||
void Chart2ImportTest::testStockChartShiftedCategoryPosition()
|
||||
{
|
||||
load("/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt");
|
||||
load(u"/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt");
|
||||
|
||||
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -2570,7 +2570,7 @@ void Chart2ImportTest::testTdf133376()
|
||||
if (!IsDefaultDPI())
|
||||
return;
|
||||
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf133376.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf133376.xlsx");
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
UNO_QUERY_THROW);
|
||||
|
||||
@ -2589,7 +2589,7 @@ void Chart2ImportTest::testTdf133376()
|
||||
|
||||
void Chart2ImportTest::testTdf134225()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx");
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
UNO_QUERY_THROW);
|
||||
|
||||
@ -2622,7 +2622,7 @@ void Chart2ImportTest::testTdf136105()
|
||||
if (!IsDefaultDPI())
|
||||
return;
|
||||
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf136105.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf136105.xlsx");
|
||||
// 1st chart with fix inner position and size
|
||||
{
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
@ -2661,7 +2661,7 @@ void Chart2ImportTest::testTdf136105()
|
||||
|
||||
void Chart2ImportTest::testTdf91250()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "tdf91250.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf91250.docx");
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
Reference<chart2::XInternalDataProvider> xInternalProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY);
|
||||
@ -2682,7 +2682,7 @@ void Chart2ImportTest::testTdf91250()
|
||||
void Chart2ImportTest::testTdf134111()
|
||||
{
|
||||
// tdf134111 : To check TextBreak value is true
|
||||
load("/chart2/qa/extras/data/docx/", "tdf134111.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "tdf134111.docx");
|
||||
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
uno::Reference< chart::XDiagram > mxDiagram(xChartDoc->getDiagram());
|
||||
@ -2698,7 +2698,7 @@ void Chart2ImportTest::testTdf134111()
|
||||
|
||||
void Chart2ImportTest::testTdf136752()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf136752.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf136752.xlsx");
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
UNO_QUERY_THROW);
|
||||
|
||||
@ -2717,7 +2717,7 @@ void Chart2ImportTest::testTdf136752()
|
||||
|
||||
void Chart2ImportTest::testTdf137505()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf137505.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf137505.xlsx");
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
UNO_QUERY_THROW);
|
||||
|
||||
@ -2737,7 +2737,7 @@ void Chart2ImportTest::testTdf137505()
|
||||
|
||||
void Chart2ImportTest::testTdf137734()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "tdf137734.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "tdf137734.xlsx");
|
||||
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
|
||||
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
@ -2764,7 +2764,7 @@ void Chart2ImportTest::testTdf137734()
|
||||
|
||||
void Chart2ImportTest::testTdf137874()
|
||||
{
|
||||
load("/chart2/qa/extras/data/xlsx/", "piechart_legend.xlsx");
|
||||
load(u"/chart2/qa/extras/data/xlsx/", "piechart_legend.xlsx");
|
||||
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
|
||||
UNO_QUERY_THROW);
|
||||
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
|
||||
@ -2778,7 +2778,7 @@ void Chart2ImportTest::testTdf137874()
|
||||
|
||||
void Chart2ImportTest::testTdfCustomShapePos()
|
||||
{
|
||||
load("/chart2/qa/extras/data/docx/", "testcustomshapepos.docx");
|
||||
load(u"/chart2/qa/extras/data/docx/", "testcustomshapepos.docx");
|
||||
Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), UNO_QUERY_THROW);
|
||||
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
|
||||
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
|
||||
|
@ -54,6 +54,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <com/sun/star/embed/Aspects.hpp>
|
||||
#include <com/sun/star/embed/XVisualObject.hpp>
|
||||
@ -71,13 +72,13 @@ class ChartTest : public test::BootstrapFixture, public unotest::MacrosTest
|
||||
{
|
||||
public:
|
||||
ChartTest():mbSkipValidation(false) {}
|
||||
void load( const OUString& rDir, const OUString& rFileName );
|
||||
void load( std::u16string_view rDir, const OUString& rFileName );
|
||||
std::shared_ptr<utl::TempFile> save( const OUString& rFileName );
|
||||
std::shared_ptr<utl::TempFile> reload( const OUString& rFileName );
|
||||
uno::Sequence < OUString > getImpressChartColumnDescriptions( const OUString& pDir, const char* pName );
|
||||
uno::Sequence < OUString > getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName );
|
||||
OUString getFileExtension( const OUString& rFileName );
|
||||
|
||||
uno::Reference< chart::XChartDocument > getChartDocFromImpress( const OUString& pDir, const char* pName );
|
||||
uno::Reference< chart::XChartDocument > getChartDocFromImpress( std::u16string_view pDir, const char* pName );
|
||||
|
||||
uno::Reference<chart::XChartDocument> getChartDocFromDrawImpress( sal_Int32 nPage, sal_Int32 nShape );
|
||||
|
||||
@ -101,7 +102,7 @@ OUString ChartTest::getFileExtension( const OUString& aFileName )
|
||||
return aFileName.copy(nDotLocation+1); // Skip the dot.
|
||||
}
|
||||
|
||||
void ChartTest::load( const OUString& aDir, const OUString& aName )
|
||||
void ChartTest::load( std::u16string_view aDir, const OUString& aName )
|
||||
{
|
||||
OUString extension = getFileExtension(aName);
|
||||
if (extension == "ods" || extension == "xlsx" || extension == "fods")
|
||||
@ -476,7 +477,7 @@ std::vector<uno::Sequence<uno::Any> > getDataSeriesLabelsFromChartType( const Re
|
||||
return aRet;
|
||||
}
|
||||
|
||||
uno::Reference< chart::XChartDocument > ChartTest::getChartDocFromImpress( const OUString& pDir, const char* pName )
|
||||
uno::Reference< chart::XChartDocument > ChartTest::getChartDocFromImpress( std::u16string_view pDir, const char* pName )
|
||||
{
|
||||
mxComponent = loadFromDesktop(m_directories.getURLFromSrc(pDir) + OUString::createFromAscii(pName), "com.sun.star.comp.Draw.PresentationDocument");
|
||||
uno::Reference< drawing::XDrawPagesSupplier > xDoc(mxComponent, uno::UNO_QUERY_THROW );
|
||||
@ -538,7 +539,7 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromWriter( sal_Int3
|
||||
return xChartDoc;
|
||||
}
|
||||
|
||||
uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions( const OUString& pDir, const char* pName )
|
||||
uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName )
|
||||
{
|
||||
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromImpress( pDir, pName );
|
||||
uno::Reference< chart::XChartDataArray > xChartData ( xChartDoc->getData(), uno::UNO_QUERY_THROW);
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
private:
|
||||
void compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference = false);
|
||||
void compareAgainstReference(std::u16string_view rReferenceFile, bool bCreateReference = false);
|
||||
OUString getXShapeDumpString();
|
||||
xmlDocUniquePtr getXShapeDumpXmlDoc();
|
||||
};
|
||||
@ -76,13 +76,13 @@ xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc()
|
||||
return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
|
||||
}
|
||||
|
||||
void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile,
|
||||
void Chart2XShapeTest::compareAgainstReference(std::u16string_view rReferenceFile,
|
||||
bool bCreateReference)
|
||||
{
|
||||
OUString aDump = getXShapeDumpString();
|
||||
|
||||
OUString aReference
|
||||
= m_directories.getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
|
||||
OUString aReference = m_directories.getPathFromSrc(u"/chart2/qa/extras/xshape/data/reference/")
|
||||
+ rReferenceFile;
|
||||
if (bCreateReference)
|
||||
{
|
||||
OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8);
|
||||
@ -120,8 +120,8 @@ void Chart2XShapeTest::testPieChartLabels1()
|
||||
return;
|
||||
|
||||
// inside placement for the best fit case
|
||||
load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-1.xlsx");
|
||||
compareAgainstReference("tdf90839-1.xml");
|
||||
load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-1.xlsx");
|
||||
compareAgainstReference(u"tdf90839-1.xml");
|
||||
}
|
||||
|
||||
void Chart2XShapeTest::testPieChartLabels2()
|
||||
@ -132,8 +132,8 @@ void Chart2XShapeTest::testPieChartLabels2()
|
||||
return;
|
||||
|
||||
// text wrap: wrap all text labels except one
|
||||
load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-2.xlsx");
|
||||
compareAgainstReference("tdf90839-2.xml");
|
||||
load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-2.xlsx");
|
||||
compareAgainstReference(u"tdf90839-2.xml");
|
||||
}
|
||||
|
||||
void Chart2XShapeTest::testPieChartLabels3()
|
||||
@ -144,8 +144,8 @@ void Chart2XShapeTest::testPieChartLabels3()
|
||||
return;
|
||||
|
||||
// text wrap: wrap no text label except one
|
||||
load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-3.xlsx");
|
||||
compareAgainstReference("tdf90839-3.xml");
|
||||
load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-3.xlsx");
|
||||
compareAgainstReference(u"tdf90839-3.xml");
|
||||
}
|
||||
|
||||
void Chart2XShapeTest::testPieChartLabels4()
|
||||
@ -156,8 +156,8 @@ void Chart2XShapeTest::testPieChartLabels4()
|
||||
return;
|
||||
|
||||
// data value and percent value are centered horizontally
|
||||
load("chart2/qa/extras/xshape/data/ods/", "tdf90839-4.ods");
|
||||
compareAgainstReference("tdf90839-4.xml");
|
||||
load(u"chart2/qa/extras/xshape/data/ods/", "tdf90839-4.ods");
|
||||
compareAgainstReference(u"tdf90839-4.xml");
|
||||
}
|
||||
|
||||
void Chart2XShapeTest::testTdf76649TrendLineBug()
|
||||
@ -165,7 +165,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
|
||||
// This bug prevents that the trendline (regression curve) is drawn
|
||||
// if the first cell is empty. See tdf#76649 for details.
|
||||
|
||||
load("chart2/qa/extras/xshape/data/ods/", "tdf76649_TrendLineBug.ods");
|
||||
load(u"chart2/qa/extras/xshape/data/ods/", "tdf76649_TrendLineBug.ods");
|
||||
|
||||
xmlDocUniquePtr pXmlDoc = getXShapeDumpXmlDoc();
|
||||
|
||||
@ -176,7 +176,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
|
||||
|
||||
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
|
||||
{
|
||||
load("chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
|
||||
load(u"chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
|
||||
uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 6);
|
||||
uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
|
||||
OUString rDump = xDumper->dump();
|
||||
|
@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> Chart2DialogsTest::createDialogByID(sal_uInt32 /*nID*/
|
||||
void Chart2DialogsTest::openAnyDialog()
|
||||
{
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("chart2/qa/unit/data/chart2-dialogs-test.txt");
|
||||
processDialogBatchFile(u"chart2/qa/unit/data/chart2-dialogs-test.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2DialogsTest);
|
||||
|
@ -18,6 +18,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "TitleHelper.hxx"
|
||||
#include "charttoolsdllapi.hxx"
|
||||
|
||||
@ -177,7 +181,7 @@ public:
|
||||
, const OUString& rSeriesParticle
|
||||
, const OUString& rDragMethodServiceName = OUString()
|
||||
, const OUString& rDragParameterString = OUString() );
|
||||
static OUString createPointCID( const OUString& rPointCID_Stub, sal_Int32 nIndex );
|
||||
static OUString createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex );
|
||||
|
||||
static OUString createDataCurveCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
|
||||
static OUString createDataCurveEquationCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex );
|
||||
|
@ -1124,7 +1124,7 @@ OUString ObjectIdentifier::createSeriesSubObjectStub( ObjectType eSubObjectType
|
||||
, rDragMethodServiceName, rDragParameterString );
|
||||
}
|
||||
|
||||
OUString ObjectIdentifier::createPointCID( const OUString& rPointCID_Stub, sal_Int32 nIndex )
|
||||
OUString ObjectIdentifier::createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex )
|
||||
{
|
||||
return rPointCID_Stub + OUString::number( nIndex );
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ codemaker::UnoType::Sort TypeManager::getSort(
|
||||
}
|
||||
|
||||
codemaker::UnoType::Sort TypeManager::decompose(
|
||||
OUString const & name, bool resolveTypedefs, OUString * nucleus,
|
||||
std::u16string_view name, bool resolveTypedefs, OUString * nucleus,
|
||||
sal_Int32 * rank, std::vector< OUString > * arguments,
|
||||
rtl::Reference< unoidl::Entity > * entity) const
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ OString translateUnoToCppType(
|
||||
}
|
||||
|
||||
OString translateUnoToCppIdentifier(
|
||||
OString const & unoIdentifier, OString const & prefix,
|
||||
OString const & unoIdentifier, std::string_view prefix,
|
||||
IdentifierTranslationMode transmode, OString const * forbidden)
|
||||
{
|
||||
if (// Keywords:
|
||||
@ -287,7 +287,7 @@ OString translateUnoToCppIdentifier(
|
||||
|| unoIdentifier == "NDEBUG"
|
||||
|| (forbidden != nullptr && unoIdentifier == *forbidden) )
|
||||
{
|
||||
return prefix + "_" + unoIdentifier;
|
||||
return OString::Concat(prefix) + "_" + unoIdentifier;
|
||||
} else {
|
||||
return unoIdentifier;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ OString translateUnoToJavaType(
|
||||
}
|
||||
|
||||
OString translateUnoToJavaIdentifier(
|
||||
OString const & identifier, OString const & prefix)
|
||||
OString const & identifier, std::string_view prefix)
|
||||
{
|
||||
if (identifier == "abstract"
|
||||
|| identifier == "assert" // since Java 1.4
|
||||
@ -124,7 +124,7 @@ OString translateUnoToJavaIdentifier(
|
||||
|| identifier == "volatile"
|
||||
|| identifier == "while")
|
||||
{
|
||||
return prefix + "_" + identifier;
|
||||
return OString::Concat(prefix) + "_" + identifier;
|
||||
} else {
|
||||
return identifier;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ public:
|
||||
void dump(CppuOptions const & options);
|
||||
|
||||
void dumpFile(
|
||||
std::u16string_view uri, OUString const & name, bool hpp,
|
||||
std::u16string_view uri, std::u16string_view name, bool hpp,
|
||||
CppuOptions const & options);
|
||||
|
||||
void dumpDependedTypes(
|
||||
@ -178,7 +178,7 @@ public:
|
||||
|
||||
virtual void dumpHppFile(FileStream& o, codemaker::cppumaker::Includes & includes) = 0;
|
||||
|
||||
OUString dumpHeaderDefine(FileStream& o, OUString const & extension) const;
|
||||
OUString dumpHeaderDefine(FileStream& o, std::u16string_view extension) const;
|
||||
|
||||
void dumpGetCppuType(FileStream & out);
|
||||
|
||||
@ -193,14 +193,14 @@ public:
|
||||
}
|
||||
|
||||
void dumpType(
|
||||
FileStream & out, OUString const & name, bool isConst = false,
|
||||
FileStream & out, std::u16string_view name, bool isConst = false,
|
||||
bool isRef = false, bool native = false, bool cppuUnoType = false)
|
||||
const;
|
||||
|
||||
OUString getTypeClass(OUString const & name, bool cStyle = false);
|
||||
|
||||
void dumpCppuGetType(
|
||||
FileStream & out, OUString const & name, OUString const * ownName = nullptr) const;
|
||||
FileStream & out, std::u16string_view name, OUString const * ownName = nullptr) const;
|
||||
|
||||
sal_uInt32 getInheritedMemberCount();
|
||||
|
||||
@ -253,7 +253,7 @@ protected:
|
||||
void addDefaultHxxIncludes(codemaker::cppumaker::Includes & includes) const;
|
||||
|
||||
void dumpInitializer(
|
||||
FileStream & out, bool parameterized, OUString const & name) const;
|
||||
FileStream & out, bool parameterized, std::u16string_view name) const;
|
||||
|
||||
void dumpHFileContent(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes);
|
||||
@ -413,14 +413,14 @@ void CppuType::dump(CppuOptions const & options)
|
||||
}
|
||||
|
||||
void CppuType::dumpFile(
|
||||
std::u16string_view uri, OUString const & name, bool hpp,
|
||||
std::u16string_view uri, std::u16string_view name, bool hpp,
|
||||
CppuOptions const & options)
|
||||
{
|
||||
OUString fileUri(
|
||||
b2u(createFileNameFromType(
|
||||
u2b(uri), u2b(name), hpp ? ".hpp" : ".hdl")));
|
||||
if (fileUri.isEmpty()) {
|
||||
throw CannotDumpException("empty target URI for entity " + name);
|
||||
throw CannotDumpException(OUString::Concat("empty target URI for entity ") + name);
|
||||
}
|
||||
bool exists = fileExists(u2b(fileUri));
|
||||
if (exists && options.isValid("-G")) {
|
||||
@ -468,7 +468,7 @@ void CppuType::dumpDependedTypes(
|
||||
}
|
||||
|
||||
OUString CppuType::dumpHeaderDefine(
|
||||
FileStream & out, OUString const & extension) const
|
||||
FileStream & out, std::u16string_view extension) const
|
||||
{
|
||||
OUString def(
|
||||
"INCLUDED_" + name_.replace('.', '_').toAsciiUpperCase() + "_"
|
||||
@ -500,7 +500,7 @@ const
|
||||
}
|
||||
|
||||
void CppuType::dumpInitializer(
|
||||
FileStream & out, bool parameterized, OUString const & name) const
|
||||
FileStream & out, bool parameterized, std::u16string_view name) const
|
||||
{
|
||||
out << "(";
|
||||
if (!parameterized) {
|
||||
@ -541,7 +541,7 @@ void CppuType::dumpInitializer(
|
||||
break;
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected entity \"" + name
|
||||
OUString::Concat("unexpected entity \"") + name
|
||||
+ "\" in call to CppuType::dumpInitializer");
|
||||
}
|
||||
}
|
||||
@ -553,7 +553,7 @@ void CppuType::dumpHFileContent(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
addDefaultHIncludes(includes);
|
||||
dumpHeaderDefine(out, "HDL");
|
||||
dumpHeaderDefine(out, u"HDL");
|
||||
out << "\n";
|
||||
includes.dump(out, nullptr, false);
|
||||
// 'exceptions = false' would be wrong for services/singletons, but
|
||||
@ -746,7 +746,7 @@ OUString CppuType::getTypeClass(OUString const & name, bool cStyle)
|
||||
}
|
||||
|
||||
void CppuType::dumpType(
|
||||
FileStream & out, OUString const & name, bool isConst, bool isRef,
|
||||
FileStream & out, std::u16string_view name, bool isConst, bool isRef,
|
||||
bool native, bool cppuUnoType) const
|
||||
{
|
||||
sal_Int32 k;
|
||||
@ -838,7 +838,7 @@ void CppuType::dumpType(
|
||||
break;
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected entity \"" + name + "\" in call to CppuType::dumpType");
|
||||
OUString::Concat("unexpected entity \"") + name + "\" in call to CppuType::dumpType");
|
||||
}
|
||||
for (sal_Int32 i = 0; i != k; ++i) {
|
||||
out << " >";
|
||||
@ -849,7 +849,7 @@ void CppuType::dumpType(
|
||||
}
|
||||
|
||||
void CppuType::dumpCppuGetType(
|
||||
FileStream & out, OUString const & name, OUString const * ownName) const
|
||||
FileStream & out, std::u16string_view name, OUString const * ownName) const
|
||||
{
|
||||
//TODO: What are these calls good for?
|
||||
OUString nucleus;
|
||||
@ -890,7 +890,7 @@ void CppuType::dumpCppuGetType(
|
||||
for (;;) std::abort(); // this cannot happen
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected entity \"" + name
|
||||
OUString::Concat("unexpected entity \"") + name
|
||||
+ "\" in call to CppuType::dumpCppuGetType");
|
||||
}
|
||||
}
|
||||
@ -1182,7 +1182,7 @@ void InterfaceType::dumpDeclaration(FileStream & out)
|
||||
void InterfaceType::dumpHppFile(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(out, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
|
||||
out << "\n";
|
||||
addDefaultHxxIncludes(includes);
|
||||
includes.dump(out, &name_, !(m_cppuTypeLeak || m_cppuTypeDynamic));
|
||||
@ -1376,7 +1376,7 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out)
|
||||
std::set< OUString > seen;
|
||||
// Type for RuntimeException is always needed:
|
||||
seen.insert("com.sun.star.uno.RuntimeException");
|
||||
dumpCppuGetType(out, "com.sun.star.uno.RuntimeException");
|
||||
dumpCppuGetType(out, u"com.sun.star.uno.RuntimeException");
|
||||
dumpAttributesCppuDecl(out, &seen);
|
||||
dumpMethodsCppuDecl(out, &seen);
|
||||
if (count != 0) {
|
||||
@ -1651,7 +1651,7 @@ private:
|
||||
void ConstantGroup::dumpHdlFile(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(out, "HDL"));
|
||||
OUString headerDefine(dumpHeaderDefine(out, u"HDL"));
|
||||
out << "\n";
|
||||
addDefaultHIncludes(includes);
|
||||
includes.dump(out, nullptr, true);
|
||||
@ -1671,7 +1671,7 @@ void ConstantGroup::dumpHdlFile(
|
||||
void ConstantGroup::dumpHppFile(
|
||||
FileStream & out, codemaker::cppumaker::Includes &)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(out, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
|
||||
out << "\n";
|
||||
codemaker::cppumaker::Includes::dumpInclude(out, u2b(name_), false);
|
||||
out << "\n#endif // "<< headerDefine << "\n";
|
||||
@ -1867,7 +1867,7 @@ void PlainStructType::dumpDeclaration(FileStream & out)
|
||||
void PlainStructType::dumpHppFile(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(out, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
|
||||
out << "\n";
|
||||
includes.dump(out, &name_, true);
|
||||
out << "\n";
|
||||
@ -2259,7 +2259,7 @@ void PolyStructType::dumpDeclaration(FileStream & out)
|
||||
void PolyStructType::dumpHppFile(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(out, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
|
||||
out << "\n";
|
||||
includes.dump(out, &name_, true);
|
||||
out << "\n";
|
||||
@ -2811,7 +2811,7 @@ void ExceptionType::addComprehensiveGetCppuTypeIncludes(
|
||||
void ExceptionType::dumpHppFile(
|
||||
FileStream & out, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(out, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
|
||||
out << "\n";
|
||||
addDefaultHxxIncludes(includes);
|
||||
includes.dump(out, &name_, true);
|
||||
@ -3321,7 +3321,7 @@ void EnumType::dumpDeclaration(FileStream& o)
|
||||
void EnumType::dumpHppFile(
|
||||
FileStream& o, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(o, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
|
||||
o << "\n";
|
||||
|
||||
addDefaultHxxIncludes(includes);
|
||||
@ -3455,7 +3455,7 @@ private:
|
||||
void Typedef::dumpHdlFile(
|
||||
FileStream& o, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(o, "HDL"));
|
||||
OUString headerDefine(dumpHeaderDefine(o, u"HDL"));
|
||||
o << "\n";
|
||||
|
||||
addDefaultHIncludes(includes);
|
||||
@ -3485,7 +3485,7 @@ void Typedef::dumpDeclaration(FileStream& o)
|
||||
void Typedef::dumpHppFile(
|
||||
FileStream& o, codemaker::cppumaker::Includes & includes)
|
||||
{
|
||||
OUString headerDefine(dumpHeaderDefine(o, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
|
||||
o << "\n";
|
||||
|
||||
addDefaultHxxIncludes(includes);
|
||||
@ -3607,7 +3607,7 @@ void ServiceType::dumpHppFile(
|
||||
OString cppName(
|
||||
codemaker::cpp::translateUnoToCppIdentifier(
|
||||
u2b(id_), "service", isGlobal()));
|
||||
OUString headerDefine(dumpHeaderDefine(o, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
|
||||
o << "\n";
|
||||
includes.dump(o, nullptr, true);
|
||||
if (!entity_->getConstructors().empty()) {
|
||||
@ -3903,7 +3903,7 @@ void SingletonType::dumpHppFile(
|
||||
u2b(id_), "singleton", isGlobal()));
|
||||
OString baseName(u2b(entity_->getBase()));
|
||||
OString scopedBaseName(codemaker::cpp::scopedCppName(baseName));
|
||||
OUString headerDefine(dumpHeaderDefine(o, "HPP"));
|
||||
OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
|
||||
o << "\n";
|
||||
//TODO: Decide whether the types added to includes should rather be added to
|
||||
// m_dependencies (and thus be generated during dumpDependedTypes):
|
||||
|
@ -102,7 +102,7 @@ Dependencies::Dependencies(
|
||||
if (!(ent2->getDirectAttributes().empty()
|
||||
&& ent2->getDirectMethods().empty()))
|
||||
{
|
||||
insert("com.sun.star.uno.RuntimeException", KIND_EXCEPTION);
|
||||
insert(u"com.sun.star.uno.RuntimeException", KIND_EXCEPTION);
|
||||
}
|
||||
for (const unoidl::InterfaceTypeEntity::Attribute& attr : ent2->getDirectAttributes())
|
||||
{
|
||||
@ -212,7 +212,7 @@ Dependencies::Dependencies(
|
||||
|
||||
Dependencies::~Dependencies() {}
|
||||
|
||||
void Dependencies::insert(OUString const & name, Kind kind) {
|
||||
void Dependencies::insert(std::u16string_view name, Kind kind) {
|
||||
sal_Int32 k;
|
||||
std::vector< OString > args;
|
||||
OUString n(b2u(UnoType::decompose(u2b(name), &k, &args)));
|
||||
@ -286,7 +286,7 @@ void Dependencies::insert(OUString const & name, Kind kind) {
|
||||
}
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected type \"" + name
|
||||
OUString::Concat("unexpected type \"") + name
|
||||
+ "\" in call to codemaker::cppumaker::Dependencies::Dependencies");
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <map>
|
||||
#include <string_view>
|
||||
|
||||
#include <rtl/ref.hxx>
|
||||
|
||||
@ -100,7 +101,7 @@ public:
|
||||
bool hasSequenceDependency() const { return m_sequenceDependency; }
|
||||
|
||||
private:
|
||||
void insert(OUString const & name, Kind kind);
|
||||
void insert(std::u16string_view name, Kind kind);
|
||||
|
||||
rtl::Reference< TypeManager > m_manager;
|
||||
Map m_map;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@ -107,7 +108,7 @@ bool isSpecialType(SpecialType special) {
|
||||
}
|
||||
|
||||
OString translateUnoidlEntityNameToJavaFullyQualifiedName(
|
||||
OUString const & name, OString const & prefix)
|
||||
OUString const & name, std::string_view prefix)
|
||||
{
|
||||
assert(!name.startsWith("[]"));
|
||||
assert(name.indexOf('<') == -1);
|
||||
@ -126,7 +127,7 @@ struct PolymorphicUnoType {
|
||||
};
|
||||
|
||||
SpecialType translateUnoTypeToDescriptor(
|
||||
rtl::Reference< TypeManager > const & manager, OUString const & type,
|
||||
rtl::Reference< TypeManager > const & manager, std::u16string_view type,
|
||||
bool array, bool classType, std::set<OUString> * dependencies,
|
||||
OStringBuffer * descriptor, OStringBuffer * signature,
|
||||
bool * needsSignature, PolymorphicUnoType * polymorphicUnoType);
|
||||
@ -272,7 +273,7 @@ SpecialType translateUnoTypeToDescriptor(
|
||||
}
|
||||
|
||||
SpecialType translateUnoTypeToDescriptor(
|
||||
rtl::Reference< TypeManager > const & manager, OUString const & type,
|
||||
rtl::Reference< TypeManager > const & manager, std::u16string_view type,
|
||||
bool array, bool classType, std::set<OUString> * dependencies,
|
||||
OStringBuffer * descriptor, OStringBuffer * signature,
|
||||
bool * needsSignature, PolymorphicUnoType * polymorphicUnoType)
|
||||
@ -290,7 +291,7 @@ SpecialType translateUnoTypeToDescriptor(
|
||||
|
||||
SpecialType getFieldDescriptor(
|
||||
rtl::Reference< TypeManager > const & manager, std::set<OUString> * dependencies,
|
||||
OUString const & type, OString * descriptor, OString * signature,
|
||||
std::u16string_view type, OString * descriptor, OString * signature,
|
||||
PolymorphicUnoType * polymorphicUnoType)
|
||||
{
|
||||
assert(descriptor != nullptr);
|
||||
@ -315,12 +316,12 @@ class MethodDescriptor {
|
||||
public:
|
||||
MethodDescriptor(
|
||||
rtl::Reference< TypeManager > const & manager,
|
||||
std::set<OUString> * dependencies, OUString const & returnType,
|
||||
std::set<OUString> * dependencies, std::u16string_view returnType,
|
||||
SpecialType * specialReturnType,
|
||||
PolymorphicUnoType * polymorphicUnoType);
|
||||
|
||||
SpecialType addParameter(
|
||||
OUString const & type, bool array, bool dependency,
|
||||
std::u16string_view type, bool array, bool dependency,
|
||||
PolymorphicUnoType * polymorphicUnoType);
|
||||
|
||||
void addTypeParameter(OUString const & name);
|
||||
@ -341,7 +342,7 @@ private:
|
||||
|
||||
MethodDescriptor::MethodDescriptor(
|
||||
rtl::Reference< TypeManager > const & manager, std::set<OUString> * dependencies,
|
||||
OUString const & returnType, SpecialType * specialReturnType,
|
||||
std::u16string_view returnType, SpecialType * specialReturnType,
|
||||
PolymorphicUnoType * polymorphicUnoType):
|
||||
m_manager(manager), m_dependencies(dependencies), m_needsSignature(false)
|
||||
{
|
||||
@ -363,7 +364,7 @@ MethodDescriptor::MethodDescriptor(
|
||||
}
|
||||
|
||||
SpecialType MethodDescriptor::addParameter(
|
||||
OUString const & type, bool array, bool dependency,
|
||||
std::u16string_view type, bool array, bool dependency,
|
||||
PolymorphicUnoType * polymorphicUnoType)
|
||||
{
|
||||
return translateUnoTypeToDescriptor(
|
||||
@ -845,7 +846,7 @@ void addField(
|
||||
|
||||
sal_uInt16 addFieldInit(
|
||||
rtl::Reference< TypeManager > const & manager, OString const & className,
|
||||
OUString const & fieldName, bool typeParameter, OUString const & fieldType,
|
||||
OUString const & fieldName, bool typeParameter, std::u16string_view fieldType,
|
||||
std::set<OUString> * dependencies, ClassFile::Code * code)
|
||||
{
|
||||
assert(manager.is());
|
||||
@ -931,7 +932,7 @@ sal_uInt16 addFieldInit(
|
||||
for (;;) std::abort(); // this cannot happen
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected entity \"" + fieldType
|
||||
OUString::Concat("unexpected entity \"") + fieldType
|
||||
+ "\" in call to addFieldInit");
|
||||
}
|
||||
}
|
||||
@ -965,7 +966,7 @@ sal_uInt16 addFieldInit(
|
||||
|
||||
sal_uInt16 addLoadLocal(
|
||||
rtl::Reference< TypeManager > const & manager, ClassFile::Code * code,
|
||||
sal_uInt16 * index, bool typeParameter, OUString const & type, bool any,
|
||||
sal_uInt16 * index, bool typeParameter, std::u16string_view type, bool any,
|
||||
std::set<OUString> * dependencies)
|
||||
{
|
||||
assert(manager.is());
|
||||
@ -1234,7 +1235,7 @@ sal_uInt16 addLoadLocal(
|
||||
for (;;) std::abort(); // this cannot happen
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected entity \"" + type
|
||||
OUString::Concat("unexpected entity \"") + type
|
||||
+ "\" in call to addLoadLocal");
|
||||
}
|
||||
} else {
|
||||
@ -1272,7 +1273,7 @@ sal_uInt16 addLoadLocal(
|
||||
for (;;) std::abort(); // this cannot happen
|
||||
default:
|
||||
throw CannotDumpException(
|
||||
"unexpected entity \"" + type
|
||||
OUString::Concat("unexpected entity \"") + type
|
||||
+ "\" in call to addLoadLocal");
|
||||
}
|
||||
}
|
||||
@ -1404,7 +1405,7 @@ void handlePlainStructType(
|
||||
cf->addMethod(
|
||||
ClassFile::ACC_PUBLIC, "<init>", "()V", code.get(),
|
||||
std::vector< OString >(), "");
|
||||
MethodDescriptor desc(manager, dependencies, "void", nullptr, nullptr);
|
||||
MethodDescriptor desc(manager, dependencies, u"void", nullptr, nullptr);
|
||||
code = cf->newCode();
|
||||
code->loadLocalReference(0);
|
||||
sal_uInt16 index2 = 1;
|
||||
@ -1495,7 +1496,7 @@ void handlePolyStructType(
|
||||
cf->addMethod(
|
||||
ClassFile::ACC_PUBLIC, "<init>", "()V", code.get(),
|
||||
std::vector< OString >(), "");
|
||||
MethodDescriptor desc(manager, dependencies, "void", nullptr, nullptr);
|
||||
MethodDescriptor desc(manager, dependencies, u"void", nullptr, nullptr);
|
||||
code = cf->newCode();
|
||||
code->loadLocalReference(0);
|
||||
sal_uInt16 index2 = 1;
|
||||
@ -1611,7 +1612,7 @@ void handleExceptionType(
|
||||
stack,
|
||||
addFieldInit(
|
||||
manager, className, "Context", false,
|
||||
"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
u"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
}
|
||||
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
|
||||
entity->getDirectMembers().begin());
|
||||
@ -1643,7 +1644,7 @@ void handleExceptionType(
|
||||
stack,
|
||||
addFieldInit(
|
||||
manager, className, "Context", false,
|
||||
"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
u"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
}
|
||||
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
|
||||
entity->getDirectMembers().begin());
|
||||
@ -1681,7 +1682,7 @@ void handleExceptionType(
|
||||
stack,
|
||||
addFieldInit(
|
||||
manager, className, "Context", false,
|
||||
"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
u"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
}
|
||||
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
|
||||
entity->getDirectMembers().begin());
|
||||
@ -1712,7 +1713,7 @@ void handleExceptionType(
|
||||
stack,
|
||||
addFieldInit(
|
||||
manager, className, "Context", false,
|
||||
"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
u"com.sun.star.uno.XInterface", dependencies, code.get()));
|
||||
}
|
||||
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
|
||||
entity->getDirectMembers().begin());
|
||||
@ -1734,12 +1735,12 @@ void handleExceptionType(
|
||||
|
||||
|
||||
// create (String Message, Object Context, T1 m1, ..., Tn mn) constructor
|
||||
MethodDescriptor desc1(manager, dependencies, "void", nullptr, nullptr);
|
||||
MethodDescriptor desc1(manager, dependencies, u"void", nullptr, nullptr);
|
||||
code = cf->newCode();
|
||||
code->loadLocalReference(0);
|
||||
sal_uInt16 index2 = 1;
|
||||
code->loadLocalReference(index2++);
|
||||
desc1.addParameter("string", false, true, nullptr);
|
||||
desc1.addParameter(u"string", false, true, nullptr);
|
||||
if (!(baseException || baseRuntimeException)) {
|
||||
addExceptionBaseArguments(
|
||||
manager, dependencies, &desc1, code.get(), entity->getDirectBase(),
|
||||
@ -1774,13 +1775,13 @@ void handleExceptionType(
|
||||
std::vector< OString >(), desc1.getSignature());
|
||||
|
||||
// create (Throwable Cause, String Message, Object Context, T1 m1, ..., Tn mn) constructor
|
||||
MethodDescriptor desc2(manager, dependencies, "void", nullptr, nullptr);
|
||||
MethodDescriptor desc2(manager, dependencies, u"void", nullptr, nullptr);
|
||||
code = cf->newCode();
|
||||
code->loadLocalReference(0);
|
||||
sal_uInt16 index3 = 3;
|
||||
// Note that we hack in the java.lang.Throwable parameter further down,
|
||||
// because MethodDescriptor does not know how to handle it.
|
||||
desc2.addParameter("string", false, true, nullptr);
|
||||
desc2.addParameter(u"string", false, true, nullptr);
|
||||
if (baseException || baseRuntimeException) {
|
||||
code->loadLocalReference(2);
|
||||
code->loadLocalReference(1);
|
||||
@ -1888,7 +1889,7 @@ void handleInterfaceType(
|
||||
"get" + attrName, gdesc.getDescriptor(), nullptr, exc,
|
||||
gdesc.getSignature());
|
||||
if (!attr.readOnly) {
|
||||
MethodDescriptor sdesc(manager, dependencies, "void", nullptr, nullptr);
|
||||
MethodDescriptor sdesc(manager, dependencies, u"void", nullptr, nullptr);
|
||||
sdesc.addParameter(attr.type, false, true, nullptr);
|
||||
std::vector< OString > exc2;
|
||||
createExceptionsAttribute(
|
||||
@ -2079,7 +2080,7 @@ void addExceptionHandlers(
|
||||
|
||||
void addConstructor(
|
||||
rtl::Reference< TypeManager > const & manager,
|
||||
OString const & realJavaBaseName, OString const & unoName,
|
||||
std::string_view realJavaBaseName, OString const & unoName,
|
||||
OString const & className,
|
||||
unoidl::SingleInterfaceBasedServiceEntity::Constructor const & constructor,
|
||||
OUString const & returnType, std::set<OUString> * dependencies,
|
||||
@ -2088,7 +2089,7 @@ void addConstructor(
|
||||
assert(dependencies != nullptr);
|
||||
assert(classFile != nullptr);
|
||||
MethodDescriptor desc(manager, dependencies, returnType, nullptr, nullptr);
|
||||
desc.addParameter("com.sun.star.uno.XComponentContext", false, false, nullptr);
|
||||
desc.addParameter(u"com.sun.star.uno.XComponentContext", false, false, nullptr);
|
||||
std::unique_ptr< ClassFile::Code > code(classFile->newCode());
|
||||
code->loadLocalReference(0);
|
||||
// stack: context
|
||||
@ -2123,7 +2124,7 @@ void addConstructor(
|
||||
if (constructor.parameters.size() == 1
|
||||
&& constructor.parameters[0].rest)
|
||||
{
|
||||
desc.addParameter("any", true, true, nullptr);
|
||||
desc.addParameter(u"any", true, true, nullptr);
|
||||
code->loadLocalReference(localIndex++);
|
||||
// stack: factory serviceName args
|
||||
stack = 4;
|
||||
@ -2345,7 +2346,7 @@ void handleSingleton(
|
||||
| ClassFile::ACC_SUPER),
|
||||
className, "java/lang/Object", ""));
|
||||
MethodDescriptor desc(manager, dependencies, entity->getBase(), nullptr, nullptr);
|
||||
desc.addParameter("com.sun.star.uno.XComponentContext", false, false, nullptr);
|
||||
desc.addParameter(u"com.sun.star.uno.XComponentContext", false, false, nullptr);
|
||||
std::unique_ptr< ClassFile::Code > code(cf->newCode());
|
||||
code->loadLocalReference(0);
|
||||
// stack: context
|
||||
|
@ -142,7 +142,8 @@ bool DirectoryHelper::deleteDirRecursively(const OUString& rDirURL)
|
||||
}
|
||||
|
||||
// both exist, move content
|
||||
bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL, const OUString& rTargetDirURL,
|
||||
bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL,
|
||||
std::u16string_view rTargetDirURL,
|
||||
const std::set<OUString>& rExcludeList)
|
||||
{
|
||||
std::set<OUString> aDirs;
|
||||
@ -161,7 +162,7 @@ bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL, const OUStri
|
||||
|
||||
if (dirExists(aNewSourceDirURL))
|
||||
{
|
||||
const OUString aNewTargetDirURL(rTargetDirURL + "/" + dir);
|
||||
const OUString aNewTargetDirURL(OUString::Concat(rTargetDirURL) + "/" + dir);
|
||||
|
||||
if (dirExists(aNewTargetDirURL))
|
||||
{
|
||||
@ -185,7 +186,7 @@ bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL, const OUStri
|
||||
|
||||
if (fileExists(aSourceFileURL))
|
||||
{
|
||||
OUString aTargetFileURL(rTargetDirURL + "/" + file.first);
|
||||
OUString aTargetFileURL(OUString::Concat(rTargetDirURL) + "/" + file.first);
|
||||
|
||||
if (!file.second.isEmpty())
|
||||
{
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include <zlib.h>
|
||||
|
||||
@ -172,30 +173,31 @@ namespace
|
||||
return osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(rSource.getStr()), nLength, &nBaseWritten) && nLength == nBaseWritten;
|
||||
}
|
||||
|
||||
OUString createFileURL(const OUString& rURL, const OUString& rName, const OUString& rExt)
|
||||
OUString createFileURL(
|
||||
std::u16string_view rURL, std::u16string_view rName, std::u16string_view rExt)
|
||||
{
|
||||
OUString aRetval;
|
||||
|
||||
if (!rURL.isEmpty() && !rName.isEmpty())
|
||||
if (!rURL.empty() && !rName.empty())
|
||||
{
|
||||
aRetval = rURL + "/" + rName;
|
||||
aRetval = OUString::Concat(rURL) + "/" + rName;
|
||||
|
||||
if (!rExt.isEmpty())
|
||||
if (!rExt.empty())
|
||||
{
|
||||
aRetval += "." + rExt;
|
||||
aRetval += OUString::Concat(".") + rExt;
|
||||
}
|
||||
}
|
||||
|
||||
return aRetval;
|
||||
}
|
||||
|
||||
OUString createPackURL(const OUString& rURL, const OUString& rName)
|
||||
OUString createPackURL(std::u16string_view rURL, std::u16string_view rName)
|
||||
{
|
||||
OUString aRetval;
|
||||
|
||||
if (!rURL.isEmpty() && !rName.isEmpty())
|
||||
if (!rURL.empty() && !rName.empty())
|
||||
{
|
||||
aRetval = rURL + "/" + rName + ".pack";
|
||||
aRetval = OUString::Concat(rURL) + "/" + rName + ".pack";
|
||||
}
|
||||
|
||||
return aRetval;
|
||||
@ -479,21 +481,24 @@ namespace
|
||||
}
|
||||
|
||||
public:
|
||||
void createUserExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
|
||||
void createUserExtensionRegistryEntriesFromXML(std::u16string_view rUserConfigWorkURL)
|
||||
{
|
||||
const OUString aPath(rUserConfigWorkURL + "/uno_packages/cache" + gaRegPath);
|
||||
const OUString aPath(
|
||||
OUString::Concat(rUserConfigWorkURL) + "/uno_packages/cache" + gaRegPath);
|
||||
createExtensionRegistryEntriesFromXML(aPath);
|
||||
}
|
||||
|
||||
void createSharedExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
|
||||
void createSharedExtensionRegistryEntriesFromXML(std::u16string_view rUserConfigWorkURL)
|
||||
{
|
||||
const OUString aPath(rUserConfigWorkURL + "/extensions/shared" + gaRegPath);
|
||||
const OUString aPath(
|
||||
OUString::Concat(rUserConfigWorkURL) + "/extensions/shared" + gaRegPath);
|
||||
createExtensionRegistryEntriesFromXML(aPath);
|
||||
}
|
||||
|
||||
void createBundledExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
|
||||
void createBundledExtensionRegistryEntriesFromXML(std::u16string_view rUserConfigWorkURL)
|
||||
{
|
||||
const OUString aPath(rUserConfigWorkURL + "/extensions/bundled" + gaRegPath);
|
||||
const OUString aPath(
|
||||
OUString::Concat(rUserConfigWorkURL) + "/extensions/bundled" + gaRegPath);
|
||||
createExtensionRegistryEntriesFromXML(aPath);
|
||||
}
|
||||
|
||||
@ -657,7 +662,7 @@ namespace
|
||||
|
||||
public:
|
||||
static void changeEnableDisableStateInXML(
|
||||
const OUString& rUserConfigWorkURL,
|
||||
std::u16string_view rUserConfigWorkURL,
|
||||
const ExtensionInfoEntryVector& rToBeEnabled,
|
||||
const ExtensionInfoEntryVector& rToBeDisabled)
|
||||
{
|
||||
@ -665,7 +670,7 @@ namespace
|
||||
const OUString aRegPathBack(".PackageRegistryBackend/backenddb.xml");
|
||||
// first appearance to check
|
||||
{
|
||||
const OUString aUnoPackagReg(rUserConfigWorkURL + aRegPathFront + "bundle" + aRegPathBack);
|
||||
const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "bundle" + aRegPathBack);
|
||||
|
||||
visitNodesXMLChangeOneCase(
|
||||
aUnoPackagReg,
|
||||
@ -676,7 +681,7 @@ namespace
|
||||
|
||||
// second appearance to check
|
||||
{
|
||||
const OUString aUnoPackagReg(rUserConfigWorkURL + aRegPathFront + "configuration" + aRegPathBack);
|
||||
const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "configuration" + aRegPathBack);
|
||||
|
||||
visitNodesXMLChangeOneCase(
|
||||
aUnoPackagReg,
|
||||
@ -687,7 +692,7 @@ namespace
|
||||
|
||||
// third appearance to check
|
||||
{
|
||||
const OUString aUnoPackagReg(rUserConfigWorkURL + aRegPathFront + "script" + aRegPathBack);
|
||||
const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "script" + aRegPathBack);
|
||||
|
||||
visitNodesXMLChangeOneCase(
|
||||
aUnoPackagReg,
|
||||
@ -2017,8 +2022,8 @@ namespace comphelper
|
||||
bool BackupFileHelper::tryPush_Files(
|
||||
const std::set< OUString >& rDirs,
|
||||
const std::set< std::pair< OUString, OUString > >& rFiles,
|
||||
const OUString& rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
std::u16string_view rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
)
|
||||
{
|
||||
bool bDidPush(false);
|
||||
@ -2037,7 +2042,7 @@ namespace comphelper
|
||||
// process dirs
|
||||
for (const auto& dir : rDirs)
|
||||
{
|
||||
OUString aNewSourceURL(rSourceURL + "/" + dir);
|
||||
OUString aNewSourceURL(OUString::Concat(rSourceURL) + "/" + dir);
|
||||
OUString aNewTargetURL(rTargetURL + "/" + dir);
|
||||
std::set< OUString > aNewDirs;
|
||||
std::set< std::pair< OUString, OUString > > aNewFiles;
|
||||
@ -2067,10 +2072,10 @@ namespace comphelper
|
||||
}
|
||||
|
||||
bool BackupFileHelper::tryPush_file(
|
||||
const OUString& rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL, // target dir without trailing '/'
|
||||
const OUString& rName, // filename
|
||||
const OUString& rExt // extension (or empty)
|
||||
std::u16string_view rSourceURL, // source dir without trailing '/'
|
||||
std::u16string_view rTargetURL, // target dir without trailing '/'
|
||||
std::u16string_view rName, // filename
|
||||
std::u16string_view rExt // extension (or empty)
|
||||
)
|
||||
{
|
||||
const OUString aFileURL(createFileURL(rSourceURL, rName, rExt));
|
||||
@ -2099,8 +2104,8 @@ namespace comphelper
|
||||
bool BackupFileHelper::isPopPossible_files(
|
||||
const std::set< OUString >& rDirs,
|
||||
const std::set< std::pair< OUString, OUString > >& rFiles,
|
||||
const OUString& rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
std::u16string_view rSourceURL, // source dir without trailing '/'
|
||||
std::u16string_view rTargetURL // target dir without trailing '/'
|
||||
)
|
||||
{
|
||||
bool bPopPossible(false);
|
||||
@ -2118,8 +2123,8 @@ namespace comphelper
|
||||
// process dirs
|
||||
for (const auto& dir : rDirs)
|
||||
{
|
||||
OUString aNewSourceURL(rSourceURL + "/" + dir);
|
||||
OUString aNewTargetURL(rTargetURL + "/" + dir);
|
||||
OUString aNewSourceURL(OUString::Concat(rSourceURL) + "/" + dir);
|
||||
OUString aNewTargetURL(OUString::Concat(rTargetURL) + "/" + dir);
|
||||
std::set< OUString > aNewDirs;
|
||||
std::set< std::pair< OUString, OUString > > aNewFiles;
|
||||
|
||||
@ -2142,10 +2147,10 @@ namespace comphelper
|
||||
}
|
||||
|
||||
bool BackupFileHelper::isPopPossible_file(
|
||||
const OUString& rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL, // target dir without trailing '/'
|
||||
const OUString& rName, // filename
|
||||
const OUString& rExt // extension (or empty)
|
||||
std::u16string_view rSourceURL, // source dir without trailing '/'
|
||||
std::u16string_view rTargetURL, // target dir without trailing '/'
|
||||
std::u16string_view rName, // filename
|
||||
std::u16string_view rExt // extension (or empty)
|
||||
)
|
||||
{
|
||||
const OUString aFileURL(createFileURL(rSourceURL, rName, rExt));
|
||||
@ -2166,7 +2171,7 @@ namespace comphelper
|
||||
bool BackupFileHelper::tryPop_files(
|
||||
const std::set< OUString >& rDirs,
|
||||
const std::set< std::pair< OUString, OUString > >& rFiles,
|
||||
const OUString& rSourceURL, // source dir without trailing '/'
|
||||
std::u16string_view rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
)
|
||||
{
|
||||
@ -2185,7 +2190,7 @@ namespace comphelper
|
||||
// process dirs
|
||||
for (const auto& dir : rDirs)
|
||||
{
|
||||
OUString aNewSourceURL(rSourceURL + "/" + dir);
|
||||
OUString aNewSourceURL(OUString::Concat(rSourceURL) + "/" + dir);
|
||||
OUString aNewTargetURL(rTargetURL + "/" + dir);
|
||||
std::set< OUString > aNewDirs;
|
||||
std::set< std::pair< OUString, OUString > > aNewFiles;
|
||||
@ -2215,10 +2220,10 @@ namespace comphelper
|
||||
}
|
||||
|
||||
bool BackupFileHelper::tryPop_file(
|
||||
const OUString& rSourceURL, // source dir without trailing '/'
|
||||
const OUString& rTargetURL, // target dir without trailing '/'
|
||||
const OUString& rName, // filename
|
||||
const OUString& rExt // extension (or empty)
|
||||
std::u16string_view rSourceURL, // source dir without trailing '/'
|
||||
std::u16string_view rTargetURL, // target dir without trailing '/'
|
||||
std::u16string_view rName, // filename
|
||||
std::u16string_view rExt // extension (or empty)
|
||||
)
|
||||
{
|
||||
const OUString aFileURL(createFileURL(rSourceURL, rName, rExt));
|
||||
@ -2268,7 +2273,7 @@ namespace comphelper
|
||||
/////////////////// ExtensionInfo helpers ///////////////////////
|
||||
|
||||
bool BackupFileHelper::tryPush_extensionInfo(
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
std::u16string_view rTargetURL // target dir without trailing '/'
|
||||
)
|
||||
{
|
||||
ExtensionInfo aExtensionInfo;
|
||||
@ -2278,7 +2283,7 @@ namespace comphelper
|
||||
// create current configuration and write to temp file - it exists until deleted
|
||||
if (aExtensionInfo.createTempFile(aTempURL))
|
||||
{
|
||||
const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
|
||||
const OUString aPackURL(createPackURL(rTargetURL, u"ExtensionInfo"));
|
||||
PackedFile aPackedFile(aPackURL);
|
||||
FileSharedPtr aBaseFile = std::make_shared<osl::File>(aTempURL);
|
||||
|
||||
@ -2297,22 +2302,22 @@ namespace comphelper
|
||||
}
|
||||
|
||||
bool BackupFileHelper::isPopPossible_extensionInfo(
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
std::u16string_view rTargetURL // target dir without trailing '/'
|
||||
)
|
||||
{
|
||||
// extensionInfo always exists internally, no test needed
|
||||
const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
|
||||
const OUString aPackURL(createPackURL(rTargetURL, u"ExtensionInfo"));
|
||||
PackedFile aPackedFile(aPackURL);
|
||||
|
||||
return !aPackedFile.empty();
|
||||
}
|
||||
|
||||
bool BackupFileHelper::tryPop_extensionInfo(
|
||||
const OUString& rTargetURL // target dir without trailing '/'
|
||||
std::u16string_view rTargetURL // target dir without trailing '/'
|
||||
)
|
||||
{
|
||||
// extensionInfo always exists internally, no test needed
|
||||
const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
|
||||
const OUString aPackURL(createPackURL(rTargetURL, u"ExtensionInfo"));
|
||||
PackedFile aPackedFile(aPackURL);
|
||||
|
||||
if (!aPackedFile.empty())
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||
#include <com/sun/star/configuration/ReadOnlyAccess.hpp>
|
||||
@ -53,14 +54,14 @@ OUString getDefaultLocale(
|
||||
getLocale()).getBcp47(false);
|
||||
}
|
||||
|
||||
OUString extendLocalizedPath(OUString const & path, OUString const & locale) {
|
||||
OUString extendLocalizedPath(std::u16string_view path, OUString const & locale) {
|
||||
SAL_WARN_IF(
|
||||
locale.match("*"), "comphelper",
|
||||
"Locale \"" << locale << "\" starts with \"*\"");
|
||||
assert(locale.indexOf('&') == -1);
|
||||
assert(locale.indexOf('"') == -1);
|
||||
assert(locale.indexOf('\'') == -1);
|
||||
return path + "/['*" + locale + "']";
|
||||
return OUString::Concat(path) + "/['*" + locale + "']";
|
||||
}
|
||||
|
||||
}
|
||||
@ -145,7 +146,7 @@ void comphelper::detail::ConfigurationWrapper::setPropertyValue(
|
||||
|
||||
css::uno::Any
|
||||
comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(
|
||||
OUString const & path) const
|
||||
std::u16string_view path) const
|
||||
{
|
||||
return access_->getByHierarchicalName(
|
||||
extendLocalizedPath(path, getDefaultLocale(context_)));
|
||||
|
@ -17,6 +17,10 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <comphelper/propertystatecontainer.hxx>
|
||||
|
||||
|
||||
@ -30,13 +34,13 @@ namespace comphelper
|
||||
|
||||
namespace
|
||||
{
|
||||
OUString lcl_getUnknownPropertyErrorMessage( const OUString& _rPropertyName )
|
||||
OUString lcl_getUnknownPropertyErrorMessage( std::u16string_view _rPropertyName )
|
||||
{
|
||||
// TODO: perhaps it's time to think about resources in the comphelper module?
|
||||
// Would be nice to have localized exception strings (a simply resource file containing
|
||||
// strings only would suffice, and could be realized with a UNO service, so we do not
|
||||
// need the dependency to the Tools project)
|
||||
return "The property \"" + _rPropertyName + "\" is unknown.";
|
||||
return OUString::Concat("The property \"") + _rPropertyName + "\" is unknown.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,10 +79,10 @@ static uno::Sequence<uno::Sequence< beans::StringPair>> ReadSequence_Impl(
|
||||
|
||||
uno::Sequence< uno::Sequence< beans::StringPair > > ReadRelationsInfoSequence(
|
||||
const uno::Reference< io::XInputStream >& xInStream,
|
||||
const OUString & aStreamName,
|
||||
std::u16string_view aStreamName,
|
||||
const uno::Reference< uno::XComponentContext >& rContext )
|
||||
{
|
||||
OUString aStringID = "_rels/" + aStreamName;
|
||||
OUString aStringID = OUString::Concat("_rels/") + aStreamName;
|
||||
return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, rContext );
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,8 @@ SmallVector<DeclRefExpr const*, 2> wrap(DeclRefExpr const* expr)
|
||||
|
||||
SmallVector<DeclRefExpr const*, 2> relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
|
||||
{
|
||||
if (expr->getOperator() == OO_Subscript)
|
||||
auto const op = expr->getOperator();
|
||||
if (op == OO_Subscript)
|
||||
{
|
||||
auto const e = expr->getArg(0);
|
||||
if (relevantStringType(e->getType()) == StringType::None)
|
||||
@ -181,7 +182,7 @@ SmallVector<DeclRefExpr const*, 2> relevantCXXOperatorCallExpr(CXXOperatorCallEx
|
||||
}
|
||||
return wrap(relevantDeclRefExpr(e));
|
||||
}
|
||||
if (compat::isComparisonOp(expr))
|
||||
if (compat::isComparisonOp(expr) || (op == OO_Plus && expr->getNumArgs() == 2))
|
||||
{
|
||||
SmallVector<DeclRefExpr const*, 2> v;
|
||||
if (auto const e = relevantDeclRefExpr(expr->getArg(0)))
|
||||
|
@ -855,8 +855,8 @@ void Components::parseXcsXcuIniLayer(
|
||||
}
|
||||
}
|
||||
|
||||
void Components::parseResLayer(int layer, OUString const & url) {
|
||||
OUString resUrl(url + "/res");
|
||||
void Components::parseResLayer(int layer, std::u16string_view url) {
|
||||
OUString resUrl(OUString::Concat(url) + "/res");
|
||||
parseXcdFiles(layer, resUrl);
|
||||
parseFiles(layer, ".xcu", &parseXcuFile, resUrl, false);
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <set>
|
||||
#include <string_view>
|
||||
|
||||
#include <com/sun/star/beans/Optional.hpp>
|
||||
#include <com/sun/star/uno/Reference.hxx>
|
||||
@ -131,7 +132,7 @@ private:
|
||||
void parseXcsXcuIniLayer(
|
||||
int layer, OUString const & url, bool recordAdditions);
|
||||
|
||||
void parseResLayer(int layer, OUString const & url);
|
||||
void parseResLayer(int layer, std::u16string_view url);
|
||||
|
||||
void parseModificationLayer(int layer, OUString const & url);
|
||||
|
||||
|
@ -401,7 +401,7 @@ struct PairEntrySorter
|
||||
|
||||
void writeModifications(
|
||||
Components & components, TempFile &handle,
|
||||
OUString const & parentPathRepresentation,
|
||||
std::u16string_view parentPathRepresentation,
|
||||
rtl::Reference< Node > const & parent, OUString const & nodeName,
|
||||
rtl::Reference< Node > const & node,
|
||||
Modifications::Node const & modifications)
|
||||
@ -448,7 +448,7 @@ void writeModifications(
|
||||
} else {
|
||||
assert(node.is());
|
||||
OUString pathRep(
|
||||
parentPathRepresentation + "/" +
|
||||
OUString::Concat(parentPathRepresentation) + "/" +
|
||||
Data::createSegment(node->getTemplateName(), nodeName));
|
||||
|
||||
// copy configmgr::Modifications::Node's to a sortable list. Use pointers
|
||||
@ -627,7 +627,7 @@ void writeModFile(
|
||||
for (const auto& j : ModNodePairEntryVector)
|
||||
{
|
||||
writeModifications(
|
||||
components, tmp, "", rtl::Reference< Node >(), j->first,
|
||||
components, tmp, u"", rtl::Reference< Node >(), j->first,
|
||||
data.getComponents().findNode(Data::NO_LAYER, j->first),
|
||||
j->second);
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ void XcuParser::handleUnknownGroupProp(
|
||||
|
||||
void XcuParser::handlePlainGroupProp(
|
||||
xmlreader::XmlReader const & reader, GroupNode * group,
|
||||
NodeMap::iterator const & propertyIndex, OUString const & name,
|
||||
NodeMap::iterator const & propertyIndex, std::u16string_view name,
|
||||
Type type, Operation operation, bool finalized)
|
||||
{
|
||||
PropertyNode * property = static_cast< PropertyNode * >(
|
||||
@ -672,7 +672,7 @@ void XcuParser::handlePlainGroupProp(
|
||||
type != property->getStaticType())
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid type for prop " + name + " in " + reader.getUrl());
|
||||
OUString::Concat("invalid type for prop ") + name + " in " + reader.getUrl());
|
||||
}
|
||||
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
|
||||
switch (operation) {
|
||||
@ -685,7 +685,7 @@ void XcuParser::handlePlainGroupProp(
|
||||
case OPERATION_REMOVE:
|
||||
if (!property->isExtension()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid remove of non-extension prop " + name + " in " +
|
||||
OUString::Concat("invalid remove of non-extension prop ") + name + " in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
group->getMembers().erase(propertyIndex);
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <string_view>
|
||||
|
||||
#include <rtl/ref.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
@ -89,7 +90,7 @@ private:
|
||||
|
||||
void handlePlainGroupProp(
|
||||
xmlreader::XmlReader const & reader, GroupNode * group,
|
||||
NodeMap::iterator const & propertyIndex, OUString const & name,
|
||||
NodeMap::iterator const & propertyIndex, std::u16string_view name,
|
||||
Type type, Operation operation, bool finalized);
|
||||
|
||||
void handleLocalizedGroupProp(
|
||||
|
@ -62,7 +62,7 @@ void AdoDriverTest::setUp()
|
||||
CPPUNIT_ASSERT_MESSAGE("no ado component!", m_xAdoComponent.is());
|
||||
|
||||
OUString url = "sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" +
|
||||
m_directories.getPathFromWorkdir("/CppunitTest/TS001018407.mdb");
|
||||
m_directories.getPathFromWorkdir(u"/CppunitTest/TS001018407.mdb");
|
||||
|
||||
Sequence< PropertyValue > info;
|
||||
Reference< XDriver> xDriver(m_xAdoComponent, UNO_QUERY);
|
||||
|
@ -84,7 +84,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName)
|
||||
if ( aFind == m_pImpl->m_aColumnInfo.end() ) // we have to fill it
|
||||
{
|
||||
OUString sComposedName = ::dbtools::composeTableNameForSelect( xConnection, m_pTable );
|
||||
collectColumnInformation(xConnection,sComposedName,"*" ,m_pImpl->m_aColumnInfo);
|
||||
collectColumnInformation(xConnection,sComposedName,u"*" ,m_pImpl->m_aColumnInfo);
|
||||
aFind = m_pImpl->m_aColumnInfo.find(_rName);
|
||||
}
|
||||
if ( aFind != m_pImpl->m_aColumnInfo.end() )
|
||||
|
@ -798,11 +798,11 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
|
||||
|
||||
// we need some more information about the column
|
||||
void collectColumnInformation(const Reference< XConnection>& _xConnection,
|
||||
const OUString& _sComposedName,
|
||||
const OUString& _rName,
|
||||
std::u16string_view _sComposedName,
|
||||
std::u16string_view _rName,
|
||||
ColumnInformationMap& _rInfo)
|
||||
{
|
||||
OUString sSelect = "SELECT " + _rName +
|
||||
OUString sSelect = OUString::Concat("SELECT ") + _rName +
|
||||
" FROM " + _sComposedName +
|
||||
" WHERE 0 = 1";
|
||||
|
||||
|
@ -1475,7 +1475,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
|
||||
return ODatabaseMetaData::lcl_getKeys(true, table);
|
||||
}
|
||||
|
||||
uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImport, const OUString& table )
|
||||
uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImport, std::u16string_view table )
|
||||
{
|
||||
ODatabaseMetaDataResultSet* pResultSet = new
|
||||
ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eImportedKeys);
|
||||
@ -1506,9 +1506,9 @@ uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImpor
|
||||
"ON FOREI.RDB$INDEX_NAME = FOREIGN_INDEX.RDB$INDEX_NAME "
|
||||
"WHERE FOREI.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY' ";
|
||||
if (bIsImport)
|
||||
sSQL += "AND FOREI.RDB$RELATION_NAME = '"+ table +"'";
|
||||
sSQL += OUString::Concat("AND FOREI.RDB$RELATION_NAME = '")+ table +"'";
|
||||
else
|
||||
sSQL += "AND PRIM.RDB$RELATION_NAME = '"+ table +"'";
|
||||
sSQL += OUString::Concat("AND PRIM.RDB$RELATION_NAME = '")+ table +"'";
|
||||
|
||||
uno::Reference< XResultSet > rs = statement->executeQuery(sSQL);
|
||||
uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW );
|
||||
|
@ -20,6 +20,10 @@
|
||||
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_DATABASEMETADATA_HXX
|
||||
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_DATABASEMETADATA_HXX
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "Connection.hxx"
|
||||
|
||||
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
|
||||
@ -38,7 +42,7 @@ namespace connectivity::firebird
|
||||
{
|
||||
::rtl::Reference<Connection> m_pConnection;
|
||||
private:
|
||||
css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( const bool& bIsImport, const OUString& table );
|
||||
css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( const bool& bIsImport, std::u16string_view table );
|
||||
public:
|
||||
|
||||
explicit ODatabaseMetaData(Connection* _pCon);
|
||||
|
@ -254,7 +254,7 @@ uno::Sequence< Type > SAL_CALL Table::getTypes()
|
||||
return OTableHelper::getTypes();
|
||||
}
|
||||
|
||||
OUString Table::getAlterTableColumn(const OUString& rColumn)
|
||||
OUString Table::getAlterTableColumn(std::u16string_view rColumn)
|
||||
{
|
||||
return ("ALTER TABLE \"" + getName() + "\" ALTER COLUMN \"" + rColumn + "\" ");
|
||||
}
|
||||
|
@ -10,6 +10,10 @@
|
||||
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLE_HXX
|
||||
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLE_HXX
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "Tables.hxx"
|
||||
|
||||
#include <connectivity/TTableHelper.hxx>
|
||||
@ -31,7 +35,7 @@ namespace connectivity::firebird
|
||||
* Get the ALTER TABLE [TABLE] ALTER [COLUMN] String.
|
||||
* Includes a trailing space.
|
||||
*/
|
||||
OUString getAlterTableColumn(const OUString& rColumn);
|
||||
OUString getAlterTableColumn(std::u16string_view rColumn);
|
||||
|
||||
protected:
|
||||
void construct() override;
|
||||
|
@ -269,7 +269,7 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, c
|
||||
executeStatement(sSql);
|
||||
}
|
||||
|
||||
void OHSQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName)
|
||||
void OHSQLTable::alterDefaultValue(std::u16string_view _sNewDefault,const OUString& _rColName)
|
||||
{
|
||||
const OUString sQuote = getMetaData()->getIdentifierQuoteString( );
|
||||
OUString sSql = getAlterTableColumnPart() +
|
||||
|
@ -281,7 +281,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType, const OUString& _rColName,
|
||||
|
||||
OUString OMySQLTable::getTypeCreatePattern() const { return "(M,D)"; }
|
||||
|
||||
void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault, const OUString& _rColName)
|
||||
void OMySQLTable::alterDefaultValue(std::u16string_view _sNewDefault, const OUString& _rColName)
|
||||
{
|
||||
const OUString sQuote = getMetaData()->getIdentifierQuoteString();
|
||||
OUString sSql = getAlterTableColumnPart() + " ALTER " + ::dbtools::quoteName(sQuote, _rColName)
|
||||
|
@ -65,6 +65,8 @@
|
||||
************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <string_view>
|
||||
|
||||
#include <sal/log.hxx>
|
||||
#include "pq_databasemetadata.hxx"
|
||||
#include "pq_driver.hxx"
|
||||
@ -2162,12 +2164,12 @@ namespace
|
||||
return ret;
|
||||
}
|
||||
|
||||
OUString construct_full_typename(const OUString &ns, const OUString &tn)
|
||||
OUString construct_full_typename(std::u16string_view ns, const OUString &tn)
|
||||
{
|
||||
if(ns.isEmpty() || ns == "pg_catalog")
|
||||
if(ns.empty() || ns == u"pg_catalog")
|
||||
return tn;
|
||||
else
|
||||
return ns + "." + tn;
|
||||
return OUString::Concat(ns) + "." + tn;
|
||||
}
|
||||
|
||||
void pgTypeInfo2ResultSet(
|
||||
|
@ -210,7 +210,7 @@ void Statement::close( )
|
||||
}
|
||||
|
||||
void Statement::raiseSQLException(
|
||||
const OUString & sql, const char * errorMsg )
|
||||
std::u16string_view sql, const char * errorMsg )
|
||||
{
|
||||
OUString error = "pq_driver: "
|
||||
+ OUString( errorMsg, strlen(errorMsg), ConnectionSettings::encoding )
|
||||
|
@ -36,6 +36,11 @@
|
||||
|
||||
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATEMENT_HXX
|
||||
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATEMENT_HXX
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <cppuhelper/propshlp.hxx>
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#include <cppuhelper/component.hxx>
|
||||
@ -161,7 +166,7 @@ private:
|
||||
/// @throws css::uno::RuntimeException
|
||||
void checkClosed();
|
||||
/// @throws css::sdbc::SQLException
|
||||
void raiseSQLException( const OUString & sql, const char * errorMsg );
|
||||
void raiseSQLException( std::u16string_view sql, const char * errorMsg );
|
||||
};
|
||||
|
||||
|
||||
|
@ -87,9 +87,9 @@ using com::sun::star::container::XEnumerationAccess;
|
||||
namespace pq_sdbc_driver
|
||||
{
|
||||
|
||||
OUString concatQualified( const OUString & a, const OUString &b)
|
||||
OUString concatQualified( std::u16string_view a, std::u16string_view b)
|
||||
{
|
||||
return a + "." + b;
|
||||
return OUString::Concat(a) + "." + b;
|
||||
}
|
||||
|
||||
static OString iOUStringToOString( std::u16string_view str, ConnectionSettings const *settings) {
|
||||
|
@ -63,7 +63,7 @@ namespace pq_sdbc_driver
|
||||
{
|
||||
bool isWhitespace( sal_Unicode c );
|
||||
|
||||
OUString concatQualified( const OUString & a, const OUString &b);
|
||||
OUString concatQualified( std::u16string_view a, std::u16string_view b);
|
||||
|
||||
OString OUStringToOString( std::u16string_view str, ConnectionSettings const *settings);
|
||||
|
||||
|
@ -20,6 +20,10 @@
|
||||
#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HTABLE_HXX
|
||||
#define INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HTABLE_HXX
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <connectivity/TTableHelper.hxx>
|
||||
#include <comphelper/IdPropArrayHelper.hxx>
|
||||
|
||||
@ -102,7 +106,7 @@ namespace connectivity::hsqldb
|
||||
|
||||
// some methods to alter table structures
|
||||
void alterColumnType(sal_Int32 nNewType,const OUString& _rColName,const css::uno::Reference< css::beans::XPropertySet >& _xDescriptor);
|
||||
void alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName);
|
||||
void alterDefaultValue(std::u16string_view _sNewDefault,const OUString& _rColName);
|
||||
void dropDefaultValue(const OUString& _sNewDefault);
|
||||
|
||||
};
|
||||
|
@ -20,6 +20,10 @@
|
||||
#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YTABLE_HXX
|
||||
#define INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YTABLE_HXX
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <connectivity/TTableHelper.hxx>
|
||||
#include <comphelper/IdPropArrayHelper.hxx>
|
||||
|
||||
@ -101,7 +105,7 @@ namespace connectivity::mysql
|
||||
|
||||
// some methods to alter table structures
|
||||
void alterColumnType(sal_Int32 nNewType,const OUString& _rColName,const css::uno::Reference< css::beans::XPropertySet >& _xDescriptor);
|
||||
void alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName);
|
||||
void alterDefaultValue(std::u16string_view _sNewDefault,const OUString& _rColName);
|
||||
void dropDefaultValue(const OUString& _sNewDefault);
|
||||
|
||||
virtual OUString getTypeCreatePattern() const override;
|
||||
|
@ -55,6 +55,8 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <sal/log.hxx>
|
||||
|
||||
@ -104,7 +106,7 @@ namespace
|
||||
@return
|
||||
The quoted string.
|
||||
*/
|
||||
OUString SetQuotation(const OUString& rValue, const OUString& rQuot, const OUString& rQuotToReplace)
|
||||
OUString SetQuotation(std::u16string_view rValue, const OUString& rQuot, const OUString& rQuotToReplace)
|
||||
{
|
||||
OUString rNewValue = rQuot + rValue;
|
||||
sal_Int32 nIndex = sal_Int32(-1); // Replace quotes with double quotes or the parser gets into problems
|
||||
|
@ -118,7 +118,7 @@ struct EnvironmentsData
|
||||
~EnvironmentsData();
|
||||
|
||||
void getEnvironment(
|
||||
uno_Environment ** ppEnv, const OUString & rEnvDcp, void * pContext );
|
||||
uno_Environment ** ppEnv, std::u16string_view rEnvDcp, void * pContext );
|
||||
void registerEnvironment( uno_Environment ** ppEnv );
|
||||
void getRegisteredEnvironments(
|
||||
uno_Environment *** pppEnvs, sal_Int32 * pnLen,
|
||||
@ -908,7 +908,7 @@ EnvironmentsData::~EnvironmentsData()
|
||||
|
||||
|
||||
void EnvironmentsData::getEnvironment(
|
||||
uno_Environment ** ppEnv, const OUString & rEnvDcp, void * pContext )
|
||||
uno_Environment ** ppEnv, std::u16string_view rEnvDcp, void * pContext )
|
||||
{
|
||||
if (*ppEnv)
|
||||
{
|
||||
|
@ -1466,7 +1466,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(OUString const & uri) {
|
||||
}
|
||||
|
||||
OUString cppuhelper::ServiceManager::readLegacyRdbString(
|
||||
OUString const & uri, RegistryKey & key, OUString const & path)
|
||||
std::u16string_view uri, RegistryKey & key, OUString const & path)
|
||||
{
|
||||
RegistryKey subkey;
|
||||
RegValueType t;
|
||||
@ -1477,7 +1477,7 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
|
||||
|| s == 0 || s > o3tl::make_unsigned(SAL_MAX_INT32))
|
||||
{
|
||||
throw css::uno::DeploymentException(
|
||||
"Failure reading legacy rdb file " + uri,
|
||||
OUString::Concat("Failure reading legacy rdb file ") + uri,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
OUString val;
|
||||
@ -1492,14 +1492,14 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
|
||||
| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::uno::DeploymentException(
|
||||
"Failure reading legacy rdb file " + uri,
|
||||
OUString::Concat("Failure reading legacy rdb file ") + uri,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
void cppuhelper::ServiceManager::readLegacyRdbStrings(
|
||||
OUString const & uri, RegistryKey & key, OUString const & path,
|
||||
std::u16string_view uri, RegistryKey & key, OUString const & path,
|
||||
std::vector< OUString > * strings)
|
||||
{
|
||||
assert(strings != nullptr);
|
||||
@ -1511,14 +1511,14 @@ void cppuhelper::ServiceManager::readLegacyRdbStrings(
|
||||
return;
|
||||
default:
|
||||
throw css::uno::DeploymentException(
|
||||
"Failure reading legacy rdb file " + uri,
|
||||
OUString::Concat("Failure reading legacy rdb file ") + uri,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
OUString prefix(subkey.getName() + "/");
|
||||
RegistryKeyNames names;
|
||||
if (subkey.getKeyNames(OUString(), names) != RegError::NO_ERROR) {
|
||||
throw css::uno::DeploymentException(
|
||||
"Failure reading legacy rdb file " + uri,
|
||||
OUString::Concat("Failure reading legacy rdb file ") + uri,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
for (sal_uInt32 i = 0; i != names.getLength(); ++i) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
@ -321,11 +322,11 @@ private:
|
||||
bool readLegacyRdbFile(OUString const & uri);
|
||||
|
||||
OUString readLegacyRdbString(
|
||||
OUString const & uri, RegistryKey & key,
|
||||
std::u16string_view uri, RegistryKey & key,
|
||||
OUString const & path);
|
||||
|
||||
void readLegacyRdbStrings(
|
||||
OUString const & uri, RegistryKey & key,
|
||||
std::u16string_view uri, RegistryKey & key,
|
||||
OUString const & path, std::vector< OUString > * strings);
|
||||
|
||||
void insertRdbFiles(
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <string_view>
|
||||
|
||||
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
|
||||
#include <com/sun/star/registry/CannotRegisterImplementationException.hpp>
|
||||
@ -112,8 +113,8 @@ extern "C" void getFactory(va_list * args) {
|
||||
|
||||
css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
|
||||
css::uno::Environment const & source, css::uno::Environment const & target,
|
||||
component_getFactoryFunc function, OUString const & uri,
|
||||
OUString const & implementation,
|
||||
component_getFactoryFunc function, std::u16string_view uri,
|
||||
std::u16string_view implementation,
|
||||
css::uno::Reference<css::lang::XMultiServiceFactory> const & serviceManager)
|
||||
{
|
||||
if (!(source.is() && target.is())) {
|
||||
@ -147,7 +148,7 @@ css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
|
||||
}
|
||||
if (factory == nullptr) {
|
||||
throw css::loader::CannotActivateFactoryException(
|
||||
("calling factory function for \"" + implementation + "\" in <"
|
||||
(OUString::Concat("calling factory function for \"") + implementation + "\" in <"
|
||||
+ uri + "> returned null"),
|
||||
css::uno::Reference<css::uno::XInterface>());
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ void CuiDialogsTest::openAnyDialog()
|
||||
initialize();
|
||||
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test.txt");
|
||||
processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest);
|
||||
|
@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest2::createDialogByID(sal_uInt32 /*nID*/)
|
||||
void CuiDialogsTest2::openAnyDialog()
|
||||
{
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test_2.txt");
|
||||
processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test_2.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest2);
|
||||
|
@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest3::createDialogByID(sal_uInt32 /*nID*/)
|
||||
void CuiDialogsTest3::openAnyDialog()
|
||||
{
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test_3.txt");
|
||||
processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test_3.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest3);
|
||||
|
@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest4::createDialogByID(sal_uInt32 /*nID*/)
|
||||
void CuiDialogsTest4::openAnyDialog()
|
||||
{
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test_4.txt");
|
||||
processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test_4.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest4);
|
||||
|
@ -1355,13 +1355,13 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry const * pToSelect )
|
||||
}
|
||||
|
||||
void SvxConfigPage::AddSubMenusToUI(
|
||||
const OUString& rBaseTitle, SvxConfigEntry const * pParentData )
|
||||
std::u16string_view rBaseTitle, SvxConfigEntry const * pParentData )
|
||||
{
|
||||
for (auto const& entryData : *pParentData->GetEntries())
|
||||
{
|
||||
if (entryData->IsPopup())
|
||||
{
|
||||
OUString subMenuTitle = rBaseTitle + aMenuSeparatorStr + SvxConfigPageHelper::stripHotKey(entryData->GetName());
|
||||
OUString subMenuTitle = OUString::Concat(rBaseTitle) + aMenuSeparatorStr + SvxConfigPageHelper::stripHotKey(entryData->GetName());
|
||||
|
||||
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(entryData)));
|
||||
m_xTopLevelListBox->append(sId, subMenuTitle);
|
||||
|
@ -76,9 +76,10 @@ const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
|
||||
|
||||
const OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
|
||||
|
||||
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
|
||||
OUString SfxStylesInfo_Impl::generateCommand(
|
||||
std::u16string_view sFamily, std::u16string_view sStyle)
|
||||
{
|
||||
return ".uno:StyleApply?Style:string="
|
||||
return OUString::Concat(".uno:StyleApply?Style:string=")
|
||||
+ sStyle
|
||||
+ "&FamilyName:string="
|
||||
+ sFamily;
|
||||
@ -999,10 +1000,10 @@ void CuiConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem )
|
||||
pItem->GetQualifiedName() );
|
||||
}
|
||||
|
||||
void CuiConfigGroupListBox::SelectMacro( const OUString& rBasic,
|
||||
void CuiConfigGroupListBox::SelectMacro( std::u16string_view rBasic,
|
||||
const OUString& rMacro )
|
||||
{
|
||||
const OUString aBasicName(rBasic + " " + xImp->m_sMacros);
|
||||
const OUString aBasicName(OUString::Concat(rBasic) + " " + xImp->m_sMacros);
|
||||
sal_Int32 nIdx {rMacro.lastIndexOf('.')};
|
||||
const OUString aMethod( rMacro.copy(nIdx+1) );
|
||||
OUString aLib;
|
||||
|
@ -32,9 +32,9 @@ short SignatureLineDialogBase::run()
|
||||
return nRet;
|
||||
}
|
||||
|
||||
OUString SignatureLineDialogBase::getCDataString(const OUString& rString)
|
||||
OUString SignatureLineDialogBase::getCDataString(std::u16string_view rString)
|
||||
{
|
||||
return "<![CDATA[" + rString + "]]>";
|
||||
return OUString::Concat("<![CDATA[") + rString + "]]>";
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
@ -645,12 +645,12 @@ std::unique_ptr<SfxTabPage> TPGalleryThemeProperties::Create(weld::Container* pP
|
||||
return std::make_unique<TPGalleryThemeProperties>(pPage, pController, *rSet);
|
||||
}
|
||||
|
||||
OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, const OUString& _rExtension )
|
||||
OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, std::u16string_view _rExtension )
|
||||
{
|
||||
OUString sRet = _rDisplayText;
|
||||
if ( sRet.indexOf( "(*.*)" ) == -1 )
|
||||
{
|
||||
sRet += " (" + _rExtension + ")";
|
||||
sRet += OUString::Concat(" (") + _rExtension + ")";
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
|
@ -110,9 +110,9 @@ SvxPostItDialog::~SvxPostItDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void SvxPostItDialog::ShowLastAuthor(const OUString& rAuthor, const OUString& rDate)
|
||||
void SvxPostItDialog::ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate)
|
||||
{
|
||||
OUString sTxt = rAuthor + ", " + rDate;
|
||||
OUString sTxt = OUString::Concat(rAuthor) + ", " + rDate;
|
||||
m_xLastEditFT->set_label( sTxt );
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ using namespace com::sun::star;
|
||||
|
||||
namespace
|
||||
{
|
||||
OUString lcl_genRandom( const OUString &rId )
|
||||
OUString lcl_genRandom( std::u16string_view rId )
|
||||
{
|
||||
//FIXME: plus timestamp
|
||||
unsigned int nRand = comphelper::rng::uniform_uint_distribution(0, 0xFFFF);
|
||||
@ -62,7 +62,7 @@ namespace
|
||||
OUString aTempl("<alt id=\"%1\">"
|
||||
" " //FIXME real dialog title or something
|
||||
"</alt>");
|
||||
aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("alt_id") );
|
||||
aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"alt_id") );
|
||||
|
||||
return aTempl;
|
||||
}
|
||||
@ -73,7 +73,7 @@ namespace
|
||||
" width=\"%3cm\" height=\"%4cm\">"
|
||||
"%5"
|
||||
"</image>");
|
||||
aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("img_id") );
|
||||
aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"img_id") );
|
||||
aTempl = aTempl.replaceFirst( "%2", rScreenshotId );
|
||||
aTempl = aTempl.replaceFirst( "%3", OUString::number( rSize.Width() ) );
|
||||
aTempl = aTempl.replaceFirst( "%4", OUString::number( rSize.Height() ) );
|
||||
@ -86,7 +86,7 @@ namespace
|
||||
{
|
||||
OUString aTempl( "<paragraph id=\"%1\" role=\"paragraph\">%2"
|
||||
"</paragraph>" SAL_NEWLINE_STRING );
|
||||
aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("par_id") );
|
||||
aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"par_id") );
|
||||
aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId, rSize) );
|
||||
|
||||
return aTempl;
|
||||
@ -98,7 +98,7 @@ namespace
|
||||
"<bookmark branch=\"hid/%2\" id=\"%3\" localize=\"false\"/>" SAL_NEWLINE_STRING;
|
||||
aTempl = aTempl.replaceFirst( "%1", rWidgetId );
|
||||
aTempl = aTempl.replaceFirst( "%2", rWidgetId );
|
||||
aTempl = aTempl.replaceFirst( "%3", lcl_genRandom("bm_id") );
|
||||
aTempl = aTempl.replaceFirst( "%3", lcl_genRandom(u"bm_id") );
|
||||
|
||||
return aTempl;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#include <sfx2/objsh.hxx>
|
||||
@ -1106,8 +1107,8 @@ OUString FormatErrorString(
|
||||
const OUString& language,
|
||||
const OUString& script,
|
||||
const OUString& line,
|
||||
const OUString& type,
|
||||
const OUString& message )
|
||||
std::u16string_view type,
|
||||
std::u16string_view message )
|
||||
{
|
||||
OUString result = unformatted.copy( 0 );
|
||||
|
||||
@ -1115,12 +1116,12 @@ OUString FormatErrorString(
|
||||
result = ReplaceString(result, "%SCRIPTNAME", script );
|
||||
result = ReplaceString(result, "%LINENUMBER", line );
|
||||
|
||||
if ( !type.isEmpty() )
|
||||
if ( !type.empty() )
|
||||
{
|
||||
result += "\n\n" + CuiResId(RID_SVXSTR_ERROR_TYPE_LABEL) + " " + type;
|
||||
}
|
||||
|
||||
if ( !message.isEmpty() )
|
||||
if ( !message.empty() )
|
||||
{
|
||||
result += "\n\n" + CuiResId(RID_SVXSTR_ERROR_MESSAGE_LABEL) + " " + message;
|
||||
}
|
||||
@ -1164,7 +1165,7 @@ OUString GetErrorMessage(
|
||||
}
|
||||
|
||||
return FormatErrorString(
|
||||
unformatted, language, script, line, "", message );
|
||||
unformatted, language, script, line, u"", message );
|
||||
}
|
||||
|
||||
OUString GetErrorMessage(
|
||||
@ -1243,7 +1244,7 @@ OUString GetErrorMessage(
|
||||
message = sError.Message;
|
||||
}
|
||||
return FormatErrorString(
|
||||
unformatted, language, script, OUString(), OUString(), message );
|
||||
unformatted, language, script, OUString(), std::u16string_view(), message );
|
||||
}
|
||||
|
||||
OUString GetErrorMessage( const css::uno::Any& aException )
|
||||
|
@ -8,6 +8,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <vcl/weld.hxx>
|
||||
|
||||
#include <com/sun/star/frame/XModel.hpp>
|
||||
@ -24,7 +28,7 @@ public:
|
||||
protected:
|
||||
css::uno::Reference<css::frame::XModel> m_xModel;
|
||||
virtual void Apply() = 0;
|
||||
static OUString getCDataString(const OUString& rString);
|
||||
static OUString getCDataString(std::u16string_view rString);
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "cfgutil.hxx"
|
||||
@ -446,7 +447,7 @@ protected:
|
||||
int AppendEntry(SvxConfigEntry* pNewEntryData,
|
||||
int nTarget);
|
||||
|
||||
void AddSubMenusToUI( const OUString& rBaseTitle,
|
||||
void AddSubMenusToUI( std::u16string_view rBaseTitle,
|
||||
SvxConfigEntry const * pParentData );
|
||||
|
||||
void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
#include <com/sun/star/frame/DispatchInformation.hpp>
|
||||
@ -70,7 +72,7 @@ public:
|
||||
std::vector< SfxStyleInfo_Impl > getStyleFamilies() const;
|
||||
std::vector< SfxStyleInfo_Impl > getStyles(const OUString& sFamily);
|
||||
|
||||
static OUString generateCommand(const OUString& sFamily, const OUString& sStyle);
|
||||
static OUString generateCommand(std::u16string_view sFamily, std::u16string_view sStyle);
|
||||
};
|
||||
|
||||
enum class SfxCfgKind
|
||||
@ -223,7 +225,7 @@ public:
|
||||
{ m_pFunctionListBox = pBox; }
|
||||
void GroupSelected();
|
||||
void SelectMacro(const SfxMacroInfoItem*);
|
||||
void SelectMacro(const OUString&, const OUString&);
|
||||
void SelectMacro(std::u16string_view, const OUString&);
|
||||
void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
|
||||
};
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include <com/sun/star/media/XPlayer.hpp>
|
||||
#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
|
||||
#include <svtools/dialogclosedlistener.hxx>
|
||||
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
class GalleryTheme;
|
||||
@ -241,7 +243,7 @@ class TPGalleryThemeProperties : public SfxTabPage
|
||||
|
||||
virtual void Reset( const SfxItemSet* /*rSet*/ ) override {}
|
||||
virtual bool FillItemSet( SfxItemSet* /*rSet*/ ) override { return true; }
|
||||
static OUString addExtension( const OUString&, const OUString& );
|
||||
static OUString addExtension( const OUString&, std::u16string_view );
|
||||
void FillFilterList();
|
||||
|
||||
void SearchFiles();
|
||||
|
@ -18,6 +18,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <sfx2/basedlgs.hxx>
|
||||
|
||||
// class SvxPostItDialog -------------------------------------------------
|
||||
@ -57,7 +61,7 @@ public:
|
||||
{
|
||||
m_xEditED->set_text(rTxt);
|
||||
}
|
||||
void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
|
||||
void ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate);
|
||||
void DontChangeAuthor()
|
||||
{
|
||||
m_xAuthorBtn->set_sensitive(false);
|
||||
|
@ -17,6 +17,10 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <svl/eitem.hxx>
|
||||
#include <svl/intitem.hxx>
|
||||
#include "optsave.hxx"
|
||||
@ -44,7 +48,7 @@ using namespace com::sun::star::beans;
|
||||
using namespace com::sun::star::container;
|
||||
using namespace comphelper;
|
||||
|
||||
#define CFG_PAGE_AND_GROUP "General", "LoadSave"
|
||||
#define CFG_PAGE_AND_GROUP u"General", u"LoadSave"
|
||||
|
||||
|
||||
struct SvxSaveTabPage_Impl
|
||||
@ -191,13 +195,13 @@ void SvxSaveTabPage::DetectHiddenControls()
|
||||
{
|
||||
SvtOptionsDialogOptions aOptionsDlgOpt;
|
||||
|
||||
if ( aOptionsDlgOpt.IsOptionHidden( "Backup", CFG_PAGE_AND_GROUP ) )
|
||||
if ( aOptionsDlgOpt.IsOptionHidden( u"Backup", CFG_PAGE_AND_GROUP ) )
|
||||
{
|
||||
// hide controls of "Backup"
|
||||
m_xBackupCB->hide();
|
||||
}
|
||||
|
||||
if ( aOptionsDlgOpt.IsOptionHidden( "AutoSave", CFG_PAGE_AND_GROUP ) )
|
||||
if ( aOptionsDlgOpt.IsOptionHidden( u"AutoSave", CFG_PAGE_AND_GROUP ) )
|
||||
{
|
||||
// hide controls of "AutoSave"
|
||||
m_xAutoSaveCB->hide();
|
||||
@ -205,7 +209,7 @@ void SvxSaveTabPage::DetectHiddenControls()
|
||||
m_xMinuteFT->hide();
|
||||
}
|
||||
|
||||
if ( aOptionsDlgOpt.IsOptionHidden( "UserAutoSave", CFG_PAGE_AND_GROUP ) )
|
||||
if ( aOptionsDlgOpt.IsOptionHidden( u"UserAutoSave", CFG_PAGE_AND_GROUP ) )
|
||||
{
|
||||
// hide controls of "UserAutoSave"
|
||||
m_xUserAutoSaveCB->hide();
|
||||
@ -485,7 +489,7 @@ IMPL_LINK(SvxSaveTabPage, AutoClickHdl_Impl, weld::Button&, rBox, void)
|
||||
}
|
||||
}
|
||||
|
||||
static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, const OUString& rExtension)
|
||||
static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, std::u16string_view rExtension)
|
||||
{
|
||||
OUString sName;
|
||||
const PropertyValue* pPropVal = rProperties.getConstArray();
|
||||
@ -498,7 +502,7 @@ static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, con
|
||||
OUString sUIName;
|
||||
if ( ( pPropVal->Value >>= sUIName ) && sUIName.getLength() )
|
||||
{
|
||||
if (!rExtension.isEmpty())
|
||||
if (!rExtension.empty())
|
||||
{
|
||||
return sUIName + " (" + rExtension + ")";
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void DialogSaveTest::test()
|
||||
// be locked anyway:
|
||||
SolarMutexReleaser rel;
|
||||
|
||||
const OUString aFileName(m_directories.getURLFromWorkdir("CppunitTest/testDialogSave.odb"));
|
||||
const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testDialogSave.odb"));
|
||||
{
|
||||
uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
|
||||
CPPUNIT_ASSERT(xComponent.is());
|
||||
|
@ -53,7 +53,7 @@ void DialogSaveTest::test()
|
||||
// be locked anyway:
|
||||
SolarMutexReleaser rel;
|
||||
|
||||
const OUString aFileName(m_directories.getURLFromWorkdir("CppunitTest/testEmptyStdlibSave.odb"));
|
||||
const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testEmptyStdlibSave.odb"));
|
||||
{
|
||||
uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
|
||||
CPPUNIT_ASSERT(xComponent.is());
|
||||
|
@ -35,7 +35,7 @@ DBAccessTest::DBAccessTest()
|
||||
void DBAccessTest::test()
|
||||
{
|
||||
OUString aFileName;
|
||||
createFileURL("testdb.odb", aFileName);
|
||||
createFileURL(u"testdb.odb", aFileName);
|
||||
uno::Reference<lang::XComponent> xComponent = loadFromDesktop(aFileName);
|
||||
CPPUNIT_ASSERT(xComponent.is());
|
||||
xComponent->dispose();
|
||||
|
@ -53,7 +53,7 @@ void DialogSaveTest::test()
|
||||
// be locked anyway:
|
||||
SolarMutexReleaser rel;
|
||||
|
||||
const OUString aFileName(m_directories.getURLFromWorkdir("CppunitTest/testNolibSave.odb"));
|
||||
const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testNolibSave.odb"));
|
||||
{
|
||||
uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
|
||||
CPPUNIT_ASSERT(xComponent.is());
|
||||
|
@ -48,7 +48,7 @@ RowSetClones::RowSetClones()
|
||||
|
||||
void RowSetClones::test()
|
||||
{
|
||||
const OUString sFilePath(m_directories.getURLFromWorkdir("CppunitTest/RowSetClones.odb"));
|
||||
const OUString sFilePath(m_directories.getURLFromWorkdir(u"CppunitTest/RowSetClones.odb"));
|
||||
|
||||
uno::Reference< lang::XComponent > xComponent (loadFromDesktop(sFilePath));
|
||||
CPPUNIT_ASSERT(xComponent.is());
|
||||
|
@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> DbaccessDialogsTest::createDialogByID(sal_uInt32 /*nID
|
||||
void DbaccessDialogsTest::openAnyDialog()
|
||||
{
|
||||
/// process input file containing the UXMLDescriptions of the dialogs to dump
|
||||
processDialogBatchFile("dbaccess/qa/unit/data/dbaccess-dialogs-test.txt");
|
||||
processDialogBatchFile(u"dbaccess/qa/unit/data/dbaccess-dialogs-test.txt");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(DbaccessDialogsTest);
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include <cppunit/TestAssert.h>
|
||||
|
||||
#include <test/unoapi_test.hxx>
|
||||
@ -28,10 +30,10 @@ class DBTestBase
|
||||
public:
|
||||
DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {};
|
||||
|
||||
utl::TempFile createTempCopy(OUString const & pathname);
|
||||
utl::TempFile createTempCopy(std::u16string_view pathname);
|
||||
|
||||
uno::Reference< XOfficeDatabaseDocument >
|
||||
getDocumentForFileName(const OUString &sFileName);
|
||||
getDocumentForFileName(std::u16string_view sFileName);
|
||||
|
||||
uno::Reference<XOfficeDatabaseDocument> getDocumentForUrl(OUString const & url);
|
||||
|
||||
@ -40,7 +42,7 @@ public:
|
||||
uno::Reference< XOfficeDatabaseDocument > const & xDocument);
|
||||
};
|
||||
|
||||
utl::TempFile DBTestBase::createTempCopy(OUString const & pathname) {
|
||||
utl::TempFile DBTestBase::createTempCopy(std::u16string_view pathname) {
|
||||
OUString url;
|
||||
createFileURL(pathname, url);
|
||||
utl::TempFile tmp;
|
||||
@ -56,7 +58,7 @@ utl::TempFile DBTestBase::createTempCopy(OUString const & pathname) {
|
||||
}
|
||||
|
||||
uno::Reference< XOfficeDatabaseDocument >
|
||||
DBTestBase::getDocumentForFileName(const OUString &sFileName)
|
||||
DBTestBase::getDocumentForFileName(std::u16string_view sFileName)
|
||||
{
|
||||
OUString sFilePath;
|
||||
createFileURL(sFileName, sFilePath);
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
SvFileStream* EmbeddedDBPerformanceTest::getWordListStream()
|
||||
{
|
||||
OUString wlPath;
|
||||
createFileURL("wordlist", wlPath);
|
||||
createFileURL(u"wordlist", wlPath);
|
||||
return new SvFileStream(wlPath, StreamMode::READ);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ void FirebirdTest::testEmptyDBConnection()
|
||||
#ifdef OSL_BIGENDIAN
|
||||
auto const tmp = createTempCopy("firebird_empty_be.odb");
|
||||
#else
|
||||
auto const tmp = createTempCopy("firebird_empty_le.odb");
|
||||
auto const tmp = createTempCopy(u"firebird_empty_le.odb");
|
||||
#endif
|
||||
uno::Reference< XOfficeDatabaseDocument > xDocument =
|
||||
getDocumentForUrl(tmp.GetURL());
|
||||
@ -64,7 +64,7 @@ void FirebirdTest::testIntegerDatabase()
|
||||
getDocumentForFileName("firebird_integer_be_ods12.odb");
|
||||
#else
|
||||
uno::Reference< XOfficeDatabaseDocument > xDocument =
|
||||
getDocumentForFileName("firebird_integer_le_ods12.odb");
|
||||
getDocumentForFileName(u"firebird_integer_le_ods12.odb");
|
||||
#endif
|
||||
|
||||
uno::Reference< XConnection > xConnection =
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
*/
|
||||
void FirebirdTest::testEmptyDBConnection()
|
||||
{
|
||||
auto const tmp = createTempCopy("firebird_empty.odb");
|
||||
auto const tmp = createTempCopy(u"firebird_empty.odb");
|
||||
uno::Reference< XOfficeDatabaseDocument > xDocument =
|
||||
getDocumentForUrl(tmp.GetURL());
|
||||
|
||||
@ -56,7 +56,7 @@ void FirebirdTest::testEmptyDBConnection()
|
||||
void FirebirdTest::testIntegerDatabase()
|
||||
{
|
||||
uno::Reference< XOfficeDatabaseDocument > xDocument =
|
||||
getDocumentForFileName("firebird_integer_ods12.odb");
|
||||
getDocumentForFileName(u"firebird_integer_ods12.odb");
|
||||
|
||||
uno::Reference< XConnection > xConnection =
|
||||
getConnectionForDocument(xDocument);
|
||||
|
@ -46,7 +46,7 @@ void HsqlBinaryImportTest::testBinaryImport()
|
||||
}
|
||||
|
||||
// the migration requires the file to be writable
|
||||
utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
|
||||
utl::TempFile const temp(createTempCopy(u"hsqldb_migration_test.odb"));
|
||||
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
|
||||
|
||||
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
*/
|
||||
void HSQLDBTest::testEmptyDBConnection()
|
||||
{
|
||||
auto const file = createTempCopy("hsqldb_empty.odb");
|
||||
auto const file = createTempCopy(u"hsqldb_empty.odb");
|
||||
uno::Reference<XOfficeDatabaseDocument> xDocument = getDocumentForUrl(file.GetURL());
|
||||
|
||||
getConnectionForDocument(xDocument);
|
||||
|
@ -66,7 +66,7 @@ void Tdf119625Test::testTime()
|
||||
}
|
||||
|
||||
// the migration requires the file to be writable
|
||||
utl::TempFile const temp(createTempCopy("tdf119625.odb"));
|
||||
utl::TempFile const temp(createTempCopy(u"tdf119625.odb"));
|
||||
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
|
||||
|
||||
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
|
||||
|
@ -60,7 +60,7 @@ void Tdf126268Test::testNumbers()
|
||||
}
|
||||
|
||||
// the migration requires the file to be writable
|
||||
utl::TempFile const temp(createTempCopy("tdf126268.odb"));
|
||||
utl::TempFile const temp(createTempCopy(u"tdf126268.odb"));
|
||||
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
|
||||
|
||||
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
|
||||
|
@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include "KeySet.hxx"
|
||||
#include <sal/log.hxx>
|
||||
#include <core_resource.hxx>
|
||||
@ -209,13 +211,13 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
|
||||
|
||||
namespace
|
||||
{
|
||||
void appendOneKeyColumnClause( const OUString &tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
|
||||
void appendOneKeyColumnClause( std::u16string_view tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
|
||||
{
|
||||
OUString fullName;
|
||||
if (tblName.isEmpty())
|
||||
if (tblName.empty())
|
||||
fullName = colName;
|
||||
else
|
||||
fullName = tblName + "." + colName;
|
||||
fullName = OUString::Concat(tblName) + "." + colName;
|
||||
if ( _rValue.isNull() )
|
||||
{
|
||||
o_buf.append(fullName).append(" IS NULL ");
|
||||
|
@ -611,7 +611,7 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r
|
||||
namespace
|
||||
{
|
||||
OUString getComposedClause( const OUString& _rElementaryClause, const OUString& _rAdditionalClause,
|
||||
TokenComposer& _rComposer, const OUString& _rKeyword )
|
||||
TokenComposer& _rComposer, std::u16string_view _rKeyword )
|
||||
{
|
||||
_rComposer.clear();
|
||||
_rComposer.append( _rElementaryClause );
|
||||
|
@ -17,6 +17,10 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "parseschema.hxx"
|
||||
#include "fbcreateparser.hxx"
|
||||
#include "fbalterparser.hxx"
|
||||
@ -89,9 +93,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
OUString lcl_createAlterForeign(const OUString& sForeignPart, const OUString& sTableName)
|
||||
OUString lcl_createAlterForeign(std::u16string_view sForeignPart, std::u16string_view sTableName)
|
||||
{
|
||||
return "ALTER TABLE " + sTableName + " ADD " + sForeignPart;
|
||||
return OUString::Concat("ALTER TABLE ") + sTableName + " ADD " + sForeignPart;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user