loplugin:bufferadd loosen some constraints
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
f33b6e341f
commit
4a96fb8ec0
@ -1786,11 +1786,7 @@ void Bridge::map_to_java(
|
||||
if (in_param)
|
||||
{
|
||||
// call static <enum_class>.fromInt( int )
|
||||
OStringBuffer sig_buf( 5 + class_name.getLength() );
|
||||
sig_buf.append( "(I)L" );
|
||||
sig_buf.append( class_name.replace( '.', '/' ) );
|
||||
sig_buf.append( ';' );
|
||||
OString sig( sig_buf.makeStringAndClear() );
|
||||
OString sig = "(I)L" + class_name.replace( '.', '/' ) + ";";
|
||||
jmethodID method_id = jni->GetStaticMethodID(
|
||||
static_cast<jclass>(jo_enum_class.get()), "fromInt", sig.getStr() );
|
||||
jni.ensure_no_exception();
|
||||
@ -2275,11 +2271,7 @@ void Bridge::map_to_java(
|
||||
if (0 < nElements)
|
||||
{
|
||||
// call static <enum_class>.fromInt( int )
|
||||
OStringBuffer sig_buf( 5 + class_name.getLength() );
|
||||
sig_buf.append( "(I)L" );
|
||||
sig_buf.append( class_name.replace( '.', '/' ) );
|
||||
sig_buf.append( ';' );
|
||||
OString sig( sig_buf.makeStringAndClear() );
|
||||
OString sig = "(I)L" + class_name.replace( '.', '/' ) + ";";
|
||||
jmethodID method_id = jni->GetStaticMethodID(
|
||||
static_cast<jclass>(jo_enum_class.get()), "fromInt", sig.getStr() );
|
||||
jni.ensure_no_exception();
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
return false;
|
||||
if (loplugin::isSamePathname(fn, SRCDIR "/writerfilter/source/dmapper/GraphicImport.cxx"))
|
||||
return false;
|
||||
if (loplugin::isSamePathname(fn, SRCDIR "/sdext/source/pdfimport/pdfparse/pdfparse.cxx"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -174,14 +176,15 @@ void BufferAdd::findBufferAssignOrAdd(const Stmt* parentStmt, Stmt const* stmt)
|
||||
return;
|
||||
}
|
||||
auto tc2 = loplugin::TypeCheck(cxxConstructExpr->getArg(0)->getType());
|
||||
if (cxxConstructExpr->getArg(0)->getType()->isBuiltinType()
|
||||
|| tc2.LvalueReference().Class("OUStringBuffer")
|
||||
if (tc2.LvalueReference().Class("OUStringBuffer")
|
||||
|| tc2.LvalueReference().Class("OStringBuffer")
|
||||
|| tc2.Class("OUStringBuffer") || tc2.Class("OStringBuffer"))
|
||||
{
|
||||
badMap.insert(varDeclLHS);
|
||||
return;
|
||||
}
|
||||
addToGoodMap(varDeclLHS, parentStmt);
|
||||
return;
|
||||
}
|
||||
if (!isSideEffectFree(varDeclLHS->getInit()))
|
||||
badMap.insert(varDeclLHS);
|
||||
@ -289,32 +292,6 @@ bool BufferAdd::isMethodOkToMerge(CXXMemberCallExpr const* memberCall)
|
||||
return false;
|
||||
|
||||
auto rhs = memberCall->getArg(0);
|
||||
|
||||
if (loplugin::TypeCheck(memberCall->getType())
|
||||
.Class("OStringBuffer")
|
||||
.Namespace("rtl")
|
||||
.GlobalNamespace())
|
||||
{
|
||||
// because we have no OStringLiteral1
|
||||
if (tc2.Char())
|
||||
return false;
|
||||
// Can't see how to make the call to append(sal_Unicode*pStart, sal_Unicode*pEnd) work
|
||||
if (memberCall->getNumArgs() == 2 && loplugin::TypeCheck(rhs->getType()).Pointer())
|
||||
return false;
|
||||
}
|
||||
if (loplugin::TypeCheck(memberCall->getType())
|
||||
.Class("OUStringBuffer")
|
||||
.Namespace("rtl")
|
||||
.GlobalNamespace())
|
||||
{
|
||||
// character literals we do with OUStringBuffer, not variables of type sal_Unicode/char
|
||||
if (tc2.Typedef("sal_Unicode").GlobalNamespace() && !isa<CharacterLiteral>(rhs))
|
||||
return false;
|
||||
// Can't see how to make the call to append(sal_Unicode*pStart, sal_Unicode*pEnd) work
|
||||
if (memberCall->getNumArgs() == 2
|
||||
&& loplugin::TypeCheck(memberCall->getArg(0)->getType()).Pointer())
|
||||
return false;
|
||||
}
|
||||
if (!isSideEffectFree(rhs))
|
||||
return false;
|
||||
return true;
|
||||
@ -357,7 +334,8 @@ bool BufferAdd::isSideEffectFree(Expr const* expr)
|
||||
if (calleeMethodDecl && calleeMethodDecl->getIdentifier())
|
||||
{
|
||||
auto name = calleeMethodDecl->getName();
|
||||
if (name == "number" || name == "unacquired")
|
||||
if (callExpr->getNumArgs() > 0
|
||||
&& (name == "number" || name == "unacquired" || name == "boolean"))
|
||||
{
|
||||
auto tc = loplugin::TypeCheck(calleeMethodDecl->getParent());
|
||||
if (tc.Class("OUString") || tc.Class("OString"))
|
||||
|
@ -29,6 +29,23 @@ void f2()
|
||||
OUStringBuffer v;
|
||||
v.append("xxx").append("aaaa");
|
||||
}
|
||||
void f3(OString class_name)
|
||||
{
|
||||
// expected-error@+1 {{convert this append sequence into a *String + sequence [loplugin:bufferadd]}}
|
||||
OStringBuffer sig_buf(5 + class_name.getLength());
|
||||
sig_buf.append("(I)L");
|
||||
//sig_buf.append( class_name.replace( '.', '/' ) );
|
||||
sig_buf.append(';');
|
||||
OString sig(sig_buf.makeStringAndClear());
|
||||
(void)sig;
|
||||
}
|
||||
void f4(sal_Unicode const* pPathBegin)
|
||||
{
|
||||
// expected-error@+1 {{convert this append sequence into a *String + sequence [loplugin:bufferadd]}}
|
||||
OUStringBuffer v;
|
||||
v.append(pPathBegin, 12);
|
||||
v.append("aaaa");
|
||||
}
|
||||
}
|
||||
|
||||
namespace test2
|
||||
|
@ -260,9 +260,9 @@ void CustomNotebookbarGenerator::createCustomizedUIFile()
|
||||
|
||||
Sequence<OUString> CustomNotebookbarGenerator::getCustomizedUIItem(OUString sNotebookbarConfigType)
|
||||
{
|
||||
OUStringBuffer aPath = getAppNameRegistryPath();
|
||||
const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(),
|
||||
aPath.makeStringAndClear(), false);
|
||||
OUString aPath = getAppNameRegistryPath();
|
||||
const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(), aPath,
|
||||
false);
|
||||
|
||||
const utl::OConfigurationNode aModesNode = aAppNode.openNode("Modes");
|
||||
const utl::OConfigurationNode aModeNode(aModesNode.openNode(sNotebookbarConfigType));
|
||||
@ -275,9 +275,9 @@ Sequence<OUString> CustomNotebookbarGenerator::getCustomizedUIItem(OUString sNot
|
||||
void CustomNotebookbarGenerator::setCustomizedUIItem(Sequence<OUString> sUIItemProperties,
|
||||
OUString sNotebookbarConfigType)
|
||||
{
|
||||
OUStringBuffer aPath = getAppNameRegistryPath();
|
||||
const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(),
|
||||
aPath.makeStringAndClear(), true);
|
||||
OUString aPath = getAppNameRegistryPath();
|
||||
const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(), aPath,
|
||||
true);
|
||||
const utl::OConfigurationNode aModesNode = aAppNode.openNode("Modes");
|
||||
const utl::OConfigurationNode aModeNode(aModesNode.openNode(sNotebookbarConfigType));
|
||||
|
||||
|
@ -241,10 +241,9 @@ void OApplicationController::deleteObjects( ElementType _eType, const std::vecto
|
||||
// which may also be a part of the list
|
||||
// #i33353#
|
||||
OSL_ENSURE( aThisRound->getLength() - 1 >= 0, "OApplicationController::deleteObjects: empty name?" );
|
||||
OUStringBuffer sSmallestSiblingName( *aThisRound );
|
||||
sSmallestSiblingName.append( sal_Unicode( '/' + 1) );
|
||||
OUString sSmallestSiblingName = *aThisRound + OUStringLiteral1( sal_Unicode( '/' + 1) );
|
||||
|
||||
std::set< OUString >::const_iterator aUpperChildrenBound = aDeleteNames.lower_bound( sSmallestSiblingName.makeStringAndClear() );
|
||||
std::set< OUString >::const_iterator aUpperChildrenBound = aDeleteNames.lower_bound( sSmallestSiblingName );
|
||||
for ( std::set< OUString >::const_iterator aObsolete = aThisRound;
|
||||
aObsolete != aUpperChildrenBound;
|
||||
)
|
||||
|
@ -47,18 +47,14 @@
|
||||
|
||||
namespace {
|
||||
|
||||
static char const separator = static_cast< char >(
|
||||
static_cast< unsigned char >(0xFF));
|
||||
constexpr const char separator[] = "\xff";
|
||||
|
||||
OString oldKey(OUString const & fileName) {
|
||||
return OUStringToOString(fileName, RTL_TEXTENCODING_UTF8);
|
||||
}
|
||||
|
||||
OString newKey(OUString const & id) {
|
||||
OStringBuffer b;
|
||||
b.append(separator);
|
||||
b.append(OUStringToOString(id, RTL_TEXTENCODING_UTF8));
|
||||
return b.makeStringAndClear();
|
||||
return separator + OUStringToOString(id, RTL_TEXTENCODING_UTF8);
|
||||
}
|
||||
|
||||
::dp_manager::ActivePackages::Data decodeOldData(
|
||||
@ -168,7 +164,7 @@ ActivePackages::Entries ActivePackages::getEntries() const {
|
||||
::dp_misc::t_string2string_map m(m_map.getEntries());
|
||||
for (auto const& elem : m)
|
||||
{
|
||||
if (!elem.first.isEmpty() && elem.first[0] == separator) {
|
||||
if (!elem.first.isEmpty() && elem.first[0] == separator[0]) {
|
||||
es.emplace_back(
|
||||
OUString(
|
||||
elem.first.getStr() + 1, elem.first.getLength() - 1,
|
||||
@ -190,18 +186,17 @@ ActivePackages::Entries ActivePackages::getEntries() const {
|
||||
|
||||
void ActivePackages::put(OUString const & id, Data const & data) {
|
||||
#if HAVE_FEATURE_EXTENSIONS
|
||||
OStringBuffer b;
|
||||
b.append(
|
||||
OUStringToOString(data.temporaryName, RTL_TEXTENCODING_UTF8));
|
||||
b.append(separator);
|
||||
b.append(OUStringToOString(data.fileName, RTL_TEXTENCODING_UTF8));
|
||||
b.append(separator);
|
||||
b.append(OUStringToOString(data.mediaType, RTL_TEXTENCODING_UTF8));
|
||||
b.append(separator);
|
||||
b.append(OUStringToOString(data.version, RTL_TEXTENCODING_UTF8));
|
||||
b.append(separator);
|
||||
b.append(OUStringToOString(data.failedPrerequisites, RTL_TEXTENCODING_UTF8));
|
||||
m_map.put(newKey(id), b.makeStringAndClear());
|
||||
OString b =
|
||||
OUStringToOString(data.temporaryName, RTL_TEXTENCODING_UTF8) +
|
||||
separator +
|
||||
OUStringToOString(data.fileName, RTL_TEXTENCODING_UTF8) +
|
||||
separator +
|
||||
OUStringToOString(data.mediaType, RTL_TEXTENCODING_UTF8) +
|
||||
separator +
|
||||
OUStringToOString(data.version, RTL_TEXTENCODING_UTF8) +
|
||||
separator +
|
||||
OUStringToOString(data.failedPrerequisites, RTL_TEXTENCODING_UTF8);
|
||||
m_map.put(newKey(id), b);
|
||||
#else
|
||||
(void) id;
|
||||
(void) data;
|
||||
|
@ -916,14 +916,13 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv )
|
||||
space = true;
|
||||
|
||||
// write native rc:
|
||||
OStringBuffer buf2;
|
||||
buf2.append("ORIGIN=");
|
||||
buf2.append(osOrigin);
|
||||
buf2.append(LF);
|
||||
buf2.append( "UNO_SERVICES=?$ORIGIN/" );
|
||||
buf2.append( OUStringToOString(
|
||||
sNativeRDB, RTL_TEXTENCODING_ASCII_US ) );
|
||||
buf2.append(LF);
|
||||
OString buf2 =
|
||||
"ORIGIN=" +
|
||||
osOrigin +
|
||||
OString(LF) +
|
||||
"UNO_SERVICES=?$ORIGIN/" +
|
||||
OUStringToOString( sNativeRDB, RTL_TEXTENCODING_ASCII_US ) +
|
||||
OString(LF);
|
||||
|
||||
const Reference<io::XInputStream> xData(
|
||||
::xmlscript::createInputStream(
|
||||
|
@ -156,15 +156,15 @@ void BackendDb::removeEntry(OUString const & url)
|
||||
{
|
||||
const OUString sKeyElement = getKeyElementName();
|
||||
const OUString sPrefix = getNSPrefix();
|
||||
OUStringBuffer sExpression(500);
|
||||
sExpression.append(sPrefix);
|
||||
sExpression.append(":");
|
||||
sExpression.append(sKeyElement);
|
||||
sExpression.append("[@url = \"");
|
||||
sExpression.append(url);
|
||||
sExpression.append("\"]");
|
||||
OUString sExpression =
|
||||
sPrefix +
|
||||
":" +
|
||||
sKeyElement +
|
||||
"[@url = \"" +
|
||||
url +
|
||||
"\"]";
|
||||
|
||||
removeElement(sExpression.makeStringAndClear());
|
||||
removeElement(sExpression);
|
||||
}
|
||||
|
||||
void BackendDb::revokeEntry(OUString const & url)
|
||||
@ -242,18 +242,18 @@ Reference<css::xml::dom::XNode> BackendDb::getKeyElement(
|
||||
{
|
||||
const OUString sPrefix = getNSPrefix();
|
||||
const OUString sKeyElement = getKeyElementName();
|
||||
OUStringBuffer sExpression(500);
|
||||
sExpression.append(sPrefix);
|
||||
sExpression.append(":");
|
||||
sExpression.append(sKeyElement);
|
||||
sExpression.append("[@url = \"");
|
||||
sExpression.append(url);
|
||||
sExpression.append("\"]");
|
||||
OUString sExpression =
|
||||
sPrefix +
|
||||
":" +
|
||||
sKeyElement +
|
||||
"[@url = \"" +
|
||||
url +
|
||||
"\"]";
|
||||
|
||||
const Reference<css::xml::dom::XDocument> doc = getDocument();
|
||||
const Reference<css::xml::dom::XNode> root = doc->getFirstChild();
|
||||
const Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI();
|
||||
return xpathApi->selectSingleNode(root, sExpression.makeStringAndClear());
|
||||
return xpathApi->selectSingleNode(root, sExpression);
|
||||
}
|
||||
catch(const css::uno::Exception &)
|
||||
{
|
||||
@ -575,18 +575,18 @@ std::vector<OUString> BackendDb::getOneChildFromAllEntries(
|
||||
Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI();
|
||||
const OUString sPrefix = getNSPrefix();
|
||||
const OUString sKeyElement = getKeyElementName();
|
||||
OUStringBuffer buf(512);
|
||||
buf.append(sPrefix);
|
||||
buf.append(":");
|
||||
buf.append(sKeyElement);
|
||||
buf.append("/");
|
||||
buf.append(sPrefix);
|
||||
buf.append(":");
|
||||
buf.append(name);
|
||||
buf.append("/text()");
|
||||
OUString sNodeSelectExpr =
|
||||
sPrefix +
|
||||
":" +
|
||||
sKeyElement +
|
||||
"/" +
|
||||
sPrefix +
|
||||
":" +
|
||||
name +
|
||||
"/text()";
|
||||
|
||||
Reference<css::xml::dom::XNodeList> nodes =
|
||||
xpathApi->selectNodeList(root, buf.makeStringAndClear());
|
||||
xpathApi->selectNodeList(root, sNodeSelectExpr);
|
||||
if (nodes.is())
|
||||
{
|
||||
sal_Int32 length = nodes->getLength();
|
||||
|
@ -477,16 +477,13 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap)
|
||||
|
||||
// create file name from screen resolution information
|
||||
OStringBuffer aStrBuf( 128 );
|
||||
OStringBuffer aResBuf( 32 );
|
||||
aStrBuf.append( "intro_" );
|
||||
if ( !_sAppName.isEmpty() )
|
||||
{
|
||||
aStrBuf.append( OUStringToOString(_sAppName, RTL_TEXTENCODING_UTF8) );
|
||||
aStrBuf.append( "_" );
|
||||
}
|
||||
aResBuf.append( OString::number( nWidth ));
|
||||
aResBuf.append( "x" );
|
||||
aResBuf.append( OString::number( nHeight ));
|
||||
OString aResBuf = OString::number( nWidth ) + "x" + OString::number( nHeight );
|
||||
|
||||
aStrBuf.append( aResBuf.getStr() );
|
||||
if (Application::LoadBrandBitmap (aStrBuf.makeStringAndClear().getStr(), rBitmap))
|
||||
@ -494,7 +491,7 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap)
|
||||
|
||||
aStrBuf.append( "intro_" );
|
||||
aStrBuf.append( aResBuf.getStr() );
|
||||
if (Application::LoadBrandBitmap (aResBuf.makeStringAndClear().getStr(), rBitmap))
|
||||
if (Application::LoadBrandBitmap (aResBuf.getStr(), rBitmap))
|
||||
return;
|
||||
|
||||
(void)Application::LoadBrandBitmap ("intro", rBitmap);
|
||||
|
@ -122,10 +122,7 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
|
||||
|
||||
OUString SvxBulletItem::GetFullText() const
|
||||
{
|
||||
OUStringBuffer aStr(aPrevText);
|
||||
aStr.append(cSymbol);
|
||||
aStr.append(aFollowText);
|
||||
return aStr.makeStringAndClear();
|
||||
return aPrevText + OUStringLiteral1(cSymbol) + aFollowText;
|
||||
}
|
||||
|
||||
|
||||
|
@ -334,14 +334,7 @@ OUString HelpOnStartup::ist_createHelpURL(const OUString& sBaseURL,
|
||||
const OUString& sLocale ,
|
||||
const OUString& sSystem )
|
||||
{
|
||||
OUStringBuffer sHelpURL(256);
|
||||
sHelpURL.append (sBaseURL );
|
||||
sHelpURL.append("?Language=");
|
||||
sHelpURL.append (sLocale );
|
||||
sHelpURL.append("&System=" );
|
||||
sHelpURL.append (sSystem );
|
||||
|
||||
return sHelpURL.makeStringAndClear();
|
||||
return sBaseURL + "?Language=" + sLocale + "&System=" + sSystem;
|
||||
}
|
||||
|
||||
} // namespace framework
|
||||
|
@ -974,11 +974,9 @@ void ToolbarLayoutManager::childWindowEvent( VclSimpleEvent const * pEvent )
|
||||
OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox );
|
||||
if ( !aToolbarName.isEmpty() )
|
||||
{
|
||||
OUStringBuffer aBuf(100);
|
||||
aBuf.append( "private:resource/toolbar/" );
|
||||
aBuf.append( aToolbarName );
|
||||
OUString aToolbarUrl = "private:resource/toolbar/" + aToolbarName;
|
||||
|
||||
UIElement aToolbar = implts_findToolbar( aBuf.makeStringAndClear() );
|
||||
UIElement aToolbar = implts_findToolbar( aToolbarUrl );
|
||||
if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating )
|
||||
{
|
||||
implts_setLayoutDirty();
|
||||
|
@ -116,14 +116,12 @@ void Desktop::constructorInit()
|
||||
InterceptionHelper* pInterceptionHelper = new InterceptionHelper( this, xDispatchProvider );
|
||||
m_xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
|
||||
|
||||
OUStringBuffer sUntitledPrefix (256);
|
||||
sUntitledPrefix.append (FwkResId(STR_UNTITLED_DOCUMENT));
|
||||
sUntitledPrefix.append (" ");
|
||||
OUString sUntitledPrefix = FwkResId(STR_UNTITLED_DOCUMENT) + " ";
|
||||
|
||||
::comphelper::NumberedCollection* pNumbers = new ::comphelper::NumberedCollection ();
|
||||
m_xTitleNumberGenerator.set(static_cast< ::cppu::OWeakObject* >(pNumbers), css::uno::UNO_QUERY_THROW);
|
||||
pNumbers->setOwner ( static_cast< ::cppu::OWeakObject* >(this) );
|
||||
pNumbers->setUntitledPrefix ( sUntitledPrefix.makeStringAndClear () );
|
||||
pNumbers->setUntitledPrefix ( sUntitledPrefix );
|
||||
|
||||
// Safe impossible cases
|
||||
// We can't work without this helper!
|
||||
|
@ -581,27 +581,26 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
|
||||
return xBI = listItem.xBI;
|
||||
}
|
||||
|
||||
sal_Unicode under = '_';
|
||||
OUStringLiteral under("_");
|
||||
|
||||
sal_Int32 l = rLocale.Language.getLength();
|
||||
sal_Int32 c = rLocale.Country.getLength();
|
||||
sal_Int32 v = rLocale.Variant.getLength();
|
||||
OUStringBuffer aBuf(l+c+v+3);
|
||||
|
||||
if ((l > 0 && c > 0 && v > 0 &&
|
||||
// load service with name <base>_<lang>_<country>_<variant>
|
||||
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append(
|
||||
rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear())) ||
|
||||
createLocaleSpecificBreakIterator(rLocale.Language + under +
|
||||
rLocale.Country + under + rLocale.Variant)) ||
|
||||
(l > 0 && c > 0 &&
|
||||
// load service with name <base>_<lang>_<country>
|
||||
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append(
|
||||
rLocale.Country).makeStringAndClear())) ||
|
||||
createLocaleSpecificBreakIterator(rLocale.Language + under +
|
||||
rLocale.Country)) ||
|
||||
(l > 0 && c > 0 && rLocale.Language == "zh" &&
|
||||
(rLocale.Country == "HK" ||
|
||||
rLocale.Country == "MO" ) &&
|
||||
// if the country code is HK or MO, one more step to try TW.
|
||||
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append(
|
||||
"TW").makeStringAndClear())) ||
|
||||
createLocaleSpecificBreakIterator(rLocale.Language + under +
|
||||
"TW")) ||
|
||||
(l > 0 &&
|
||||
// load service with name <base>_<lang>
|
||||
createLocaleSpecificBreakIterator(rLocale.Language)) ||
|
||||
|
@ -195,10 +195,7 @@ void BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Locale& rLocal
|
||||
}
|
||||
|
||||
status = U_ZERO_ERROR;
|
||||
OStringBuffer aUDName(64);
|
||||
aUDName.append(rule);
|
||||
aUDName.append('_');
|
||||
aUDName.append( aLanguage);
|
||||
OString aUDName = rtl::OStringView(rule) + "_" + aLanguage;
|
||||
UDataMemory* pUData = udata_open("OpenOffice", "brk", aUDName.getStr(), &status);
|
||||
if( U_SUCCESS(status) )
|
||||
rbi.reset(new OOoRuleBasedBreakIterator( pUData, status));
|
||||
|
@ -497,6 +497,7 @@ struct ToStringHelper< OUStringNumber< T > >
|
||||
class OStringView {
|
||||
public:
|
||||
explicit OStringView(char const * s): view_(s) {}
|
||||
explicit OStringView(char const * s, size_t len): view_(s, len) {}
|
||||
|
||||
std::size_t length() const { return view_.length(); }
|
||||
|
||||
@ -518,6 +519,7 @@ struct ToStringHelper< OStringView >
|
||||
class OUStringView {
|
||||
public:
|
||||
explicit OUStringView(sal_Unicode const * s): view_(s) {}
|
||||
explicit OUStringView(sal_Unicode const * s, size_t len): view_(s, len) {}
|
||||
|
||||
std::size_t length() const { return view_.length(); }
|
||||
|
||||
|
@ -389,11 +389,7 @@ void ScUnoAddInCollection::ReadConfiguration()
|
||||
ppFuncData[nFuncPos+nOld] = nullptr;
|
||||
|
||||
// stored function name: (service name).(function)
|
||||
OUStringBuffer aFuncNameBuffer( aServiceName.getLength()+1+pFuncNameArray[nFuncPos].getLength());
|
||||
aFuncNameBuffer.append(aServiceName);
|
||||
aFuncNameBuffer.append('.');
|
||||
aFuncNameBuffer.append(pFuncNameArray[nFuncPos]);
|
||||
OUString aFuncName = aFuncNameBuffer.makeStringAndClear();
|
||||
OUString aFuncName = aServiceName + "." + pFuncNameArray[nFuncPos];
|
||||
|
||||
// skip the function if already known (read from old AddIn service)
|
||||
|
||||
@ -786,11 +782,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
|
||||
OUString aFuncU = xFunc->getName();
|
||||
|
||||
// stored function name: (service name).(function)
|
||||
OUStringBuffer aFuncNameBuffer( aServiceName.getLength()+1+aFuncU.getLength());
|
||||
aFuncNameBuffer.append(aServiceName);
|
||||
aFuncNameBuffer.append('.');
|
||||
aFuncNameBuffer.append(aFuncU);
|
||||
OUString aFuncName = aFuncNameBuffer.makeStringAndClear();
|
||||
OUString aFuncName = aServiceName + "." + aFuncU;
|
||||
|
||||
bool bValid = true;
|
||||
long nVisibleCount = 0;
|
||||
@ -988,11 +980,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
|
||||
OUString aFuncU = xFunc->getName();
|
||||
|
||||
// stored function name: (service name).(function)
|
||||
OUStringBuffer aFuncNameBuffer( rServiceName.getLength()+1+aFuncU.getLength());
|
||||
aFuncNameBuffer.append(rServiceName);
|
||||
aFuncNameBuffer.append('.');
|
||||
aFuncNameBuffer.append(aFuncU);
|
||||
OUString aFuncName = aFuncNameBuffer.makeStringAndClear();
|
||||
OUString aFuncName = rServiceName + "." + aFuncU;
|
||||
|
||||
// internal names are skipped because no FuncData exists
|
||||
ScUnoAddInFuncData* pOldData = const_cast<ScUnoAddInFuncData*>( GetFuncData( aFuncName ) );
|
||||
|
@ -9144,7 +9144,7 @@ void ScInterpreter::ScFindB()
|
||||
else
|
||||
{
|
||||
// create a string from sStr starting at nStart
|
||||
OUStringBuffer aBuf( lcl_RightB( aStr, nLen - nStart + 1 ) );
|
||||
OUString aBuf = lcl_RightB( aStr, nLen - nStart + 1 );
|
||||
// search aBuf for asStr
|
||||
sal_Int32 nPos = aBuf.indexOf( asStr, 0 );
|
||||
if ( nPos == -1 )
|
||||
@ -9152,7 +9152,7 @@ void ScInterpreter::ScFindB()
|
||||
else
|
||||
{
|
||||
// obtain byte value of nPos
|
||||
int nBytePos = lcl_getLengthB( aBuf.makeStringAndClear(), nPos );
|
||||
int nBytePos = lcl_getLengthB( aBuf, nPos );
|
||||
PushDouble( nBytePos + nStart );
|
||||
}
|
||||
}
|
||||
|
@ -37,10 +37,7 @@ ScUnitConverterData::ScUnitConverterData(
|
||||
OUString ScUnitConverterData::BuildIndexString(
|
||||
const OUString& rFromUnit, const OUString& rToUnit )
|
||||
{
|
||||
OUStringBuffer aBuf(rFromUnit);
|
||||
aBuf.append(cDelim);
|
||||
aBuf.append(rToUnit);
|
||||
return aBuf.makeStringAndClear();
|
||||
return rFromUnit + OUStringLiteral1(cDelim) + rToUnit;
|
||||
}
|
||||
|
||||
// ScUnitConverter
|
||||
|
@ -975,9 +975,7 @@ OUString XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const OUString& rA
|
||||
|
||||
OUString XclExpUrlHelper::EncodeDde( const OUString& rApplic, const OUString& rTopic )
|
||||
{
|
||||
OUStringBuffer aBuf;
|
||||
aBuf.append(rApplic).append(EXC_DDE_DELIM).append(rTopic);
|
||||
return aBuf.makeStringAndClear();
|
||||
return rApplic + OUStringLiteral1(EXC_DDE_DELIM) + rTopic;
|
||||
}
|
||||
|
||||
// Cached Value Lists =========================================================
|
||||
|
@ -1064,10 +1064,9 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC
|
||||
if (pNote)
|
||||
{
|
||||
//create the comment indicator
|
||||
OStringBuffer aStr(OOO_STRING_SVTOOLS_HTML_anchor);
|
||||
aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_class)
|
||||
.append("=\"").append("comment-indicator").append("\"");
|
||||
TAG_ON(aStr.makeStringAndClear().getStr());
|
||||
OString aStr = OOO_STRING_SVTOOLS_HTML_anchor " "
|
||||
OOO_STRING_SVTOOLS_HTML_O_class "=\"comment-indicator\"";
|
||||
TAG_ON(aStr.getStr());
|
||||
TAG_OFF(OOO_STRING_SVTOOLS_HTML_anchor);
|
||||
OUT_LF();
|
||||
|
||||
|
@ -148,13 +148,9 @@ bool ScViewUtil::IsActionShown( const ScChangeAction& rAction,
|
||||
|
||||
if ( rSettings.HasComment() )
|
||||
{
|
||||
OUStringBuffer aBuf(rAction.GetComment());
|
||||
aBuf.append(" (");
|
||||
OUString aTmp;
|
||||
rAction.GetDescription(aTmp, &rDocument);
|
||||
aBuf.append(aTmp);
|
||||
aBuf.append(')');
|
||||
OUString aComStr = aBuf.makeStringAndClear();
|
||||
OUString aComStr = rAction.GetComment() + " (" + aTmp + ")";
|
||||
|
||||
if(!rSettings.IsValidComment(&aComStr))
|
||||
return false;
|
||||
|
@ -362,9 +362,9 @@ uno::Sequence<beans::PropertyValue>
|
||||
{
|
||||
// Such specific path construction is grim.
|
||||
|
||||
OUStringBuffer aName( getNameOfType( t ) );
|
||||
OUString aName( getNameOfType( t ) );
|
||||
OUString aResult;
|
||||
if( pList->SaveTo( xSubStorage, aName.makeStringAndClear(), &aResult ) )
|
||||
if( pList->SaveTo( xSubStorage, aName, &aResult ) )
|
||||
{
|
||||
OUString aRealPath = "Settings/" + aResult;
|
||||
aRet[i].Value <<= aRealPath;
|
||||
|
@ -101,10 +101,7 @@ OUString pdfi::getColorString( const rendering::ARGBColor& rCol )
|
||||
|
||||
OUString pdfi::getPercentString(double value)
|
||||
{
|
||||
OUStringBuffer buf(32);
|
||||
buf.append(value);
|
||||
buf.append("%");
|
||||
return buf.makeStringAndClear();
|
||||
return OUString::number(value) + "%";
|
||||
}
|
||||
|
||||
OUString pdfi::unitMMString( double fMM )
|
||||
|
@ -428,12 +428,12 @@ PDFObjectRef::~PDFObjectRef()
|
||||
|
||||
bool PDFObjectRef::emit( EmitContext& rWriteContext ) const
|
||||
{
|
||||
OStringBuffer aBuf( 16 );
|
||||
aBuf.append( ' ' );
|
||||
aBuf.append( sal_Int32( m_nNumber ) );
|
||||
aBuf.append( ' ' );
|
||||
aBuf.append( sal_Int32( m_nGeneration ) );
|
||||
aBuf.append( " R" );
|
||||
OString aBuf =
|
||||
" " +
|
||||
OString::number( sal_Int32( m_nNumber ) ) +
|
||||
" " +
|
||||
OString::number( sal_Int32( m_nGeneration ) ) +
|
||||
" R";
|
||||
return rWriteContext.write( aBuf.getStr(), aBuf.getLength() );
|
||||
}
|
||||
|
||||
@ -806,11 +806,11 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const
|
||||
if( pEData )
|
||||
pEData->insertXref( m_nNumber, m_nGeneration, rWriteContext.getCurPos() );
|
||||
|
||||
OStringBuffer aBuf( 32 );
|
||||
aBuf.append( sal_Int32( m_nNumber ) );
|
||||
aBuf.append( ' ' );
|
||||
aBuf.append( sal_Int32( m_nGeneration ) );
|
||||
aBuf.append( " obj\n" );
|
||||
OString aBuf =
|
||||
OString::number( sal_Int32( m_nNumber ) ) +
|
||||
" " +
|
||||
OString::number( sal_Int32( m_nGeneration ) ) +
|
||||
" obj\n";
|
||||
if( ! rWriteContext.write( aBuf.getStr(), aBuf.getLength() ) )
|
||||
return false;
|
||||
|
||||
@ -1426,12 +1426,12 @@ bool PDFFile::emit( EmitContext& rWriteContext ) const
|
||||
{
|
||||
setEmitData( rWriteContext, new EmitImplData( this ) );
|
||||
|
||||
OStringBuffer aBuf( 32 );
|
||||
aBuf.append( "%PDF-" );
|
||||
aBuf.append( sal_Int32( m_nMajor ) );
|
||||
aBuf.append( '.' );
|
||||
aBuf.append( sal_Int32( m_nMinor ) );
|
||||
aBuf.append( "\n" );
|
||||
OString aBuf =
|
||||
"%PDF-" +
|
||||
OString::number( sal_Int32( m_nMajor ) ) +
|
||||
"." +
|
||||
OString::number( sal_Int32( m_nMinor ) ) +
|
||||
"\n";
|
||||
if( ! rWriteContext.write( aBuf.getStr(), aBuf.getLength() ) )
|
||||
return false;
|
||||
return emitSubElements( rWriteContext );
|
||||
|
@ -60,10 +60,7 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc
|
||||
OUString aStr( OStringToOUString( pDir, RTL_TEXTENCODING_UTF8 ) );
|
||||
OUString aFileURL;
|
||||
osl_getFileURLFromSystemPath( aStr.pData, &aFileURL.pData );
|
||||
OUStringBuffer aBuf( 256 );
|
||||
aBuf.append( aFileURL );
|
||||
aBuf.append( "/pdfimport.xml" );
|
||||
pStream = new osl::File( aBuf.makeStringAndClear() );
|
||||
pStream = new osl::File( aFileURL + "/pdfimport.xml" );
|
||||
if( pStream->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create ) )
|
||||
{
|
||||
pStream->open( osl_File_OpenFlag_Write );
|
||||
@ -168,10 +165,7 @@ void SaxEmitter::endTag( const char* pTag )
|
||||
for( int i = 0; i < nIndent; i++ )
|
||||
pStream->write( " ", 4, nWritten );
|
||||
|
||||
OStringBuffer aBuf( 1024 );
|
||||
aBuf.append( "</" );
|
||||
aBuf.append( pTag );
|
||||
aBuf.append( ">\n" );
|
||||
OString aBuf = "</" + rtl::OStringView(pTag) + ">\n";
|
||||
pStream->write( aBuf.getStr(), aBuf.getLength(), nWritten );
|
||||
nIndent--;
|
||||
#endif
|
||||
|
@ -813,10 +813,7 @@ void DrawXmlFinalizer::visit( HyperlinkElement&, const std::list< std::unique_pt
|
||||
|
||||
static void SetFontsizeProperties(PropertyMap& props, double fontSize)
|
||||
{
|
||||
OUStringBuffer aBuf(32);
|
||||
aBuf.append(fontSize * 72 / PDFI_OUTDEV_RESOLUTION);
|
||||
aBuf.append("pt");
|
||||
OUString aFSize = aBuf.makeStringAndClear();
|
||||
OUString aFSize = OUString::number(fontSize * 72 / PDFI_OUTDEV_RESOLUTION) + "pt";
|
||||
props["fo:font-size"] = aFSize;
|
||||
props["style:font-size-asian"] = aFSize;
|
||||
props["style:font-size-complex"] = aFSize;
|
||||
|
@ -925,10 +925,7 @@ void WriterXmlFinalizer::visit( TextElement& elem, const std::list< std::unique_
|
||||
aFontProps[ "style:text-outline" ] = "true";
|
||||
}
|
||||
// size
|
||||
OUStringBuffer aBuf( 32 );
|
||||
aBuf.append( rFont.size*72/PDFI_OUTDEV_RESOLUTION );
|
||||
aBuf.append( "pt" );
|
||||
OUString aFSize = aBuf.makeStringAndClear();
|
||||
OUString aFSize = OUString::number( rFont.size*72/PDFI_OUTDEV_RESOLUTION ) + "pt";
|
||||
aFontProps[ "fo:font-size" ] = aFSize;
|
||||
aFontProps[ "style:font-size-asian" ] = aFSize;
|
||||
aFontProps[ "style:font-size-complex" ] = aFSize;
|
||||
|
@ -257,8 +257,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
|
||||
for ( nSub=0; nSub<nSubCount; nSub++ )
|
||||
{
|
||||
// search sub item by name
|
||||
OStringBuffer aStr;
|
||||
aStr.append(pSlot->pUnoName).append('.').append(pType->aAttrib[nSub].pName);
|
||||
OString aStr = rtl::OStringView(pSlot->pUnoName) + "." + pType->aAttrib[nSub].pName;
|
||||
if ( rPropValue.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
|
||||
{
|
||||
sal_uInt8 nSubId = static_cast<sal_uInt8>(static_cast<sal_Int8>(pType->aAttrib[nSub].nAID));
|
||||
@ -364,8 +363,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
|
||||
for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
|
||||
{
|
||||
// search sub item by name
|
||||
OStringBuffer aStr;
|
||||
aStr.append(rArg.pName).append('.').append(pType->aAttrib[nSub].pName);
|
||||
OString aStr = rtl::OStringView(rArg.pName) + "." + pType->aAttrib[nSub].pName;
|
||||
if ( rProp.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
|
||||
{
|
||||
// at least one member found ...
|
||||
|
@ -120,10 +120,9 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
|
||||
if( pIndent )
|
||||
rStrm.WriteCharPtr( pIndent );
|
||||
|
||||
OStringBuffer sOut;
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_base).append(' ')
|
||||
.append(OOO_STRING_SVTOOLS_HTML_O_target).append("=\"");
|
||||
rStrm.WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut = "<" OOO_STRING_SVTOOLS_HTML_base " "
|
||||
OOO_STRING_SVTOOLS_HTML_O_target "=\"";
|
||||
rStrm.WriteOString( sOut );
|
||||
HTMLOutFuncs::Out_String( rStrm, rTarget, eDestEnc, pNonConvertableChars )
|
||||
.WriteCharPtr( "\">" );
|
||||
}
|
||||
|
@ -1780,19 +1780,19 @@ void FileDialogHelper_Impl::addFilters( const OUString& rFactory,
|
||||
m_nDontFlags |= nDont;
|
||||
|
||||
// create the list of filters
|
||||
OUStringBuffer sQuery(256);
|
||||
sQuery.append("getSortedFilterList()");
|
||||
sQuery.append(":module=");
|
||||
sQuery.append(rFactory); // use long name here !
|
||||
sQuery.append(":iflags=");
|
||||
sQuery.append(OUString::number(static_cast<sal_Int32>(m_nMustFlags)));
|
||||
sQuery.append(":eflags=");
|
||||
sQuery.append(OUString::number(static_cast<sal_Int32>(m_nDontFlags)));
|
||||
OUString sQuery =
|
||||
"getSortedFilterList()"
|
||||
":module=" +
|
||||
rFactory + // use long name here !
|
||||
":iflags=" +
|
||||
OUString::number(static_cast<sal_Int32>(m_nMustFlags)) +
|
||||
":eflags=" +
|
||||
OUString::number(static_cast<sal_Int32>(m_nDontFlags));
|
||||
|
||||
uno::Reference< XEnumeration > xResult;
|
||||
try
|
||||
{
|
||||
xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear());
|
||||
xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery);
|
||||
}
|
||||
catch( const uno::Exception& )
|
||||
{
|
||||
|
@ -441,8 +441,7 @@ void SfxClassificationHelper::Impl::setStartValidity(SfxClassificationPolicyType
|
||||
{
|
||||
// The policy left the start date unchanged, replace it with the system time.
|
||||
util::DateTime aDateTime = DateTime(DateTime::SYSTEM).GetUNODateTime();
|
||||
OUStringBuffer aBuffer = utl::toISO8601(aDateTime);
|
||||
it->second = aBuffer.toString();
|
||||
it->second = utl::toISO8601(aDateTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,11 +172,8 @@ void PolicyReader::assureToken( sal_Unicode token )
|
||||
sal_Unicode c = get();
|
||||
if (c == token)
|
||||
return;
|
||||
OUStringBuffer buf( 16 );
|
||||
buf.append( "expected >" );
|
||||
buf.append( c );
|
||||
buf.append( "<!" );
|
||||
error( buf.makeStringAndClear() );
|
||||
OUString msg = "expected >" + OUStringLiteral1(c) + "<!";
|
||||
error( msg );
|
||||
}
|
||||
|
||||
OUString PolicyReader::assureQuotedToken()
|
||||
|
@ -435,11 +435,8 @@ bool RuntimePermission::implies( Permission const & perm ) const
|
||||
|
||||
OUString RuntimePermission::toString() const
|
||||
{
|
||||
OUStringBuffer buf( 48 );
|
||||
buf.append( "com.sun.star.security.RuntimePermission (name=\"" );
|
||||
buf.append( m_name );
|
||||
buf.append( "\")" );
|
||||
return buf.makeStringAndClear();
|
||||
return "com.sun.star.security.RuntimePermission (name=\"" +
|
||||
m_name + "\")";
|
||||
}
|
||||
|
||||
|
||||
|
@ -923,9 +923,8 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
|
||||
|
||||
if( pStr )
|
||||
{
|
||||
OStringBuffer sOut;
|
||||
sOut.append(' ').append(pStr).append("=\"");
|
||||
rStrm.WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut = " " + rtl::OStringView(pStr) + "=\"";
|
||||
rStrm.WriteOString( sOut );
|
||||
|
||||
Out_String( rStrm, pMacro->GetMacName(), eDestEnc, pNonConvertableChars ).WriteChar( '\"' );
|
||||
}
|
||||
|
@ -278,14 +278,14 @@ void SwHTMLWriter::OutBasic()
|
||||
{
|
||||
bFirst = false;
|
||||
OutNewLine();
|
||||
OStringBuffer sOut;
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta)
|
||||
.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_httpequiv)
|
||||
.append("=\"")
|
||||
.append(OOO_STRING_SVTOOLS_HTML_META_content_script_type)
|
||||
.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_content)
|
||||
.append("=\"text/x-");
|
||||
Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
"<" OOO_STRING_SVTOOLS_HTML_meta
|
||||
" " OOO_STRING_SVTOOLS_HTML_O_httpequiv
|
||||
"=\""
|
||||
OOO_STRING_SVTOOLS_HTML_META_content_script_type
|
||||
"\" " OOO_STRING_SVTOOLS_HTML_O_content
|
||||
"=\"text/x-";
|
||||
Strm().WriteOString( sOut );
|
||||
// Entities aren't welcome here
|
||||
Strm().WriteOString( OUStringToOString(sLang, m_eDestEnc) )
|
||||
.WriteCharPtr( "\">" );
|
||||
|
@ -509,12 +509,13 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt )
|
||||
if( !bWritten )
|
||||
{
|
||||
OUString sComment(convertLineEnd(rComment, GetSystemLineEnd()));
|
||||
OStringBuffer sOut;
|
||||
// TODO: ???
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_comment)
|
||||
.append(' ').append(OUStringToOString(sComment,
|
||||
static_cast<SwHTMLWriter&>(rWrt).m_eDestEnc)).append(" -->");
|
||||
rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
"<" OOO_STRING_SVTOOLS_HTML_comment
|
||||
" " +
|
||||
OUStringToOString(sComment, static_cast<SwHTMLWriter&>(rWrt).m_eDestEnc) +
|
||||
" -->";
|
||||
rWrt.Strm().WriteOString( sOut );
|
||||
}
|
||||
}
|
||||
else if( SwFieldIds::Script == pFieldTyp->Which() )
|
||||
|
@ -1660,11 +1660,11 @@ static Writer& OutHTML_FrameFormatAsSpacer( Writer& rWrt, const SwFrameFormat& r
|
||||
if( rHTMLWrt.m_bLFPossible )
|
||||
rHTMLWrt.OutNewLine( true );
|
||||
|
||||
OStringBuffer sOut;
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_spacer).append(' ')
|
||||
.append(OOO_STRING_SVTOOLS_HTML_O_type).append("=\"")
|
||||
.append(OOO_STRING_SVTOOLS_HTML_SPTYPE_block).append("\"");
|
||||
rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
"<" OOO_STRING_SVTOOLS_HTML_spacer " "
|
||||
OOO_STRING_SVTOOLS_HTML_O_type "=\""
|
||||
OOO_STRING_SVTOOLS_HTML_SPTYPE_block "\"";
|
||||
rWrt.Strm().WriteOString( sOut );
|
||||
|
||||
// ALIGN, WIDTH, HEIGHT
|
||||
OString aEndTags = rHTMLWrt.OutFrameFormatOptions(rFrameFormat, OUString(), HTML_FRMOPTS_SPACER);
|
||||
|
@ -333,10 +333,10 @@ void SwHTMLWriter::OutFootEndNotes()
|
||||
|
||||
if( m_bLFPossible )
|
||||
OutNewLine();
|
||||
OStringBuffer sOut;
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_division)
|
||||
.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_id).append("=\"");
|
||||
Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
"<" OOO_STRING_SVTOOLS_HTML_division
|
||||
" " OOO_STRING_SVTOOLS_HTML_O_id "=\"";
|
||||
Strm().WriteOString( sOut );
|
||||
HTMLOutFuncs::Out_String( Strm(), sFootnoteName, m_eDestEnc, &m_aNonConvertableCharacters );
|
||||
Strm().WriteCharPtr( "\">" );
|
||||
|
||||
@ -510,11 +510,11 @@ static void lcl_html_outFootEndNoteInfo( Writer& rWrt, OUString const *pParts,
|
||||
}
|
||||
|
||||
rHTMLWrt.OutNewLine();
|
||||
OStringBuffer sOut;
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta).append(' ')
|
||||
.append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\"").append(pName)
|
||||
.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_content).append("=\"");
|
||||
rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
"<" OOO_STRING_SVTOOLS_HTML_meta " "
|
||||
OOO_STRING_SVTOOLS_HTML_O_name "=\"" + rtl::OStringView(pName) +
|
||||
"\" " OOO_STRING_SVTOOLS_HTML_O_content "=\"";
|
||||
rWrt.Strm().WriteOString( sOut );
|
||||
HTMLOutFuncs::Out_String( rWrt.Strm(), aContent.makeStringAndClear(), rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
|
||||
rWrt.Strm().WriteCharPtr( "\">" );
|
||||
}
|
||||
|
@ -1063,9 +1063,9 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode,
|
||||
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_center );
|
||||
else
|
||||
{
|
||||
OStringBuffer sOut(OOO_STRING_SVTOOLS_HTML_division);
|
||||
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append("=\"")
|
||||
.append(OOO_STRING_SVTOOLS_HTML_AL_right).append("\"");
|
||||
OString sOut = OOO_STRING_SVTOOLS_HTML_division
|
||||
" " OOO_STRING_SVTOOLS_HTML_O_align "=\""
|
||||
OOO_STRING_SVTOOLS_HTML_AL_right "\"";
|
||||
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHTMLWrt.GetNamespace() + sOut.getStr() );
|
||||
}
|
||||
rHTMLWrt.IncIndentLevel(); // indent content of <CENTER>
|
||||
|
@ -410,12 +410,11 @@ ErrCode SwHTMLWriter::WriteStream()
|
||||
pSNd->GetSection().GetSectionName(), m_eDestEnc,
|
||||
&m_aNonConvertableCharacters );
|
||||
|
||||
OStringBuffer sOut;
|
||||
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_division)
|
||||
.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_id)
|
||||
.append("=\"").append(aName).append('\"').append('>')
|
||||
.append(aStartTags);
|
||||
aStartTags = sOut.makeStringAndClear();
|
||||
aStartTags =
|
||||
"<" OOO_STRING_SVTOOLS_HTML_division
|
||||
" " OOO_STRING_SVTOOLS_HTML_O_id
|
||||
"=\"" + aName + "\">" +
|
||||
aStartTags;
|
||||
}
|
||||
// FindSectionNode() on a SectionNode return the same!
|
||||
pSNd = pSNd->StartOfSectionNode()->FindSectionNode();
|
||||
@ -1261,9 +1260,9 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, bool bGraphic
|
||||
/// only checking, if transparency is not set.
|
||||
if( rBackColor != COL_TRANSPARENT )
|
||||
{
|
||||
OStringBuffer sOut;
|
||||
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_bgcolor).append('=');
|
||||
Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
" " OOO_STRING_SVTOOLS_HTML_O_bgcolor "=";
|
||||
Strm().WriteOString( sOut );
|
||||
HTMLOutFuncs::Out_Color( Strm(), rBackColor);
|
||||
}
|
||||
|
||||
@ -1375,10 +1374,10 @@ void SwHTMLWriter::OutDirection( SvxFrameDirection nDir )
|
||||
OString sConverted = convertDirection(nDir);
|
||||
if (!sConverted.isEmpty())
|
||||
{
|
||||
OStringBuffer sOut;
|
||||
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_dir)
|
||||
.append("=\"").append(sConverted).append('\"');
|
||||
Strm().WriteOString( sOut.makeStringAndClear() );
|
||||
OString sOut =
|
||||
" " OOO_STRING_SVTOOLS_HTML_O_dir
|
||||
"=\"" + sConverted + "\"";
|
||||
Strm().WriteOString( sOut );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,11 +340,11 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
|
||||
{
|
||||
SwSectionData aSect(FILE_LINK_SECTION,
|
||||
pSh->GetUniqueSectionName());
|
||||
OUStringBuffer sLinkName;
|
||||
sLinkName.append(sfx2::cTokenSeparator);
|
||||
sLinkName.append(sfx2::cTokenSeparator);
|
||||
sLinkName.append(MASTER_LABEL);
|
||||
aSect.SetLinkFileName(sLinkName.makeStringAndClear());
|
||||
OUString sLinkName =
|
||||
OUStringLiteral1(sfx2::cTokenSeparator) +
|
||||
OUStringLiteral1(sfx2::cTokenSeparator) +
|
||||
MASTER_LABEL;
|
||||
aSect.SetLinkFileName(sLinkName);
|
||||
aSect.SetProtectFlag(true);
|
||||
pSh->Insert("."); // Dummytext to allocate the Section
|
||||
pSh->StartOfSection();
|
||||
|
@ -4193,12 +4193,11 @@ bool INetURLObject::removeExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash)
|
||||
if (!pExtension)
|
||||
return true;
|
||||
|
||||
OUStringBuffer aNewPath;
|
||||
aNewPath.append(pPathBegin, pExtension - pPathBegin);
|
||||
aNewPath.append(p, pPathEnd - p);
|
||||
OUString aNewPath =
|
||||
rtl::OUStringView(pPathBegin, pExtension - pPathBegin) +
|
||||
rtl::OUStringView(p, pPathEnd - p);
|
||||
|
||||
return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical,
|
||||
RTL_TEXTENCODING_UTF8);
|
||||
return setPath(aNewPath, EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8);
|
||||
}
|
||||
|
||||
bool INetURLObject::hasFinalSlash() const
|
||||
@ -4223,12 +4222,9 @@ bool INetURLObject::setFinalSlash()
|
||||
if (pPathEnd > pPathBegin && pPathEnd[-1] == '/')
|
||||
return true;
|
||||
|
||||
OUStringBuffer aNewPath;
|
||||
aNewPath.append(pPathBegin, pPathEnd - pPathBegin);
|
||||
aNewPath.append('/');
|
||||
OUString aNewPath = rtl::OUStringView(pPathBegin, pPathEnd - pPathBegin) + "/";
|
||||
|
||||
return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical,
|
||||
RTL_TEXTENCODING_UTF8);
|
||||
return setPath(aNewPath, EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8);
|
||||
}
|
||||
|
||||
bool INetURLObject::removeFinalSlash()
|
||||
|
@ -367,11 +367,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
|
||||
if( nLastTokenIndex > 0 )
|
||||
{
|
||||
aDomain = aFullName.copy( 0, nLastTokenIndex-1 );
|
||||
OStringBuffer aBuf( aDomain.getLength() + 1 + aPartialName.getLength() );
|
||||
aBuf.append( aDomain );
|
||||
aBuf.append( '.' );
|
||||
aBuf.append( aPartialName );
|
||||
aFullName = aBuf.makeStringAndClear();
|
||||
aFullName = aDomain + "." + aPartialName;
|
||||
}
|
||||
else
|
||||
aFullName = aPartialName;
|
||||
@ -1666,10 +1662,7 @@ void PDFWriterImpl::appendLiteralStringEncrypt( const OUString& rInString, const
|
||||
|
||||
void PDFWriterImpl::emitComment( const char* pComment )
|
||||
{
|
||||
OStringBuffer aLine( 64 );
|
||||
aLine.append( "% " );
|
||||
aLine.append( pComment );
|
||||
aLine.append( "\n" );
|
||||
OString aLine = "% " + rtl::OStringView(pComment) + "\n";
|
||||
writeBuffer( aLine.getStr(), aLine.getLength() );
|
||||
}
|
||||
|
||||
@ -2016,23 +2009,22 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle )
|
||||
if( nLink >= 0 && nLink < static_cast<sal_Int32>(m_aLinks.size()) )
|
||||
{
|
||||
// update struct parent of link
|
||||
OStringBuffer aStructParentEntry( 32 );
|
||||
aStructParentEntry.append( i_rEle.m_nObject );
|
||||
aStructParentEntry.append( " 0 R" );
|
||||
m_aStructParentTree.push_back( aStructParentEntry.makeStringAndClear() );
|
||||
OString aStructParentEntry =
|
||||
OString::number( i_rEle.m_nObject ) +
|
||||
" 0 R";
|
||||
m_aStructParentTree.push_back( aStructParentEntry );
|
||||
m_aLinks[ nLink ].m_nStructParent = m_aStructParentTree.size()-1;
|
||||
|
||||
sal_Int32 nRefObject = createObject();
|
||||
OStringBuffer aRef( 256 );
|
||||
aRef.append( nRefObject );
|
||||
aRef.append( " 0 obj\n"
|
||||
"<</Type/OBJR/Obj " );
|
||||
aRef.append( m_aLinks[ nLink ].m_nObject );
|
||||
aRef.append( " 0 R>>\n"
|
||||
"endobj\n\n"
|
||||
);
|
||||
if (updateObject(nRefObject))
|
||||
{
|
||||
OString aRef =
|
||||
OString::number( nRefObject ) +
|
||||
" 0 obj\n"
|
||||
"<</Type/OBJR/Obj " +
|
||||
OString::number( m_aLinks[ nLink ].m_nObject ) +
|
||||
" 0 R>>\n"
|
||||
"endobj\n\n";
|
||||
writeBuffer( aRef.getStr(), aRef.getLength() );
|
||||
}
|
||||
|
||||
@ -3806,8 +3798,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
|
||||
relies on /NeedAppearances in the AcroForm dictionary set to "true"
|
||||
*/
|
||||
beginRedirect( pEditStream, rEdit.m_aRect );
|
||||
OStringBuffer aAppearance( 32 );
|
||||
aAppearance.append( "/Tx BMC\nEMC\n" );
|
||||
OString aAppearance = "/Tx BMC\nEMC\n";
|
||||
writeBuffer( aAppearance.getStr(), aAppearance.getLength() );
|
||||
|
||||
endRedirect();
|
||||
@ -3830,14 +3821,13 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
|
||||
sal_Int32 nBest = getSystemFont( aFont );
|
||||
|
||||
beginRedirect( pListBoxStream, rBox.m_aRect );
|
||||
OStringBuffer aAppearance( 64 );
|
||||
|
||||
setLineColor( COL_TRANSPARENT );
|
||||
setFillColor( replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) );
|
||||
drawRectangle( rBox.m_aRect );
|
||||
|
||||
// empty appearance, see createDefaultEditAppearance for reference
|
||||
aAppearance.append( "/Tx BMC\nEMC\n" );
|
||||
OString aAppearance = "/Tx BMC\nEMC\n";
|
||||
writeBuffer( aAppearance.getStr(), aAppearance.getLength() );
|
||||
|
||||
endRedirect();
|
||||
@ -4940,9 +4930,7 @@ bool PDFWriterImpl::finalizeSignature()
|
||||
// 2- overwrite the value to the m_nSignatureLastByteRangeNoOffset position
|
||||
sal_uInt64 nWritten = 0;
|
||||
CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, m_nSignatureLastByteRangeNoOffset) ) );
|
||||
OStringBuffer aByteRangeNo( 256 );
|
||||
aByteRangeNo.append( nLastByteRangeNo );
|
||||
aByteRangeNo.append( " ]" );
|
||||
OString aByteRangeNo = OString::number( nLastByteRangeNo ) + " ]";
|
||||
|
||||
if (m_aFile.write(aByteRangeNo.getStr(), aByteRangeNo.getLength(), nWritten) != osl::File::E_None)
|
||||
{
|
||||
@ -7423,13 +7411,13 @@ void PDFWriterImpl::drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uI
|
||||
aObjName.append( m_aTransparentObjects.back().m_nExtGStateObject );
|
||||
OString aExtName( aObjName.makeStringAndClear() );
|
||||
|
||||
OStringBuffer aLine( 80 );
|
||||
OString aLine =
|
||||
// insert XObject
|
||||
aLine.append( "q /" );
|
||||
aLine.append( aExtName );
|
||||
aLine.append( " gs /" );
|
||||
aLine.append( aTrName );
|
||||
aLine.append( " Do Q\n" );
|
||||
"q /" +
|
||||
aExtName +
|
||||
" gs /" +
|
||||
aTrName +
|
||||
" Do Q\n";
|
||||
writeBuffer( aLine.getStr(), aLine.getLength() );
|
||||
|
||||
pushResource( ResXObject, aTrName, m_aTransparentObjects.back().m_nObject );
|
||||
@ -7556,13 +7544,13 @@ void PDFWriterImpl::endTransparencyGroup( const tools::Rectangle& rBoundingBox,
|
||||
aObjName.append( m_aTransparentObjects.back().m_nExtGStateObject );
|
||||
OString aExtName( aObjName.makeStringAndClear() );
|
||||
|
||||
OStringBuffer aLine( 80 );
|
||||
OString aLine =
|
||||
// insert XObject
|
||||
aLine.append( "q /" );
|
||||
aLine.append( aExtName );
|
||||
aLine.append( " gs /" );
|
||||
aLine.append( aTrName );
|
||||
aLine.append( " Do Q\n" );
|
||||
"q /" +
|
||||
aExtName +
|
||||
" gs /" +
|
||||
aTrName +
|
||||
" Do Q\n";
|
||||
writeBuffer( aLine.getStr(), aLine.getLength() );
|
||||
|
||||
pushResource( ResXObject, aTrName, m_aTransparentObjects.back().m_nObject );
|
||||
@ -9443,10 +9431,8 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
|
||||
}
|
||||
writeBuffer( aLine.getStr(), aLine.getLength() );
|
||||
|
||||
OStringBuffer aObjName( 16 );
|
||||
aObjName.append( "Im" );
|
||||
aObjName.append(nObject);
|
||||
pushResource( ResXObject, aObjName.makeStringAndClear(), nObject );
|
||||
OString aObjName = "Im" + OString::number(nObject);
|
||||
pushResource( ResXObject, aObjName, nObject );
|
||||
|
||||
}
|
||||
|
||||
@ -9521,11 +9507,9 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx
|
||||
it = m_aBitmaps.begin();
|
||||
}
|
||||
|
||||
OStringBuffer aObjName( 16 );
|
||||
aObjName.append( "Im" );
|
||||
sal_Int32 nObject = it->m_aReferenceXObject.getObject();
|
||||
aObjName.append(nObject);
|
||||
pushResource( ResXObject, aObjName.makeStringAndClear(), nObject );
|
||||
OString aObjName = "Im" + OString::number(nObject);
|
||||
pushResource( ResXObject, aObjName, nObject );
|
||||
|
||||
return *it;
|
||||
}
|
||||
@ -9727,10 +9711,7 @@ void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpape
|
||||
tools::Rectangle aConvertRect( aBmpPos, aBmpSize );
|
||||
m_aPages.back().convertRect( aConvertRect );
|
||||
|
||||
OStringBuffer aNameBuf(16);
|
||||
aNameBuf.append( "Im" );
|
||||
aNameBuf.append( rEmit.m_nObject );
|
||||
OString aImageName( aNameBuf.makeStringAndClear() );
|
||||
OString aImageName = "Im" + OString::number( rEmit.m_nObject );
|
||||
|
||||
// push the pattern
|
||||
OStringBuffer aTilingStream( 32 );
|
||||
@ -10345,8 +10326,7 @@ void PDFWriterImpl::beginStructureElementMCSeq()
|
||||
! m_aStructure[ m_nCurrentStructElement ].m_bOpenMCSeq // already opened sequence
|
||||
)
|
||||
{
|
||||
OStringBuffer aLine( 128 );
|
||||
aLine.append( "/Artifact BMC\n" );
|
||||
OString aLine = "/Artifact BMC\n";
|
||||
writeBuffer( aLine.getStr(), aLine.getLength() );
|
||||
// mark element MC sequence as open
|
||||
m_aStructure[ m_nCurrentStructElement ].m_bOpenMCSeq = true;
|
||||
|
@ -211,18 +211,14 @@ createSpoolDir ()
|
||||
|
||||
do
|
||||
{
|
||||
OUStringBuffer aDir( aTmpDir.getLength() + 16 );
|
||||
aDir.append( aTmpDir );
|
||||
aDir.append( "/psp" );
|
||||
aDir.append(nRand);
|
||||
OUString aResult = aDir.makeStringAndClear();
|
||||
if( osl::Directory::create( aResult ) == osl::FileBase::E_None )
|
||||
OUString aDir = aTmpDir + "/psp" + OUString::number(nRand);
|
||||
if( osl::Directory::create( aDir ) == osl::FileBase::E_None )
|
||||
{
|
||||
osl::File::setAttributes( aResult,
|
||||
osl::File::setAttributes( aDir,
|
||||
osl_File_Attribute_OwnWrite
|
||||
| osl_File_Attribute_OwnRead
|
||||
| osl_File_Attribute_OwnExe );
|
||||
return aResult;
|
||||
return aDir;
|
||||
}
|
||||
nRand++;
|
||||
} while( nRand );
|
||||
|
@ -206,9 +206,6 @@ void CPDManager::addNewPrinter(const OUString& aPrinterName, const OUString& aUn
|
||||
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
|
||||
aPrinter.m_aInfo.m_aComment = OStringToOUString(pDest->info, aEncoding);
|
||||
aPrinter.m_aInfo.m_aLocation = OStringToOUString(pDest->location, aEncoding);
|
||||
OUStringBuffer aBuf( 256 );
|
||||
aBuf.append( "CPD:" );
|
||||
aBuf.append( aUniqueName );
|
||||
// note: the parser that goes with the PrinterInfo
|
||||
// is created implicitly by the JobData::operator=()
|
||||
// when it detects the NULL ptr m_pParser.
|
||||
@ -225,7 +222,7 @@ void CPDManager::addNewPrinter(const OUString& aPrinterName, const OUString& aUn
|
||||
aPrinter.m_aInfo.m_aContext = c_it->second;
|
||||
}
|
||||
aPrinter.m_aInfo.setDefaultBackend(true);
|
||||
aPrinter.m_aInfo.m_aDriverName = aBuf.makeStringAndClear();
|
||||
aPrinter.m_aInfo.m_aDriverName = "CPD:" + aUniqueName;
|
||||
m_aPrinters[ aUniqueName ] = aPrinter;
|
||||
}
|
||||
#endif
|
||||
|
@ -312,11 +312,8 @@ void CUPSManager::initialize()
|
||||
OUString aPrinterName = OStringToOUString( pDest->name, aEncoding );
|
||||
if( pDest->instance && *pDest->instance )
|
||||
{
|
||||
OUStringBuffer aBuf( 256 );
|
||||
aBuf.append( aPrinterName );
|
||||
aBuf.append( '/' );
|
||||
aBuf.append( OStringToOUString( pDest->instance, aEncoding ) );
|
||||
aPrinterName = aBuf.makeStringAndClear();
|
||||
aPrinterName += "/" +
|
||||
OStringToOUString( pDest->instance, aEncoding );
|
||||
}
|
||||
|
||||
// initialize printer with possible configuration from psprint.conf
|
||||
@ -338,9 +335,6 @@ void CUPSManager::initialize()
|
||||
aPrinter.m_aInfo.m_aAuthInfoRequired=OStringToOUString(pDest->options[k].value, aEncoding);
|
||||
}
|
||||
|
||||
OUStringBuffer aBuf( 256 );
|
||||
aBuf.append( "CUPS:" );
|
||||
aBuf.append( aPrinterName );
|
||||
// note: the parser that goes with the PrinterInfo
|
||||
// is created implicitly by the JobData::operator=()
|
||||
// when it detects the NULL ptr m_pParser.
|
||||
@ -357,7 +351,7 @@ void CUPSManager::initialize()
|
||||
aPrinter.m_aInfo.m_aContext = c_it->second;
|
||||
}
|
||||
aPrinter.m_aInfo.setDefaultBackend(bUsePDF);
|
||||
aPrinter.m_aInfo.m_aDriverName = aBuf.makeStringAndClear();
|
||||
aPrinter.m_aInfo.m_aDriverName = "CUPS:" + aPrinterName;
|
||||
|
||||
m_aPrinters[ aPrinter.m_aInfo.m_aPrinterName ] = aPrinter;
|
||||
m_aCUPSDestMap[ aPrinter.m_aInfo.m_aPrinterName ] = nPrinter;
|
||||
|
@ -620,10 +620,10 @@ PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys)
|
||||
pwg_media_t *pPWGMedia = pwgMediaForPWG(o.pData->buffer);
|
||||
if (pPWGMedia != nullptr) {
|
||||
OUStringBuffer aBuf( 256 );
|
||||
aBuf.append( "0 0 " );
|
||||
aBuf.append( PWG_TO_POINTS(pPWGMedia -> width) );
|
||||
aBuf.append( " " );
|
||||
aBuf.append( PWG_TO_POINTS(pPWGMedia -> length) );
|
||||
aBuf = "0 0 " +
|
||||
OUString::number(PWG_TO_POINTS(pPWGMedia -> width)) +
|
||||
" " +
|
||||
OUString::number(PWG_TO_POINTS(pPWGMedia -> length));
|
||||
if ( pImageableAreaValue )
|
||||
pImageableAreaValue->m_aValue = aBuf.makeStringAndClear();
|
||||
aBuf.append( PWG_TO_POINTS(pPWGMedia -> width) );
|
||||
|
@ -846,12 +846,10 @@ void SystemQueueInfo::run()
|
||||
for(const auto & rParm : aParms)
|
||||
{
|
||||
aLines.clear();
|
||||
OStringBuffer aCmdLine( 128 );
|
||||
aCmdLine.append( rParm.pQueueCommand );
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "trying print queue command \"%s\" ... ", rParm.pQueueCommand );
|
||||
#endif
|
||||
aCmdLine.append( " 2>/dev/null" );
|
||||
OString aCmdLine = rParm.pQueueCommand + OStringLiteral(" 2>/dev/null");
|
||||
FILE *pPipe;
|
||||
if( (pPipe = popen( aCmdLine.getStr(), "r" )) )
|
||||
{
|
||||
|
@ -2881,10 +2881,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
|
||||
(c >= 'a' && c <= 'f') ||
|
||||
(c >= 'A' && c <= 'F') )
|
||||
{
|
||||
OUStringBuffer aBuf( rSeq.getLength() + 1 );
|
||||
aBuf.append( rSeq );
|
||||
aBuf.append( c );
|
||||
rSeq = aBuf.makeStringAndClear();
|
||||
rSeq += OUStringLiteral1(c);
|
||||
std::vector<ExtTextInputAttr> attribs( rSeq.getLength(), ExtTextInputAttr::Underline );
|
||||
|
||||
SalExtTextInputEvent aEv;
|
||||
|
@ -180,11 +180,10 @@ void MyWin::parseList( const OString& rList )
|
||||
aElementType = OStringToOUString( aLine.copy( 13 ), RTL_TEXTENCODING_ASCII_US );
|
||||
else
|
||||
{
|
||||
OUStringBuffer aNewElement( 64 );
|
||||
aNewElement.append( aElementType );
|
||||
aNewElement.append( ": " );
|
||||
aNewElement.append( OStringToOUString( aLine, RTL_TEXTENCODING_ASCII_US ) );
|
||||
m_aSvpBitmaps->InsertEntry( aNewElement.makeStringAndClear() );
|
||||
OUString aNewElement =
|
||||
aElementType + ": " +
|
||||
OStringToOUString( aLine, RTL_TEXTENCODING_ASCII_US );
|
||||
m_aSvpBitmaps->InsertEntry( aNewElement );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -238,13 +238,11 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR
|
||||
sal_uInt8 nBlue = (i << 2) & 0xC0;
|
||||
rRenderContext.SetTextColor(Color(nRed, nGreen, nBlue));
|
||||
|
||||
OUStringBuffer aPrintText(1024);
|
||||
|
||||
aPrintText.append( "SVP test program" );
|
||||
OUString aPrintText = "SVP test program";
|
||||
|
||||
rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
|
||||
Size(aPaperSize.Width() - 2100, aPaperSize.Height() - 4000)),
|
||||
aPrintText.makeStringAndClear(),
|
||||
aPrintText,
|
||||
DrawTextFlags::MultiLine);
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ void TextEffectsHandler::lcl_attribute(Id aName, Value& aValue)
|
||||
break;
|
||||
case NS_ooxml::LN_CT_SRgbColor_val:
|
||||
{
|
||||
OUStringBuffer aBuffer = OUString::number(aValue.getInt(), 16);
|
||||
OUString aBuffer = OUString::number(aValue.getInt(), 16);
|
||||
OUStringBuffer aString;
|
||||
comphelper::string::padToLength(aString, 6 - aBuffer.getLength(), '0');
|
||||
aString.append(aBuffer.getStr());
|
||||
|
@ -517,10 +517,9 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
|
||||
|
||||
// Must append 'cBullet' even if it is zero
|
||||
// if 'bBullet' is true and 'cBullet' is zero - BulletChar property must be 0.
|
||||
OUStringBuffer sTmp(1);
|
||||
sTmp.append( cBullet );
|
||||
OUString sTmp = OUStringLiteral1( cBullet );
|
||||
pProps[nPos].Name = "BulletChar";
|
||||
pProps[nPos++].Value <<= sTmp.makeStringAndClear();
|
||||
pProps[nPos++].Value <<= sTmp;
|
||||
|
||||
pProps[nPos].Name = "BulletFont";
|
||||
pProps[nPos++].Value <<= aFDesc;
|
||||
@ -1249,10 +1248,9 @@ void SvxXMLListStyleContext::SetDefaultStyle(
|
||||
pProps->Name = "BulletFont";
|
||||
(pProps++)->Value <<= aFDesc;
|
||||
|
||||
OUStringBuffer sTmp(1);
|
||||
sTmp.append( sal_Unicode(0xF000 + 149) );
|
||||
OUString sTmp = OUStringLiteral1(sal_Unicode(0xF000 + 149));
|
||||
pProps->Name = "BulletChar";
|
||||
(pProps++)->Value <<= sTmp.makeStringAndClear();
|
||||
(pProps++)->Value <<= sTmp;
|
||||
pProps->Name = "CharStyleName";
|
||||
(pProps++)->Value <<= OUString( "Numbering Symbols" );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user