indentation fixes

Change-Id: I0a0f04d0f0e008e8947a5a7e3ed6083c1589e61b
This commit is contained in:
Miklos Vajna
2014-07-27 17:30:48 +02:00
parent ae1fb2e921
commit 2197777816
9 changed files with 16 additions and 27 deletions

View File

@@ -1337,8 +1337,7 @@ DECLARE_RTFIMPORT_TEST(testFdo77996, "fdo77996.rtf")
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<document::XDocumentProperties> xProps(xDocumentPropertiesSupplier->getDocumentProperties()); uno::Reference<document::XDocumentProperties> xProps(xDocumentPropertiesSupplier->getDocumentProperties());
CPPUNIT_ASSERT_EQUAL(OUString("Aln Lin (Bei Jing)"), xProps->getAuthor()); CPPUNIT_ASSERT_EQUAL(OUString("Aln Lin (Bei Jing)"), xProps->getAuthor());
OUString aTitle("\xe5\x8e\xa6\xe9\x97\xa8\xe9\x92\xa8\xe4\xb8\x9a\xe8\x82\xa1\xe4\xbb\xbd\xe6\x9c\x89\xe9\x99\x90\xe5\x85\xac\xe5\x8f\xb8", 30, OUString aTitle("\xe5\x8e\xa6\xe9\x97\xa8\xe9\x92\xa8\xe4\xb8\x9a\xe8\x82\xa1\xe4\xbb\xbd\xe6\x9c\x89\xe9\x99\x90\xe5\x85\xac\xe5\x8f\xb8", 30, RTL_TEXTENCODING_UTF8);
RTL_TEXTENCODING_UTF8);
CPPUNIT_ASSERT_EQUAL(aTitle, xProps->getTitle()); CPPUNIT_ASSERT_EQUAL(aTitle, xProps->getTitle());
uno::Reference<beans::XPropertySet> xUDProps(xProps->getUserDefinedProperties(), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xUDProps(xProps->getUserDefinedProperties(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("jay"), getProperty<OUString>(xUDProps, "Operator")); CPPUNIT_ASSERT_EQUAL(OUString("jay"), getProperty<OUString>(xUDProps, "Operator"));

View File

@@ -135,15 +135,12 @@ void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue a
createControlShape(lcl_getOptimalWidth(m_rDM_Impl.GetStyleSheetTable(), rContentText, aItems), xControlModel, aGrabBag.getAsConstPropertyValueList()); createControlShape(lcl_getOptimalWidth(m_rDM_Impl.GetStyleSheetTable(), rContentText, aItems), xControlModel, aGrabBag.getAsConstPropertyValueList());
} }
void SdtHelper::createControlShape(awt::Size aSize, void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> const& xControlModel)
uno::Reference<awt::XControlModel> const& xControlModel)
{ {
createControlShape(aSize, xControlModel, uno::Sequence<beans::PropertyValue>()); createControlShape(aSize, xControlModel, uno::Sequence<beans::PropertyValue>());
} }
void SdtHelper::createControlShape(awt::Size aSize, void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> const& xControlModel, const uno::Sequence<beans::PropertyValue>& rGrabBag)
uno::Reference<awt::XControlModel> const& xControlModel,
const uno::Sequence<beans::PropertyValue>& rGrabBag)
{ {
uno::Reference<drawing::XControlShape> xControlShape(m_rDM_Impl.GetTextFactory()->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY); uno::Reference<drawing::XControlShape> xControlShape(m_rDM_Impl.GetTextFactory()->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY);
xControlShape->setSize(aSize); xControlShape->setSize(aSize);

View File

@@ -62,11 +62,8 @@ class SdtHelper
bool m_bHasElements; bool m_bHasElements;
/// Create and append the drawing::XControlShape, containing the various models. /// Create and append the drawing::XControlShape, containing the various models.
void createControlShape(com::sun::star::awt::Size aSize, void createControlShape(css::awt::Size aSize, css::uno::Reference<css::awt::XControlModel> const&);
com::sun::star::uno::Reference<com::sun::star::awt::XControlModel> const&); void createControlShape(css::awt::Size aSize, css::uno::Reference<css::awt::XControlModel> const&, const css::uno::Sequence<css::beans::PropertyValue>& rGrabBag);
void createControlShape(com::sun::star::awt::Size aSize,
com::sun::star::uno::Reference<com::sun::star::awt::XControlModel> const&,
const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rGrabBag);
public: public:
SdtHelper(DomainMapper_Impl& rDM_Impl); SdtHelper(DomainMapper_Impl& rDM_Impl);
virtual ~SdtHelper(); virtual ~SdtHelper();

View File

@@ -705,9 +705,7 @@ int RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XSh
int b = 0, count = 2; int b = 0, count = 2;
// Feed the destination text to a stream. // Feed the destination text to a stream.
OString aStr = OUStringToOString( OString aStr = OUStringToOString(m_aStates.top().aDestinationText.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
m_aStates.top().aDestinationText.makeStringAndClear(),
RTL_TEXTENCODING_ASCII_US);
const char* str = aStr.getStr(); const char* str = aStr.getStr();
for (int i = 0; i < aStr.getLength(); ++i) for (int i = 0; i < aStr.getLength(); ++i)
{ {
@@ -4882,8 +4880,7 @@ int RTFDocumentImpl::popState()
case DESTINATION_SHAPEPROPERTYNAME: case DESTINATION_SHAPEPROPERTYNAME:
if (&m_aStates.top().aDestinationText != m_aStates.top().pDestinationText) if (&m_aStates.top().aDestinationText != m_aStates.top().pDestinationText)
break; // not for nested group break; // not for nested group
aState.aShape.aProperties.push_back(make_pair( aState.aShape.aProperties.push_back(make_pair(m_aStates.top().pDestinationText->makeStringAndClear(), OUString()));
m_aStates.top().pDestinationText->makeStringAndClear(), OUString()));
break; break;
case DESTINATION_SHAPEPROPERTYVALUE: case DESTINATION_SHAPEPROPERTYVALUE:
if (aState.aShape.aProperties.size()) if (aState.aShape.aProperties.size())

View File

@@ -141,8 +141,7 @@ void RTFSdrImport::resolveFLine(uno::Reference<beans::XPropertySet> const& xProp
xPropertySet->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE)); xPropertySet->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE));
} }
void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape, void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape, const OUString& aKey, const OUString& aValue)
const OUString& aKey, const OUString& aValue)
{ {
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
sal_Int16 nHoriOrient = 0; sal_Int16 nHoriOrient = 0;