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